Plugin Directory

Changeset 2585601


Ignore:
Timestamp:
08/19/2021 05:16:27 PM (5 years ago)
Author:
pixelative
Message:

Updating to newer version

Location:
amp-wp
Files:
390 added
20 edited

Legend:

Unmodified
Added
Removed
  • amp-wp/trunk/README.txt

    r2552932 r2585601  
    44Tags: AMP, AMP For WP, AMP For WordPress, accelerated mobile pages, mobile theme, google amp, plugin, amp wp
    55Requires at least: 4.9.6
    6 Tested up to: 5.7.2
     6Tested up to: 5.8
    77Requires PHP: 7.0
    8 Stable tag: 1.5.12
     8Stable tag: 1.5.13
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    175175== Changelog ==
    176176
     177= 1.5.13 - 2021-08-19 =
     178* Note: PHP8 compatibility
     179* Fixed: Undefined variables.
     180
    177181= 1.5.12 - 2021-06-23 =
    178182* Added: SG Optimizer Plugin Compatibility
  • amp-wp/trunk/admin/partials/amp-wp-admin-system-status.php

    r2076574 r2585601  
    1111
    1212?>
    13 
    1413<div class="amp-wp-adb">
    1514    <?php require_once AMP_WP_DIR_PATH . 'admin/partials/amp-wp-admin-header.php'; ?>
     
    209208                            );
    210209                            foreach ( $registered_navs as $handle => $registered_nav ) {
    211                                 $menu = wp_get_nav_menu_object( $registered_nav ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
    212                                 if ( $menu ) {
    213                                     $menu_items_count[] = $menu->count;
     210                                $navigation_menu_object = wp_get_nav_menu_object( $registered_nav ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
     211                                if ( $navigation_menu_object ) {
     212                                    $menu_items_count[] = $navigation_menu_object->count;
    214213                                }
    215214                            }
     
    252251                                );
    253252                                foreach ( $registered_navs as $handle => $registered_nav ) {
    254                                     $menu = wp_get_nav_menu_object( $registered_nav ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
    255                                     if ( $menu ) {
    256                                         $menu_items_count[] = $menu->count;
     253                                    $navigation_menu_object = wp_get_nav_menu_object( $registered_nav ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
     254                                    if ( $navigation_menu_object ) {
     255                                        $menu_items_count[] = $navigation_menu_object->count;
    257256                                    }
    258257                                }
     
    284283                                );
    285284                                foreach ( $registered_navs as $handle => $registered_nav ) {
    286                                     $menu = wp_get_nav_menu_object( $registered_nav ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
    287                                     if ( $menu ) {
    288                                         $menu_items_count[] = $menu->count;
     285                                    $navigation_menu_object = wp_get_nav_menu_object( $registered_nav ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
     286                                    if ( $navigation_menu_object ) {
     287                                        $menu_items_count[] = $navigation_menu_object->count;
    289288                                    }
    290289                                }
     
    534533                    <?php
    535534
    536                     foreach ( $active_plugins as $plugin ) {
    537 
    538                         $plugin_data    = @get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
    539                         $dirname        = dirname( $plugin );
     535                    foreach ( $active_plugins as $active_plugin ) {
     536
     537                        $plugin_data    = @get_plugin_data( WP_PLUGIN_DIR . '/' . $active_plugin );
     538                        $dirname        = dirname( $active_plugin );
    540539                        $version_string = '';
    541540                        $network_string = '';
  • amp-wp/trunk/admin/partials/settings/amp-wp-admin-general.php

    r2200704 r2585601  
    1111 * @subpackage Amp_WP/admin/partials/settings
    1212 */
     13
    1314?>
    1415<div id="settings-general" class="amp-wp-vtabs-content">
     
    3435                            <div class="switch">
    3536                                <input type="checkbox" name="amp_wp_general_settings[amp_on_home]" id="amp_on_home" <?php echo ( isset( $amp_on_home ) && ! empty( $amp_on_home ) ) ? 'checked="checked"' : ''; ?> />
    36                                 <label for="amp_on_home"><?php esc_html_e( '&nbsp;', 'amp-wp' ); ?></label>
     37                                <label for="amp_on_home">&nbsp;</label>
    3738                            </div>
    3839                        </td>
     
    4344                            <div class="switch">
    4445                                <input type="checkbox" name="amp_wp_general_settings[amp_on_search]" id="amp_on_search" <?php echo ( isset( $amp_on_search ) && ! empty( $amp_on_search ) ) ? 'checked="checked"' : ''; ?> />
    45                                 <label for="amp_on_search"><?php esc_html_e( '&nbsp;', 'amp-wp' ); ?></label>
     46                                <label for="amp_on_search">&nbsp;</label>
    4647                            </div>
    4748                        </td>
     
    8990                            <div class="description">
    9091                                <p><?php esc_html_e( 'You can exclude URLs of your site to prevent converting them into AMP URL inside your site.', 'amp-wp' ); ?></p>
    91                                 <p><?php _e( 'You can use <strong>*</strong> in the end of URL to exclude all URLs that start with it. e.g. <span class="pre">//yoursite.com/test/*</span>', 'amp-wp' ); ?></p>
     92                                <p><?php esc_html_e( 'You can use <strong>*</strong> in the end of URL to exclude all URLs that start with it. e.g. <span class="pre">//yoursite.com/test/*</span>', 'amp-wp' ); ?></p>
    9293                            </div>
    9394                        </td>
    9495                    </tr>
    9596                    <tr>
    96                         <th scope="row"><label for="excluded_urls"><?php esc_html_e('Exclude AMP by URL:', 'amp-wp'); ?></label></th>
     97                        <th scope="row"><label for="excluded_urls"><?php esc_html_e( 'Exclude AMP by URL:', 'amp-wp' ); ?></label></th>
    9798                        <td>
    9899                            <textarea id="excluded_urls" name="amp_wp_general_settings[excluded_urls]" rows="5" class="large-text code"><?php echo wp_kses_post( $excluded_urls ); ?></textarea>
    99100                            <div class="description">
    100                                 <p><?php esc_html_e('You can disable AMP version of the page. e.g. /product/* will disable all amp pages starting with product in the URL.', 'amp-wp');?></p>
     101                                <p><?php esc_html_e( 'You can disable AMP version of the page. e.g. /product/* will disable all amp pages starting with product in the URL.', 'amp-wp' ); ?></p>
    101102                            </div>
    102103                        </td>
     
    118119                            </select>
    119120                            <div class="description">
    120                                 <p><strong><?php esc_html_e( 'Start Point:', 'amp-wp' ); ?></strong> <span class="pre"><?php _e( '//yoursite.com/<strong>amp</strong>/post/', 'amp-wp' ); ?></span></p>
    121                                 <p><strong><?php esc_html_e( 'End Point:', 'amp-wp' ); ?></strong> <span class="pre"><?php _e( '//yoursite.com/post/<strong>amp</strong>/', 'amp-wp' ); ?></span></p>
     121                                <p><strong><?php esc_html_e( 'Start Point:', 'amp-wp' ); ?></strong> <span class="pre">//yoursite.com/<strong>amp</strong>/post/</span></p>
     122                                <p><strong><?php esc_html_e( 'End Point:', 'amp-wp' ); ?></strong> <span class="pre">//yoursite.com/post/<strong>amp</strong>/</span></p>
    122123                            </div>
    123124                        </td>
     
    132133                <tbody>
    133134                    <tr>
    134                         <th scope="row"><label for="mobile_auto_redirect"><?php _e( 'Automatically Redirect Users to AMP Version:', 'amp-wp' ); ?></label></th>
     135                        <th scope="row"><label for="mobile_auto_redirect"><?php esc_html_e( 'Automatically Redirect Users to AMP Version:', 'amp-wp' ); ?></label></th>
    135136                        <td>
    136137                            <div class="switch">
    137                                 <input type="checkbox"
    138                                     name="amp_wp_general_settings[mobile_auto_redirect]"
    139                                     id="mobile_auto_redirect"
    140                                     <?php echo ( $mobile_auto_redirect == '1' ) ? 'checked="checked"' : ''; ?>
    141                                     value="<?php echo ( $mobile_auto_redirect ) ? intval( $mobile_auto_redirect ) : ''; ?>">
    142                                 <label for="mobile_auto_redirect"><?php esc_html_e( '&nbsp;', 'amp-wp' ); ?></label>
     138                                <input type="checkbox" name="amp_wp_general_settings[mobile_auto_redirect]" id="mobile_auto_redirect" <?php echo ( isset( $mobile_auto_redirect ) && ! empty( $mobile_auto_redirect ) ) ? 'checked="checked"' : ''; ?> />
     139                                <label for="mobile_auto_redirect">&nbsp;</label>
    143140                            </div>
    144 
    145141                            <p class="description"><?php esc_html_e( 'This will automatically redirect all mobile users to the AMP version of the site.', 'amp-wp' ); ?></p>
    146142                        </td>
  • amp-wp/trunk/admin/partials/settings/amp-wp-admin-translation.php

    r2200704 r2585601  
    1515    <form id="amp_wp_setting_form" name="amp_wp_setting_form" method="post">
    1616        <div class="amp-wp-vtabs-header">
    17             <div class="amp-wp-vtabs-title">
    18                 <h2><?php _e('Translation', 'amp-wp'); ?></h2>
    19             </div>
    20             <div class="amp-wp-vtabs-btn-toolbar">
    21                 <?php submit_button(__('Save Changes'), 'button-primary', 'save', false); ?>
    22             </div>
    23         </div>
     17            <div class="amp-wp-vtabs-title">
     18                <h2><?php esc_html_e( 'Translation', 'amp-wp' ); ?></h2>
     19            </div>
     20            <div class="amp-wp-vtabs-btn-toolbar">
     21                <?php submit_button( __( 'Save Changes' ), 'button-primary', 'save', false ); ?>
     22            </div>
     23        </div>
    2424        <div class="amp-wp-vtabs-body">
    25             <!-- Header -->
    26             <h3 class="amp-wp-form-section-title"><?php _e( 'Header', 'amp-wp' ); ?></h3>
    27             <table class="form-table amp-wp-form-table">
    28                 <tbody>
    29                     <tr>
    30                         <th scope="row"><label for="header"><?php _e('Header:', 'amp-wp'); ?></label></th>
    31                         <td><input type="text" id="header" name="amp-wp-translation[header]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['header'] ) ) ? esc_attr( $amp_wp_translation_option['header'] ) : 'Header'; ?>" placeholder="Header" /></td>
    32                     </tr>
    33                 </tbody>
    34             </table>
    35             <!-- /Header -->
    36            
    37             <!-- Search -->
    38             <h3 class="amp-wp-form-section-title"><?php _e( 'Search', 'amp-wp' ); ?></h3>
    39             <table class="form-table amp-wp-form-table">
    40                 <tbody>
    41                     <tr>
    42                         <th scope="row"><label for="search_on_site"><?php _e('Search on site:', 'amp-wp'); ?></label></th>
    43                         <td><input type="text" id="search_on_site" name="amp-wp-translation[search_on_site]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['search_on_site'] ) ) ? esc_attr( $amp_wp_translation_option['search_on_site'] ) : 'Search on site'; ?>" placeholder="Search on site" /></td>
    44                     </tr>
    45                     <tr>
    46                         <th scope="row"><label for="search_input_placeholder"><?php _e('Search input placeholder:', 'amp-wp'); ?></label></th>
    47                         <td><input type="text" id="search_input_placeholder" name="amp-wp-translation[search_input_placeholder]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['search_input_placeholder'] ) ) ? esc_attr( $amp_wp_translation_option['search_input_placeholder'] ) : 'Search &hellip;'; ?>" placeholder="Search &hellip;" /></td>
    48                     </tr>
    49                     <tr>
    50                         <th scope="row"><label for="search_button"><?php _e('Search button:', 'amp-wp'); ?></label></th>
    51                         <td><input type="text" id="search_button" name="amp-wp-translation[search_button]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['search_button'] ) ) ? esc_attr( $amp_wp_translation_option['search_button'] ) : 'Search'; ?>" placeholder="Search" /></td>
    52                     </tr>
    53                 </tbody>
    54             </table>
    55             <!-- /Search -->
    56            
    57             <!-- Navigation -->
    58             <h3 class="amp-wp-form-section-title"><?php _e( 'Navigation', 'amp-wp' ); ?></h3>
    59             <table class="form-table amp-wp-form-table">
    60                 <tbody>
    61                     <tr>
    62                         <th scope="row"><label for="prev"><?php _e('Previous:', 'amp-wp'); ?></label></th>
    63                         <td><input type="text" id="prev" name="amp-wp-translation[prev]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['prev'] ) ) ? esc_attr( $amp_wp_translation_option['prev'] ) : 'Previous'; ?>" placeholder="Previous" /></td>
    64                     </tr>
    65                     <tr>
    66                         <th scope="row"><label for="next"><?php _e('Next:', 'amp-wp'); ?></label></th>
    67                         <td><input type="text" id="next" name="amp-wp-translation[next]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['next'] ) ) ? esc_attr( $amp_wp_translation_option['next'] ) : 'Next'; ?>" placeholder="Next" /></td>
    68                     </tr>
    69                     <tr>
    70                         <th scope="row"><label for="page"><?php _e('Page:', 'amp-wp'); ?></label></th>
    71                         <td><input type="text" id="page" name="amp-wp-translation[page]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['page'] ) ) ? esc_attr( $amp_wp_translation_option['page'] ) : 'Page'; ?>" placeholder="Page" /></td>
    72                     </tr>
    73                     <tr>
    74                         <th scope="row"><label for="page_of"><?php _e('of %d:', 'amp-wp'); ?></label></th>
     25            <!-- Header -->
     26            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'Header', 'amp-wp' ); ?></h3>
     27            <table class="form-table amp-wp-form-table">
     28                <tbody>
     29                    <tr>
     30                        <th scope="row"><label for="header"><?php esc_html_e( 'Header:', 'amp-wp' ); ?></label></th>
     31                        <td><input type="text" id="header" name="amp-wp-translation[header]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['header'] ) ) ? esc_attr( $amp_wp_translation_option['header'] ) : 'Header'; ?>" placeholder="Header" /></td>
     32                    </tr>
     33                </tbody>
     34            </table>
     35            <!-- /Header -->
     36
     37            <!-- Search -->
     38            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'Search', 'amp-wp' ); ?></h3>
     39            <table class="form-table amp-wp-form-table">
     40                <tbody>
     41                    <tr>
     42                        <th scope="row"><label for="search_on_site"><?php esc_html_e( 'Search on site:', 'amp-wp' ); ?></label></th>
     43                        <td><input type="text" id="search_on_site" name="amp-wp-translation[search_on_site]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['search_on_site'] ) ) ? esc_attr( $amp_wp_translation_option['search_on_site'] ) : 'Search on site'; ?>" placeholder="Search on site" /></td>
     44                    </tr>
     45                    <tr>
     46                        <th scope="row"><label for="search_input_placeholder"><?php esc_html_e( 'Search input placeholder:', 'amp-wp' ); ?></label></th>
     47                        <td><input type="text" id="search_input_placeholder" name="amp-wp-translation[search_input_placeholder]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['search_input_placeholder'] ) ) ? esc_attr( $amp_wp_translation_option['search_input_placeholder'] ) : 'Search &hellip;'; ?>" placeholder="Search &hellip;" /></td>
     48                    </tr>
     49                    <tr>
     50                        <th scope="row"><label for="search_button"><?php esc_html_e( 'Search button:', 'amp-wp' ); ?></label></th>
     51                        <td><input type="text" id="search_button" name="amp-wp-translation[search_button]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['search_button'] ) ) ? esc_attr( $amp_wp_translation_option['search_button'] ) : 'Search'; ?>" placeholder="Search" /></td>
     52                    </tr>
     53                </tbody>
     54            </table>
     55            <!-- /Search -->
     56
     57            <!-- Navigation -->
     58            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'Navigation', 'amp-wp' ); ?></h3>
     59            <table class="form-table amp-wp-form-table">
     60                <tbody>
     61                    <tr>
     62                        <th scope="row"><label for="prev"><?php esc_html_e( 'Previous:', 'amp-wp' ); ?></label></th>
     63                        <td><input type="text" id="prev" name="amp-wp-translation[prev]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['prev'] ) ) ? esc_attr( $amp_wp_translation_option['prev'] ) : 'Previous'; ?>" placeholder="Previous" /></td>
     64                    </tr>
     65                    <tr>
     66                        <th scope="row"><label for="next"><?php esc_html_e( 'Next:', 'amp-wp' ); ?></label></th>
     67                        <td><input type="text" id="next" name="amp-wp-translation[next]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['next'] ) ) ? esc_attr( $amp_wp_translation_option['next'] ) : 'Next'; ?>" placeholder="Next" /></td>
     68                    </tr>
     69                    <tr>
     70                        <th scope="row"><label for="page"><?php esc_html_e( 'Page:', 'amp-wp' ); ?></label></th>
     71                        <td><input type="text" id="page" name="amp-wp-translation[page]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['page'] ) ) ? esc_attr( $amp_wp_translation_option['page'] ) : 'Page'; ?>" placeholder="Page" /></td>
     72                    </tr>
     73                    <tr>
     74                        <th scope="row"><label for="page_of"><?php esc_html_e( 'of %d:', 'amp-wp' ); ?></label></th>
    7575                        <td>
    76                             <input type="text" id="page_of" name="amp-wp-translation[page_of]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['page_of'] ) ) ? esc_attr( $amp_wp_translation_option['page_of'] ) : 'of %d'; ?>" placeholder="of %d" />
    77                             <p class="description"><?php _e( '%d will be replace with page number.', 'amp-wp' ); ?></p>
     76                            <input type="text" id="page_of" name="amp-wp-translation[page_of]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['page_of'] ) ) ? esc_attr( $amp_wp_translation_option['page_of'] ) : 'of %d'; ?>" placeholder="of %d" />
     77                            <p class="description"><?php esc_html_e( '%d will be replace with page number.', 'amp-wp' ); ?></p>
    7878                        </td>
    7979                    </tr>
    80                 </tbody>
    81             </table>
    82             <!-- /Navigation -->
    83            
    84             <!-- Archives -->
    85             <h3 class="amp-wp-form-section-title"><?php _e( 'Archives', 'amp-wp' ); ?></h3>
    86             <table class="form-table amp-wp-form-table">
    87                 <tbody>
    88                     <tr>
    89                         <th scope="row"><label for="archive"><?php _e('Archive:', 'amp-wp'); ?></label></th>
    90                         <td><input type="text" id="archive" name="amp-wp-translation[archive]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['archive'] ) ) ? esc_attr( $amp_wp_translation_option['archive'] ) : 'Archive'; ?>" placeholder="Archive" /></td>
    91                     </tr>
    92                     <tr>
    93                         <th scope="row"><label for="browsing"><?php _e('Browsing:', 'amp-wp'); ?></label></th>
    94                         <td><input type="text" id="browsing" name="amp-wp-translation[browsing]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['browsing'] ) ) ? esc_attr( $amp_wp_translation_option['browsing'] ) : 'Browsing'; ?>" placeholder="Browsing" /></td>
    95                     </tr>
    96                     <tr>
    97                         <th scope="row"><label for="browse_author_articles"><?php _e('Browse Author Articles:', 'amp-wp'); ?></label></th>
     80                </tbody>
     81            </table>
     82            <!-- /Navigation -->
     83
     84            <!-- Archives -->
     85            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'Archives', 'amp-wp' ); ?></h3>
     86            <table class="form-table amp-wp-form-table">
     87                <tbody>
     88                    <tr>
     89                        <th scope="row"><label for="archive"><?php esc_html_e( 'Archive:', 'amp-wp' ); ?></label></th>
     90                        <td><input type="text" id="archive" name="amp-wp-translation[archive]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['archive'] ) ) ? esc_attr( $amp_wp_translation_option['archive'] ) : 'Archive'; ?>" placeholder="Archive" /></td>
     91                    </tr>
     92                    <tr>
     93                        <th scope="row"><label for="browsing"><?php esc_html_e( 'Browsing:', 'amp-wp' ); ?></label></th>
     94                        <td><input type="text" id="browsing" name="amp-wp-translation[browsing]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['browsing'] ) ) ? esc_attr( $amp_wp_translation_option['browsing'] ) : 'Browsing'; ?>" placeholder="Browsing" /></td>
     95                    </tr>
     96                    <tr>
     97                        <th scope="row"><label for="browse_author_articles"><?php esc_html_e( 'Browse Author Articles:', 'amp-wp' ); ?></label></th>
    9898                        <td>
    99                             <input type="text" id="browse_author_articles" name="amp-wp-translation[browse_author_articles]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['browse_author_articles'] ) ) ? esc_attr( $amp_wp_translation_option['browse_author_articles'] ) : 'Browse Author Articles'; ?>" placeholder="Browse Author Articles" />
    100                             <p class="description"><?php _e( '%s1 is author name and %s2 is post publish date.', 'amp-wp' ); ?></p>
     99                            <input type="text" id="browse_author_articles" name="amp-wp-translation[browse_author_articles]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['browse_author_articles'] ) ) ? esc_attr( $amp_wp_translation_option['browse_author_articles'] ) : 'Browse Author Articles'; ?>" placeholder="Browse Author Articles" />
     100                            <p class="description"><?php esc_html_e( '%1$s1 is author name and %2$s2 is post publish date.', 'amp-wp' ); ?></p>
    101101                        </td>
    102102                    </tr>
    103103                    <tr>
    104                         <th scope="row"><label for="browsing_category"><?php _e('Browsing category:', 'amp-wp'); ?></label></th>
    105                         <td><input type="text" id="browsing_category" name="amp-wp-translation[browsing_category]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['browsing_category'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_category'] ) : 'Browsing category'; ?>" placeholder="Browsing category" /></td>
    106                     </tr>
    107                     <tr>
    108                         <th scope="row"><label for="browsing_tag"><?php _e('Browsing tag:', 'amp-wp'); ?></label></th>
    109                         <td><input type="text" id="browsing_tag" name="amp-wp-translation[browsing_tag]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['browsing_tag'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_tag'] ) : 'Browsing tag'; ?>" placeholder="Browsing tag" /></td>
    110                     </tr>
    111                     <tr>
    112                         <th scope="row"><label for="browsing_author"><?php _e('Browsing author:', 'amp-wp'); ?></label></th>
    113                         <td><input type="text" id="browsing_author" name="amp-wp-translation[browsing_author]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['browsing_author'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_author'] ) : 'Browsing author'; ?>" placeholder="Browsing author" /></td>
    114                     </tr>
    115                     <tr>
    116                         <th scope="row"><label for="browsing_yearly"><?php _e('Browsing yearly archive:', 'amp-wp'); ?></label></th>
    117                         <td><input type="text" id="browsing_yearly" name="amp-wp-translation[browsing_yearly]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['browsing_yearly'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_yearly'] ) : 'Browsing yearly archive'; ?>" placeholder="Browsing yearly archive" /></td>
    118                     </tr>
    119                     <tr>
    120                         <th scope="row"><label for="browsing_monthly"><?php _e('Browsing monthly archive:', 'amp-wp'); ?></label></th>
    121                         <td><input type="text" id="browsing_monthly" name="amp-wp-translation[browsing_monthly]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['browsing_monthly'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_monthly'] ) : 'Browsing monthly archive'; ?>" placeholder="Browsing monthly archive" /></td>
    122                     </tr>
    123                     <tr>
    124                         <th scope="row"><label for="browsing_daily"><?php _e('Browsing daily archive:', 'amp-wp'); ?></label></th>
    125                         <td><input type="text" id="browsing_daily" name="amp-wp-translation[browsing_daily]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['browsing_daily'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_daily'] ) : 'Browsing daily archive'; ?>" placeholder="Browsing daily archive" /></td>
    126                     </tr>
    127                     <tr>
    128                         <th scope="row"><label for="browsing_archive"><?php _e('Browsing archive:', 'amp-wp'); ?></label></th>
    129                         <td><input type="text" id="browsing_archive" name="amp-wp-translation[browsing_archive]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['browsing_archive'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_archive'] ) : 'Browsing archive'; ?>" placeholder="Browsing archive" /></td>
    130                     </tr>
    131                 </tbody>
    132             </table>
    133             <!-- /Archives -->
    134            
    135             <!-- Posts -->
    136             <h3 class="amp-wp-form-section-title"><?php _e( 'Posts', 'amp-wp' ); ?></h3>
    137             <table class="form-table amp-wp-form-table">
    138                 <tbody>
    139                     <tr>
    140                         <th scope="row"><label for="by_on"><?php _e('By %s1 on %s2:', 'amp-wp'); ?></label></th>
     104                        <th scope="row"><label for="browsing_category"><?php esc_html_e( 'Browsing category:', 'amp-wp' ); ?></label></th>
     105                        <td><input type="text" id="browsing_category" name="amp-wp-translation[browsing_category]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['browsing_category'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_category'] ) : 'Browsing category'; ?>" placeholder="Browsing category" /></td>
     106                    </tr>
     107                    <tr>
     108                        <th scope="row"><label for="browsing_tag"><?php esc_html_e( 'Browsing tag:', 'amp-wp' ); ?></label></th>
     109                        <td><input type="text" id="browsing_tag" name="amp-wp-translation[browsing_tag]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['browsing_tag'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_tag'] ) : 'Browsing tag'; ?>" placeholder="Browsing tag" /></td>
     110                    </tr>
     111                    <tr>
     112                        <th scope="row"><label for="browsing_author"><?php esc_html_e( 'Browsing author:', 'amp-wp' ); ?></label></th>
     113                        <td><input type="text" id="browsing_author" name="amp-wp-translation[browsing_author]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['browsing_author'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_author'] ) : 'Browsing author'; ?>" placeholder="Browsing author" /></td>
     114                    </tr>
     115                    <tr>
     116                        <th scope="row"><label for="browsing_yearly"><?php esc_html_e( 'Browsing yearly archive:', 'amp-wp' ); ?></label></th>
     117                        <td><input type="text" id="browsing_yearly" name="amp-wp-translation[browsing_yearly]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['browsing_yearly'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_yearly'] ) : 'Browsing yearly archive'; ?>" placeholder="Browsing yearly archive" /></td>
     118                    </tr>
     119                    <tr>
     120                        <th scope="row"><label for="browsing_monthly"><?php esc_html_e( 'Browsing monthly archive:', 'amp-wp' ); ?></label></th>
     121                        <td><input type="text" id="browsing_monthly" name="amp-wp-translation[browsing_monthly]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['browsing_monthly'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_monthly'] ) : 'Browsing monthly archive'; ?>" placeholder="Browsing monthly archive" /></td>
     122                    </tr>
     123                    <tr>
     124                        <th scope="row"><label for="browsing_daily"><?php esc_html_e( 'Browsing daily archive:', 'amp-wp' ); ?></label></th>
     125                        <td><input type="text" id="browsing_daily" name="amp-wp-translation[browsing_daily]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['browsing_daily'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_daily'] ) : 'Browsing daily archive'; ?>" placeholder="Browsing daily archive" /></td>
     126                    </tr>
     127                    <tr>
     128                        <th scope="row"><label for="browsing_archive"><?php esc_html_e( 'Browsing archive:', 'amp-wp' ); ?></label></th>
     129                        <td><input type="text" id="browsing_archive" name="amp-wp-translation[browsing_archive]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['browsing_archive'] ) ) ? esc_attr( $amp_wp_translation_option['browsing_archive'] ) : 'Browsing archive'; ?>" placeholder="Browsing archive" /></td>
     130                    </tr>
     131                </tbody>
     132            </table>
     133            <!-- /Archives -->
     134
     135            <!-- Posts -->
     136            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'Posts', 'amp-wp' ); ?></h3>
     137            <table class="form-table amp-wp-form-table">
     138                <tbody>
     139                    <tr>
     140                        <th scope="row"><label for="by_on"><?php esc_html_e( 'By %1$s1 on %2$s2:', 'amp-wp' ); ?></label></th>
    141141                        <td>
    142                             <input type="text" id="by_on" name="amp-wp-translation[by_on]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['by_on'] ) ) ? esc_attr( $amp_wp_translation_option['by_on'] ) : '%s1 &#9679; %s2'; ?>" placeholder="%s1 &#9679; %s2" />
    143                             <p class="description"><?php _e( '%s1 is author name and %s2 is post publish date.', 'amp-wp' ); ?></p>
     142                            <input type="text" id="by_on" name="amp-wp-translation[by_on]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['by_on'] ) ) ? esc_attr( $amp_wp_translation_option['by_on'] ) : '%s1 &#9679; %s2'; ?>" placeholder="%s1 &#9679; %s2" />
     143                            <p class="description"><?php esc_html_e( '%1$s1 is author name and %2$s2 is post publish date.', 'amp-wp' ); ?></p>
    144144                        </td>
    145145                    </tr>
    146146                    <tr>
    147                         <th scope="row"><label for="share"><?php _e('Share:', 'amp-wp'); ?></label></th>
    148                         <td><input type="text" id="share" name="amp-wp-translation[share]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['share'] ) ) ? esc_attr( $amp_wp_translation_option['share'] ) : 'Share'; ?>" placeholder="Share" /></td>
    149                     </tr>
    150                     <tr>
    151                         <th scope="row"><label for="listing_2_date"><?php _e('Large Listing Date Format:', 'amp-wp'); ?></label></th>
    152                         <td><input type="text" id="listing_2_date" name="amp-wp-translation[listing_2_date]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['listing_2_date'] ) ) ? esc_attr( $amp_wp_translation_option['listing_2_date'] ) : 'M d, Y'; ?>" placeholder="M d, Y" /></td>
    153                     </tr>
    154                     <tr>
    155                         <th scope="row"><label for="tags"><?php _e('Tags:', 'amp-wp'); ?></label></th>
    156                         <td><input type="text" id="tags" name="amp-wp-translation[tags]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['tags'] ) ) ? esc_attr( $amp_wp_translation_option['tags'] ) : 'Tags'; ?>" placeholder="Tags" /></td>
    157                     </tr>
    158                     <tr>
    159                         <th scope="row"><label for="related_posts"><?php _e('Related Posts:', 'amp-wp'); ?></label></th>
    160                         <td><input type="text" id="related_posts" name="amp-wp-translation[related_posts]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['related_posts'] ) ) ? esc_attr( $amp_wp_translation_option['related_posts'] ) : 'Related Posts'; ?>" placeholder="Related Posts" /></td>
    161                     </tr>
    162                 </tbody>
    163             </table>
    164             <!-- /Posts -->
    165            
    166             <!-- Post Formats -->
    167             <h3 class="amp-wp-form-section-title"><?php _e( 'Post Formats', 'amp-wp' ); ?></h3>
    168             <table class="form-table amp-wp-form-table">
    169                 <tbody>
    170                     <tr>
    171                         <th scope="row"><label for="asides"><?php _e('Asides:', 'amp-wp'); ?></label></th>
    172                         <td><input type="text" id="asides" name="amp-wp-translation[asides]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['asides'] ) ) ? esc_attr( $amp_wp_translation_option['asides'] ) : 'Asides'; ?>" placeholder="Asides" /></td>
    173                     </tr>
    174                     <tr>
    175                         <th scope="row"><label for="galleries"><?php _e('Galleries:', 'amp-wp'); ?></label></th>
    176                         <td><input type="text" id="galleries" name="amp-wp-translation[galleries]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['galleries'] ) ) ? esc_attr( $amp_wp_translation_option['galleries'] ) : 'Galleries'; ?>" placeholder="Galleries" /></td>
    177                     </tr>
    178                     <tr>
    179                         <th scope="row"><label for="images"><?php _e('Images:', 'amp-wp'); ?></label></th>
    180                         <td><input type="text" id="images" name="amp-wp-translation[images]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['images'] ) ) ? esc_attr( $amp_wp_translation_option['images'] ) : 'Images'; ?>" placeholder="Images" /></td>
    181                     </tr>
    182                     <tr>
    183                         <th scope="row"><label for="videos"><?php _e('Videos:', 'amp-wp'); ?></label></th>
    184                         <td><input type="text" id="videos" name="amp-wp-translation[videos]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['videos'] ) ) ? esc_attr( $amp_wp_translation_option['videos'] ) : 'Videos'; ?>" placeholder="Videos" /></td>
    185                     </tr>
    186                     <tr>
    187                         <th scope="row"><label for="quotes"><?php _e('Quotes:', 'amp-wp'); ?></label></th>
    188                         <td><input type="text" id="quotes" name="amp-wp-translation[quotes]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['quotes'] ) ) ? esc_attr( $amp_wp_translation_option['quotes'] ) : 'Quotes'; ?>" placeholder="Quotes" /></td>
    189                     </tr>
    190                     <tr>
    191                         <th scope="row"><label for="links"><?php _e('Links:', 'amp-wp'); ?></label></th>
    192                         <td><input type="text" id="links" name="amp-wp-translation[links]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['links'] ) ) ? esc_attr( $amp_wp_translation_option['links'] ) : 'Links'; ?>" placeholder="Links" /></td>
    193                     </tr>
    194                     <tr>
    195                         <th scope="row"><label for="statuses"><?php _e('Statuses:', 'amp-wp'); ?></label></th>
    196                         <td><input type="text" id="statuses" name="amp-wp-translation[statuses]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['statuses'] ) ) ? esc_attr( $amp_wp_translation_option['statuses'] ) : 'Statuses'; ?>" placeholder="Statuses" /></td>
    197                     </tr>
    198                     <tr>
    199                         <th scope="row"><label for="audio"><?php _e('Audio:', 'amp-wp'); ?></label></th>
    200                         <td><input type="text" id="audio" name="amp-wp-translation[audio]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['audio'] ) ) ? esc_attr( $amp_wp_translation_option['audio'] ) : 'Audio'; ?>" placeholder="Audio" /></td>
    201                     </tr>
    202                     <tr>
    203                         <th scope="row"><label for="chats"><?php _e('Chats:', 'amp-wp'); ?></label></th>
    204                         <td><input type="text" id="chats" name="amp-wp-translation[chats]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['chats'] ) ) ? esc_attr( $amp_wp_translation_option['chats'] ) : 'Chats'; ?>" placeholder="Chats" /></td>
    205                     </tr>
    206                 </tbody>
    207             </table>
    208             <!-- /Post Formats -->
    209            
    210             <!-- Attachment Texts -->
    211             <h3 class="amp-wp-form-section-title"><?php _e( 'Attachment Texts', 'amp-wp' ); ?></h3>
    212             <table class="form-table amp-wp-form-table">
    213                 <tbody>
    214                     <tr>
    215                         <th scope="row"><label for="attachment-return-to"><?php _e('Return to post:', 'amp-wp'); ?></label></th>
    216                         <td><input type="text" id="attachment-return-to" name="amp-wp-translation[attachment-return-to]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['attachment-return-to'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-return-to'] ) : 'Return to &quot;%s&quot;'; ?>" placeholder='Return to "%s"' /></td>
    217                     </tr>
    218                     <tr>
    219                         <th scope="row"><label for="click-here"><?php _e('Click here:', 'amp-wp'); ?></label></th>
    220                         <td><input type="text" id="click-here" name="amp-wp-translation[click-here]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['click-here'] ) ) ? esc_attr( $amp_wp_translation_option['click-here'] ) : 'Click here'; ?>" placeholder="Click here" /></td>
    221                     </tr>
    222                     <tr>
    223                         <th scope="row"><label for="attachment-play-video"><?php _e('Play Video:', 'amp-wp'); ?></label></th>
    224                         <td><input type="text" id="attachment-play-video" name="amp-wp-translation[attachment-play-video]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['attachment-play-video'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-play-video'] ) : '%s to play video'; ?>" placeholder="%s to play video" /></td>
    225                     </tr>
    226                     <tr>
    227                         <th scope="row"><label for="attachment-play-audio"><?php _e('Play Audio:', 'amp-wp'); ?></label></th>
    228                         <td><input type="text" id="attachment-play-audio" name="amp-wp-translation[attachment-play-audio]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['attachment-play-audio'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-play-audio'] ) : '%s to play audio'; ?>" placeholder="%s to play audio" /></td>
    229                     </tr>
    230                     <tr>
    231                         <th scope="row"><label for="attachment-download-file"><?php _e('Download File:', 'amp-wp'); ?></label></th>
    232                         <td><input type="text" id="attachment-download-file" name="amp-wp-translation[attachment-download-file]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['attachment-download-file'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-download-file'] ) : '%s to Download File'; ?>" placeholder="%s to Download File" /></td>
    233                     </tr>
    234                     <tr>
    235                         <th scope="row"><label for="attachment-next"><?php _e('Next Attachment:', 'amp-wp'); ?></label></th>
    236                         <td><input type="text" id="attachment-next" name="amp-wp-translation[attachment-next]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['attachment-next'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-next'] ) : 'Next'; ?>" placeholder="Next" /></td>
    237                     </tr>
    238                     <tr>
    239                         <th scope="row"><label for="attachment-prev"><?php _e('Previous Attachment:', 'amp-wp'); ?></label></th>
    240                         <td><input type="text" id="attachment-prev" name="amp-wp-translation[attachment-prev]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['attachment-prev'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-prev'] ) : 'Previous'; ?>" placeholder="Previous" /></td>
    241                     </tr>
    242                 </tbody>
    243             </table>
    244             <!-- /Attachment Texts -->
    245            
    246             <!-- Comments -->
    247             <h3 class="amp-wp-form-section-title"><?php _e( 'Comments', 'amp-wp' ); ?></h3>
    248             <table class="form-table amp-wp-form-table">
    249                 <tbody>
    250                     <?php foreach( $sections['comments']['fields'] as $field ): ?>
     147                        <th scope="row"><label for="share"><?php esc_html_e( 'Share:', 'amp-wp' ); ?></label></th>
     148                        <td><input type="text" id="share" name="amp-wp-translation[share]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['share'] ) ) ? esc_attr( $amp_wp_translation_option['share'] ) : 'Share'; ?>" placeholder="Share" /></td>
     149                    </tr>
     150                    <tr>
     151                        <th scope="row"><label for="listing_2_date"><?php esc_html_e( 'Large Listing Date Format:', 'amp-wp' ); ?></label></th>
     152                        <td><input type="text" id="listing_2_date" name="amp-wp-translation[listing_2_date]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['listing_2_date'] ) ) ? esc_attr( $amp_wp_translation_option['listing_2_date'] ) : 'M d, Y'; ?>" placeholder="M d, Y" /></td>
     153                    </tr>
     154                    <tr>
     155                        <th scope="row"><label for="tags"><?php esc_html_e( 'Tags:', 'amp-wp' ); ?></label></th>
     156                        <td><input type="text" id="tags" name="amp-wp-translation[tags]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['tags'] ) ) ? esc_attr( $amp_wp_translation_option['tags'] ) : 'Tags'; ?>" placeholder="Tags" /></td>
     157                    </tr>
     158                    <tr>
     159                        <th scope="row"><label for="related_posts"><?php esc_html_e( 'Related Posts:', 'amp-wp' ); ?></label></th>
     160                        <td><input type="text" id="related_posts" name="amp-wp-translation[related_posts]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['related_posts'] ) ) ? esc_attr( $amp_wp_translation_option['related_posts'] ) : 'Related Posts'; ?>" placeholder="Related Posts" /></td>
     161                    </tr>
     162                </tbody>
     163            </table>
     164            <!-- /Posts -->
     165
     166            <!-- Post Formats -->
     167            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'Post Formats', 'amp-wp' ); ?></h3>
     168            <table class="form-table amp-wp-form-table">
     169                <tbody>
     170                    <tr>
     171                        <th scope="row"><label for="asides"><?php esc_html_e( 'Asides:', 'amp-wp' ); ?></label></th>
     172                        <td><input type="text" id="asides" name="amp-wp-translation[asides]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['asides'] ) ) ? esc_attr( $amp_wp_translation_option['asides'] ) : 'Asides'; ?>" placeholder="Asides" /></td>
     173                    </tr>
     174                    <tr>
     175                        <th scope="row"><label for="galleries"><?php esc_html_e( 'Galleries:', 'amp-wp' ); ?></label></th>
     176                        <td><input type="text" id="galleries" name="amp-wp-translation[galleries]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['galleries'] ) ) ? esc_attr( $amp_wp_translation_option['galleries'] ) : 'Galleries'; ?>" placeholder="Galleries" /></td>
     177                    </tr>
     178                    <tr>
     179                        <th scope="row"><label for="images"><?php esc_html_e( 'Images:', 'amp-wp' ); ?></label></th>
     180                        <td><input type="text" id="images" name="amp-wp-translation[images]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['images'] ) ) ? esc_attr( $amp_wp_translation_option['images'] ) : 'Images'; ?>" placeholder="Images" /></td>
     181                    </tr>
     182                    <tr>
     183                        <th scope="row"><label for="videos"><?php esc_html_e( 'Videos:', 'amp-wp' ); ?></label></th>
     184                        <td><input type="text" id="videos" name="amp-wp-translation[videos]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['videos'] ) ) ? esc_attr( $amp_wp_translation_option['videos'] ) : 'Videos'; ?>" placeholder="Videos" /></td>
     185                    </tr>
     186                    <tr>
     187                        <th scope="row"><label for="quotes"><?php esc_html_e( 'Quotes:', 'amp-wp' ); ?></label></th>
     188                        <td><input type="text" id="quotes" name="amp-wp-translation[quotes]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['quotes'] ) ) ? esc_attr( $amp_wp_translation_option['quotes'] ) : 'Quotes'; ?>" placeholder="Quotes" /></td>
     189                    </tr>
     190                    <tr>
     191                        <th scope="row"><label for="links"><?php esc_html_e( 'Links:', 'amp-wp' ); ?></label></th>
     192                        <td><input type="text" id="links" name="amp-wp-translation[links]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['links'] ) ) ? esc_attr( $amp_wp_translation_option['links'] ) : 'Links'; ?>" placeholder="Links" /></td>
     193                    </tr>
     194                    <tr>
     195                        <th scope="row"><label for="statuses"><?php esc_html_e( 'Statuses:', 'amp-wp' ); ?></label></th>
     196                        <td><input type="text" id="statuses" name="amp-wp-translation[statuses]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['statuses'] ) ) ? esc_attr( $amp_wp_translation_option['statuses'] ) : 'Statuses'; ?>" placeholder="Statuses" /></td>
     197                    </tr>
     198                    <tr>
     199                        <th scope="row"><label for="audio"><?php esc_html_e( 'Audio:', 'amp-wp' ); ?></label></th>
     200                        <td><input type="text" id="audio" name="amp-wp-translation[audio]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['audio'] ) ) ? esc_attr( $amp_wp_translation_option['audio'] ) : 'Audio'; ?>" placeholder="Audio" /></td>
     201                    </tr>
     202                    <tr>
     203                        <th scope="row"><label for="chats"><?php esc_html_e( 'Chats:', 'amp-wp' ); ?></label></th>
     204                        <td><input type="text" id="chats" name="amp-wp-translation[chats]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['chats'] ) ) ? esc_attr( $amp_wp_translation_option['chats'] ) : 'Chats'; ?>" placeholder="Chats" /></td>
     205                    </tr>
     206                </tbody>
     207            </table>
     208            <!-- /Post Formats -->
     209
     210            <!-- Attachment Texts -->
     211            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'Attachment Texts', 'amp-wp' ); ?></h3>
     212            <table class="form-table amp-wp-form-table">
     213                <tbody>
     214                    <tr>
     215                        <th scope="row"><label for="attachment-return-to"><?php esc_html_e( 'Return to post:', 'amp-wp' ); ?></label></th>
     216                        <td><input type="text" id="attachment-return-to" name="amp-wp-translation[attachment-return-to]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['attachment-return-to'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-return-to'] ) : 'Return to &quot;%s&quot;'; ?>" placeholder='Return to "%s"' /></td>
     217                    </tr>
     218                    <tr>
     219                        <th scope="row"><label for="click-here"><?php esc_html_e( 'Click here:', 'amp-wp' ); ?></label></th>
     220                        <td><input type="text" id="click-here" name="amp-wp-translation[click-here]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['click-here'] ) ) ? esc_attr( $amp_wp_translation_option['click-here'] ) : 'Click here'; ?>" placeholder="Click here" /></td>
     221                    </tr>
     222                    <tr>
     223                        <th scope="row"><label for="attachment-play-video"><?php esc_html_e( 'Play Video:', 'amp-wp' ); ?></label></th>
     224                        <td><input type="text" id="attachment-play-video" name="amp-wp-translation[attachment-play-video]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['attachment-play-video'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-play-video'] ) : '%s to play video'; ?>" placeholder="%s to play video" /></td>
     225                    </tr>
     226                    <tr>
     227                        <th scope="row"><label for="attachment-play-audio"><?php esc_html_e( 'Play Audio:', 'amp-wp' ); ?></label></th>
     228                        <td><input type="text" id="attachment-play-audio" name="amp-wp-translation[attachment-play-audio]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['attachment-play-audio'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-play-audio'] ) : '%s to play audio'; ?>" placeholder="%s to play audio" /></td>
     229                    </tr>
     230                    <tr>
     231                        <th scope="row"><label for="attachment-download-file"><?php esc_html_e( 'Download File:', 'amp-wp' ); ?></label></th>
     232                        <td><input type="text" id="attachment-download-file" name="amp-wp-translation[attachment-download-file]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['attachment-download-file'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-download-file'] ) : '%s to Download File'; ?>" placeholder="%s to Download File" /></td>
     233                    </tr>
     234                    <tr>
     235                        <th scope="row"><label for="attachment-next"><?php esc_html_e( 'Next Attachment:', 'amp-wp' ); ?></label></th>
     236                        <td><input type="text" id="attachment-next" name="amp-wp-translation[attachment-next]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['attachment-next'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-next'] ) : 'Next'; ?>" placeholder="Next" /></td>
     237                    </tr>
     238                    <tr>
     239                        <th scope="row"><label for="attachment-prev"><?php esc_html_e( 'Previous Attachment:', 'amp-wp' ); ?></label></th>
     240                        <td><input type="text" id="attachment-prev" name="amp-wp-translation[attachment-prev]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['attachment-prev'] ) ) ? esc_attr( $amp_wp_translation_option['attachment-prev'] ) : 'Previous'; ?>" placeholder="Previous" /></td>
     241                    </tr>
     242                </tbody>
     243            </table>
     244            <!-- /Attachment Texts -->
     245
     246            <!-- Comments -->
     247            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'Comments', 'amp-wp' ); ?></h3>
     248            <table class="form-table amp-wp-form-table">
     249                <tbody>
     250                    <?php foreach ( $sections['comments']['fields'] as $field ) : ?>
    251251                    <tr>
    252252                        <th scope="row"><label for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_attr( $field['title'] ); ?></label></th>
     
    254254                    </tr>
    255255                    <?php endforeach; ?>
    256                 </tbody>
    257             </table>
    258             <!-- /Comments -->
    259            
    260             <!-- Footer -->
    261             <h3 class="amp-wp-form-section-title"><?php _e( 'Footer', 'amp-wp' ); ?></h3>
    262             <table class="form-table amp-wp-form-table">
    263                 <tbody>
    264                     <tr>
    265                         <th scope="row"><label for="view_desktop"><?php _e('View Desktop Version:', 'amp-wp'); ?></label></th>
    266                         <td><input type="text" id="view_desktop" name="amp-wp-translation[view_desktop]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['view_desktop'] ) ) ? esc_attr( $amp_wp_translation_option['view_desktop'] ) : 'View Desktop Version'; ?>" placeholder="View Desktop Version" /></td>
    267                     </tr>
    268                 </tbody>
    269             </table>
    270             <!-- /Footer -->
    271            
    272             <!-- 404 -->
    273             <h3 class="amp-wp-form-section-title"><?php _e( '404 Page', 'amp-wp' ); ?></h3>
    274             <table class="form-table amp-wp-form-table">
    275                 <tbody>
    276                     <tr>
    277                         <th scope="row"><label for="404_message"><?php _e('404 Page Message:', 'amp-wp'); ?></label></th>
    278                         <td><input type="text" id="404_message" name="amp-wp-translation[404_message]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['404_message'] ) ) ? esc_attr( $amp_wp_translation_option['404_message'] ) : 'Oops! That page cannot be found.'; ?>" placeholder="Oops! That page cannot be found." /></td>
    279                     </tr>
    280                 </tbody>
    281             </table>
    282             <!-- 404 -->
    283            
    284             <!-- 404 -->
    285             <h3 class="amp-wp-form-section-title"><?php _e( 'OneSignal – Web Push Notifications', 'amp-wp' ); ?></h3>
    286             <table class="form-table amp-wp-form-table">
    287                 <tbody>
    288                     <tr>
    289                         <th scope="row"><label for="onesignal_subscribe"><?php _e('Subscribe:', 'amp-wp'); ?></label></th>
    290                         <td><input type="text" id="onesignal_subscribe" name="amp-wp-translation[onesignal_subscribe]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['onesignal_subscribe'] ) ) ? esc_attr( $amp_wp_translation_option['onesignal_subscribe'] ) : 'Subscribe to updates'; ?>" placeholder="Subscribe to updates" /></td>
    291                     </tr>
    292                     <tr>
    293                         <th scope="row"><label for="onesignal_unsubsribe"><?php _e('Unsubsribe:', 'amp-wp'); ?></label></th>
    294                         <td><input type="text" id="onesignal_unsubsribe" name="amp-wp-translation[onesignal_unsubsribe]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && !empty( $amp_wp_translation_option['onesignal_unsubsribe'] ) ) ? esc_attr( $amp_wp_translation_option['onesignal_unsubsribe'] ) : 'Unsubscribe from updates'; ?>" placeholder="Unsubscribe from updates" /></td>
    295                     </tr>
    296                 </tbody>
    297             </table>
    298             <!-- 404 -->
    299 
    300             <?php wp_nonce_field('amp_wp_translation_setting', 'amp_wp_translation_nonce'); ?>
    301             <?php wp_original_referer_field(true, 'previous'); ?>
     256                </tbody>
     257            </table>
     258            <!-- /Comments -->
     259
     260            <!-- Footer -->
     261            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'Footer', 'amp-wp' ); ?></h3>
     262            <table class="form-table amp-wp-form-table">
     263                <tbody>
     264                    <tr>
     265                        <th scope="row"><label for="view_desktop"><?php esc_html_e( 'View Desktop Version:', 'amp-wp' ); ?></label></th>
     266                        <td><input type="text" id="view_desktop" name="amp-wp-translation[view_desktop]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['view_desktop'] ) ) ? esc_attr( $amp_wp_translation_option['view_desktop'] ) : 'View Desktop Version'; ?>" placeholder="View Desktop Version" /></td>
     267                    </tr>
     268                </tbody>
     269            </table>
     270            <!-- /Footer -->
     271
     272            <!-- 404 -->
     273            <h3 class="amp-wp-form-section-title"><?php esc_html_e( '404 Page', 'amp-wp' ); ?></h3>
     274            <table class="form-table amp-wp-form-table">
     275                <tbody>
     276                    <tr>
     277                        <th scope="row"><label for="404_message"><?php esc_html_e( '404 Page Message:', 'amp-wp' ); ?></label></th>
     278                        <td><input type="text" id="404_message" name="amp-wp-translation[404_message]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['404_message'] ) ) ? esc_attr( $amp_wp_translation_option['404_message'] ) : 'Oops! That page cannot be found.'; ?>" placeholder="Oops! That page cannot be found." /></td>
     279                    </tr>
     280                </tbody>
     281            </table>
     282            <!-- 404 -->
     283
     284            <!-- 404 -->
     285            <h3 class="amp-wp-form-section-title"><?php esc_html_e( 'OneSignal – Web Push Notifications', 'amp-wp' ); ?></h3>
     286            <table class="form-table amp-wp-form-table">
     287                <tbody>
     288                    <tr>
     289                        <th scope="row"><label for="onesignal_subscribe"><?php esc_html_e( 'Subscribe:', 'amp-wp' ); ?></label></th>
     290                        <td><input type="text" id="onesignal_subscribe" name="amp-wp-translation[onesignal_subscribe]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['onesignal_subscribe'] ) ) ? esc_attr( $amp_wp_translation_option['onesignal_subscribe'] ) : 'Subscribe to updates'; ?>" placeholder="Subscribe to updates" /></td>
     291                    </tr>
     292                    <tr>
     293                        <th scope="row"><label for="onesignal_unsubsribe"><?php esc_html_e( 'Unsubsribe:', 'amp-wp' ); ?></label></th>
     294                        <td><input type="text" id="onesignal_unsubsribe" name="amp-wp-translation[onesignal_unsubsribe]" size="30" value="<?php echo ( isset( $amp_wp_translation_option ) && ! empty( $amp_wp_translation_option['onesignal_unsubsribe'] ) ) ? esc_attr( $amp_wp_translation_option['onesignal_unsubsribe'] ) : 'Unsubscribe from updates'; ?>" placeholder="Unsubscribe from updates" /></td>
     295                    </tr>
     296                </tbody>
     297            </table>
     298            <!-- 404 -->
     299
     300            <?php wp_nonce_field( 'amp_wp_translation_setting', 'amp_wp_translation_nonce' ); ?>
     301            <?php wp_original_referer_field( true, 'previous' ); ?>
    302302            <input type="hidden" value="1" name="admin_notices">
    303303        </div>
    304304        <div class="amp-wp-vtabs-footer">
    305             <div class="amp-wp-vtabs-title">
    306                 <h2><?php _e('Translation', 'amp-wp'); ?></h2>
    307             </div>
    308             <div class="amp-wp-vtabs-btn-toolbar">
    309                 <?php submit_button(__('Save Changes'), 'button-primary', 'save', false); ?>
    310             </div>
    311         </div>
     305            <div class="amp-wp-vtabs-title">
     306                <h2><?php esc_html_e( 'Translation', 'amp-wp' ); ?></h2>
     307            </div>
     308            <div class="amp-wp-vtabs-btn-toolbar">
     309                <?php submit_button( __( 'Save Changes' ), 'button-primary', 'save', false ); ?>
     310            </div>
     311        </div>
    312312    </form>
    313313</div>
  • amp-wp/trunk/amp-wp.php

    r2552932 r2585601  
    1616 * Plugin URI:          https://wordpress.org/plugins/amp-wp
    1717 * Description:         Automagically add Google AMP functionality to your site. Tons of Premium Features for FREE. Enable/Disable Post Types, Categories, and Tags.
    18  * Version:             1.5.12
     18 * Version:             1.5.13
    1919 * Author:              Pixelative, Mohsin Rafique
    2020 * Author URI:          https://pixelative.co
     
    5454 * Rename this for your plugin and update it as you release new versions.
    5555 */
    56 define( 'AMP_WP_VERSION', '1.5.12' );
     56define( 'AMP_WP_VERSION', '1.5.13' );
    5757
    5858/**
  • amp-wp/trunk/includes/admin/settings/class-amp-wp-general.php

    r2125154 r2585601  
    1 <?php if ( ! defined( 'ABSPATH' ) ) {
    2     exit;
    3 } // Exit if accessed directly
     1<?php
    42/**
    53 * Amp_WP_General Class
     
    1412 * @author      Pixelative <mohsin@pixelative.co>
    1513 */
     14
     15if ( ! defined( 'ABSPATH' ) ) {
     16    exit;
     17} // Exit if accessed directly.
     18
    1619class Amp_WP_General {
    1720    /**
     
    4548        );
    4649
    47         // Filter -> Add General Settings Tab
     50        // Filter -> Add General Settings Tab.
    4851        add_filter( 'amp_wp_settings_tab_menus', array( $this, 'amp_wp_add_general_tab' ) );
    4952
    50         // Action -> Display General Settings
     53        // Action -> Display General Settings.
    5154        add_action( 'amp_wp_settings_tab_section', array( $this, 'amp_wp_add_general_settings' ) );
    5255
    53         // Action -> Save General Settings
     56        // Action -> Save General Settings.
    5457        add_action( 'amp_wp_save_setting_sections', array( $this, 'amp_wp_save_general_settings' ) );
    5558    }
     
    5861     * Add General Settings Tab
    5962     *
    60      * @since       1.0.4
     63     * @since 1.0.4
    6164     *
    62      * @param   array $tabs  Settings Tab
    63      * @return  array  $tabs Merge array of Settings Tab with General Tab.
     65     * @param array $tabs Settings Tab.
     66     * @return array $tabs Merge array of Settings Tab with General Tab.
    6467     */
    6568    public function amp_wp_add_general_tab( $tabs ) {
    66 
    67             $tabs['general'] = __( '<i class="amp-wp-admin-icon-settings-1"></i><span>General</span>', 'amp-wp' );
    68             return $tabs;
     69        $tabs['general'] = __( '<i class="amp-wp-admin-icon-settings-1"></i><span>General</span>', 'amp-wp' );
     70        return $tabs;
    6971    }
    7072
     
    7577     * the stored settings.
    7678     *
    77      * @since       1.0.4
     79     * @since 1.0.4
    7880     */
    7981    public function amp_wp_add_general_settings() {
    8082
    81         // Get General Settings
     83        // Get General Settings.
    8284        $theme_name           = '';
    8385        $amp_on_home          = '';
     
    9799            $amp_on_taxonomies       = ( isset( $amp_wp_general_settings['amp_on_taxonomies'] ) && ! empty( $amp_wp_general_settings['amp_on_taxonomies'] ) ) ? $amp_wp_general_settings['amp_on_taxonomies'] : array();
    98100            $exclude_urls            = ( isset( $amp_wp_general_settings['exclude_urls'] ) && ! empty( $amp_wp_general_settings['exclude_urls'] ) ) ? $amp_wp_general_settings['exclude_urls'] : '';
    99             $excluded_urls           = ( isset( $amp_wp_general_settings['excluded_urls'] ) && !empty( $amp_wp_general_settings['excluded_urls'] ) ) ? $amp_wp_general_settings['excluded_urls'] : '';
     101            $excluded_urls           = ( isset( $amp_wp_general_settings['excluded_urls'] ) && ! empty( $amp_wp_general_settings['excluded_urls'] ) ) ? $amp_wp_general_settings['excluded_urls'] : '';
    100102            $url_structure           = ( isset( $amp_wp_general_settings ) && ! empty( $amp_wp_general_settings['url_structure'] ) ) ? $amp_wp_general_settings['url_structure'] : 'start-point';
    101             $mobile_auto_redirect    = ( isset( $amp_wp_general_settings['mobile_auto_redirect'] ) && ! empty( $amp_wp_general_settings['mobile_auto_redirect'] ) ) ? intval( $amp_wp_general_settings['mobile_auto_redirect'] ) : '';
     103            $mobile_auto_redirect    = ( isset( $amp_wp_general_settings['mobile_auto_redirect'] ) && ! empty( $amp_wp_general_settings['mobile_auto_redirect'] ) ) ? $amp_wp_general_settings['mobile_auto_redirect'] : '';
    102104            $theme_name              = ( isset( $amp_wp_general_settings['theme_name'] ) && ! empty( $amp_wp_general_settings['theme_name'] ) ) ? esc_attr( $amp_wp_general_settings['theme_name'] ) : '';
    103105        }
    104106
    105         // Load View
     107        // Load View.
    106108        require_once AMP_WP_DIR_PATH . 'admin/partials/settings/amp-wp-admin-general.php';
    107109    }
  • amp-wp/trunk/includes/class-amp-wp-content-sanitizer.php

    r2552932 r2585601  
    333333         * @since   1.5.0
    334334         */
    335         $tokenize_url = wp_parse_url( $url );
     335        $tokenize_url = amp_wp_parse_url( $url );
    336336        if ( $tokenize_url['path'] ) {
    337337            $url_array = explode( '/', $tokenize_url['path'] );
     
    386386        }
    387387
    388         $parsed = wp_parse_url( $url );
     388        $parsed = amp_wp_parse_url( $url );
    389389        $path   = isset( $parsed['path'] ) ? $parsed['path'] : '/';
    390390        $query  = isset( $parsed['query'] ) ? $parsed['query'] : '';
     
    518518        }
    519519
    520         $parsed = wp_parse_url( $url );
     520        $parsed = amp_wp_parse_url( $url );
    521521        if ( empty( $parsed['path'] ) ) {
    522522            return $default;
     
    847847
    848848                                $val    = isset( $element_atts[ $atts['name'] ] ) ? wp_check_invalid_utf8( $element_atts[ $atts['name'] ] ) : null;
    849                                 $parsed = $val ? parse_url( $val ) : array();
     849                                $parsed = $val ? amp_wp_parse_url( $val ) : array();
    850850
    851851                                // Check empty URL value.
     
    983983            $extra_tags = array(
    984984                'script',
     985                'style',
    985986                'svg',
    986987                'canvas',
     
    10531054                    $action_xhr = '';
    10541055                    if ( $action ) {
    1055                         $parsed_action = wp_parse_url( $action );
     1056                        $parsed_action = amp_wp_parse_url( $action );
    10561057                        if ( ! isset( $parsed_action['scheme'] ) && ! empty( $parsed_action['path'] ) ) {
    10571058                            $action_xhr = $parsed_action['path'];
     
    11971198        static $current_url_parsed;
    11981199        if ( ! $current_url_parsed ) {
    1199             $current_url_parsed = wp_parse_url( site_url() );
    1200         }
    1201         $parsed_url = wp_parse_url( $url );
     1200            $current_url_parsed = amp_wp_parse_url( site_url() );
     1201        }
     1202        $parsed_url = amp_wp_parse_url( $url );
    12021203
    12031204        if ( ! isset( $parsed_url['host'] ) || $parsed_url['host'] === $current_url_parsed['host'] ) {
  • amp-wp/trunk/includes/class-amp-wp-plugin-compatibility.php

    r2552932 r2585601  
    847847            $tz       = get_option( 'gmt_offset' );
    848848            $v        = 'ext';
    849             $blog_url = wp_parse_url( site_url() );
     849            $blog_url = amp_wp_parse_url( site_url() );
    850850            $srv      = $blog_url['host'];
    851851            $j        = sprintf( '%s:%s', JETPACK__API_VERSION, JETPACK__VERSION );
     
    903903        $count = count( $matches[1] );
    904904        for ( $row = 0; $row < $count; $row++ ) {
    905             $new_skip_url_array = wp_parse_url( $matches[1][ "$row" ] );
     905            $new_skip_url_array = amp_wp_parse_url( $matches[1][ "$row" ] );
    906906            $args['query-args'] = array( array( 'amp-wp-skip-redirect', true ) );
    907907        }
  • amp-wp/trunk/includes/components/class-amp-wp-iframe-component.php

    r2076574 r2585601  
    331331                    continue;
    332332                }
     333
     334                $this->sanitize( $element );
    333335                $attributes = $instance->filter_attributes( $instance->get_node_attributes( $element ) );
    334336                $attributes = $this->filter_attributes( $attributes );
     
    503505        return $video_id;
    504506    }
     507
     508    /**
     509     * Sanitize iframe element.
     510     *
     511     * @param DOMElement $element
     512     *
     513     * @since 1.5.13
     514     */
     515    protected function sanitize( $element ) {
     516        // Fix: remove aparat iframe extra tags
     517        if ( preg_match( '/aparat/i', $element->parentNode->getAttribute( 'class' ) ) && $element->previousSibling ) {
     518            if ( in_array( $element->previousSibling->tagName, array( 'div', 'span' ), true ) ) {
     519                $element->parentNode->removeChild( $element->previousSibling );
     520            }
     521        }
     522    }
    505523}
    506524
  • amp-wp/trunk/includes/components/class-amp-wp-img-component.php

    r2125154 r2585601  
    324324     */
    325325    public function get_image_dimension( $url ) {
    326        
     326
    327327        $hash_key = 'amp_wp_dimension_' . md5( $url );
    328        
     328
    329329        $dimension = get_transient( $hash_key );
    330330        if ( $dimension ) {
    331331            return $dimension;
    332332        }
    333        
     333
    334334        if ( $normalize_url = $this->normalize_url( $url ) ) {
    335335            $dimension = $this->fetch_image_dimension( $normalize_url );
    336336        } elseif ( $this->is_data_url( $url ) ) {
    337337            if ( $size = @getimagesize( $url ) ) {
    338                 $dimension = [ $size[0], $size[1] ];
    339             }
    340         }
    341        
     338                $dimension = array( $size[0], $size[1] );
     339            }
     340        }
     341
    342342        if ( $dimension ) {
    343343            set_transient( $hash_key, $dimension, HOUR_IN_SECONDS );
     
    351351        return $dimension;
    352352    }
    353    
     353
    354354    /**
    355355     * Is this a data-src URL?
     
    382382            return set_url_scheme( $url, 'http' ); }
    383383
    384         $parsed = wp_parse_url( $url );
     384        // $parsed = wp_parse_url( $url );
     385        $parsed = amp_wp_parse_url( $url );
    385386
    386387        if ( ! isset( $parsed['host'] ) ) {
  • amp-wp/trunk/includes/functions/amp-wp-template-functions.php

    r2552932 r2585601  
    512512            $amp_wp_general_settings = get_option( 'amp_wp_general_settings' );
    513513            if ( isset( $amp_wp_general_settings['mobile_auto_redirect'] ) && ! empty( $amp_wp_general_settings['mobile_auto_redirect'] ) ) {
    514                 $mobile_auto_redirect = intval( $amp_wp_general_settings['mobile_auto_redirect'] );
     514                $mobile_auto_redirect = $amp_wp_general_settings['mobile_auto_redirect'];
    515515            }
    516516        }
     
    10401040                <script type="application/json">
    10411041                {
    1042 
    10431042                    "vars": {
    10441043                        "host": "<?php echo esc_attr( $adobe_host_name ); ?>",
     
    11571156        $amp_site    = '';
    11581157        $current_url = wp_get_referer();
    1159         $site_url    = wp_parse_url( get_site_url() );
     1158        $site_url    = amp_wp_parse_url( get_site_url() );
    11601159        $site_host   = $site_url['host'];
    11611160        $amp_site    = $site_url['scheme'] . '://' . $site_url['host'];
     
    12031202     * Enqueue gutenberg block styles.
    12041203     *
    1205      * @param string $content
     1204     * @param string $content Content of the current post.
    12061205     *
    12071206     * @since 1.4.0
  • amp-wp/trunk/includes/functions/amp-wp-theme-functions.php

    r2552932 r2585601  
    396396     */
    397397    function amp_wp_get_canonical_url() {
    398         $parse         = parse_url( home_url() );
     398        $parse         = amp_wp_parse_url( home_url() );
    399399        list( $url )   = explode( '?', $_SERVER['REQUEST_URI'] );
    400400        $valid_queries = array_intersect_key(
     
    23182318     * @since 1.0.0
    23192319     *
    2320      * @return int
     2320     * @return string
    23212321     */
    23222322    function amp_wp_get_comment_link() {
     
    23332333     * Retrieve the HTML Content for Reply to Comment Link.
    23342334     *
    2335      * @param   array $args @see comment_reply_link for documentation
     2335     * @param array $args @see comment_reply_link for documentation.
    23362336     *
    23372337     * @version 1.0.0
  • amp-wp/trunk/includes/functions/amp-wp-third-party-plugins-functions.php

    r2552932 r2585601  
    9898
    9999$amp_wp_third_party_plugins_support_settings = get_option( 'amp_wp_third_party_plugins_support_settings' );
    100 if ( 'below_the_content' == $amp_wp_third_party_plugins_support_settings['onesignal_position'] ) {
     100if ( isset( $amp_wp_third_party_plugins_support_settings['onesignal_position'] ) && 'below_the_content' == $amp_wp_third_party_plugins_support_settings['onesignal_position'] ) {
    101101    add_action( 'amp_wp_post_content_below', 'amp_wp_onesignal_notifications_widget' );
    102 } elseif ( 'above_the_content' == $amp_wp_third_party_plugins_support_settings['onesignal_position'] ) {
     102} elseif ( isset( $amp_wp_third_party_plugins_support_settings['onesignal_position'] ) && 'above_the_content' == $amp_wp_third_party_plugins_support_settings['onesignal_position'] ) {
    103103    add_action( 'amp_wp_post_content_before', 'amp_wp_onesignal_notifications_widget' );
    104104}
  • amp-wp/trunk/includes/functions/amp-wp-utility-functions.php

    r2125154 r2585601  
    333333        $amp_url = get_permalink( $post_id );
    334334    } else {
    335         $parsed_url = wp_parse_url( get_permalink( $post_id ) );
     335        $parsed_url = amp_wp_parse_url( get_permalink( $post_id ) );
    336336        $structure  = get_option( 'permalink_structure' );
    337337        if ( empty( $structure ) || ! empty( $parsed_url['query'] ) || is_post_type_hierarchical( get_post_type( $post_id ) ) ) {
     
    399399    }
    400400endif;
     401
     402
     403if ( ! function_exists( 'amp_wp_parse_url' ) ) {
     404    /**
     405     * Parse a URL and return its components.
     406     *
     407     * @param string $url Parsing URL.
     408     * @param int    $component Components to be parse from the URL.
     409     *
     410     * @since 1.5.13
     411     * @return array|string|false
     412     */
     413    function amp_wp_parse_url( $url, $component = -1 ) {
     414        $encoded_url = preg_replace_callback(
     415            '%[^:/@?&=#]+%usD',
     416            function ( $matches ) {
     417                return urlencode( $matches[0] );
     418            },
     419            $url
     420        );
     421
     422        $parts = wp_parse_url( $encoded_url, $component );
     423        if ( false === $parts ) {
     424            return array();
     425        }
     426
     427        if ( ! empty( $parts ) && is_array( $parts ) ) {
     428            $parts = array_map( 'urldecode', $parts );
     429        }
     430
     431        return $parts;
     432    }
     433}
  • amp-wp/trunk/languages/amp-wp.pot

    r2552932 r2585601  
    44"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
    55"Project-Id-Version: AMP WP\n"
    6 "POT-Creation-Date: 2021-06-23 19:27+0500\n"
     6"POT-Creation-Date: 2021-08-19 20:47+0500\n"
    77"PO-Revision-Date: 2019-11-18 07:46+0500\n"
    88"Last-Translator: \n"
     
    6666
    6767#: admin/partials/amp-wp-admin-header.php:62
    68 #: admin/partials/amp-wp-admin-system-status.php:19
    69 #: admin/partials/amp-wp-admin-system-status.php:571
     68#: admin/partials/amp-wp-admin-system-status.php:18
     69#: admin/partials/amp-wp-admin-system-status.php:570
    7070msgid "System Status"
    7171msgstr ""
     
    113113msgstr ""
    114114
    115 #: admin/partials/amp-wp-admin-system-status.php:21
    116 #: admin/partials/amp-wp-admin-system-status.php:573
     115#: admin/partials/amp-wp-admin-system-status.php:20
     116#: admin/partials/amp-wp-admin-system-status.php:572
    117117msgid "Get System Report"
    118118msgstr ""
    119119
    120 #: admin/partials/amp-wp-admin-system-status.php:26
     120#: admin/partials/amp-wp-admin-system-status.php:25
    121121msgid ""
    122122"Click the Get System Report button at the top right to produce a report, "
     
    124124msgstr ""
    125125
    126 #: admin/partials/amp-wp-admin-system-status.php:30
     126#: admin/partials/amp-wp-admin-system-status.php:29
    127127msgid "Copied!"
    128128msgstr ""
    129129
    130 #: admin/partials/amp-wp-admin-system-status.php:30
     130#: admin/partials/amp-wp-admin-system-status.php:29
    131131msgid "Copy for Support"
    132132msgstr ""
    133133
    134 #: admin/partials/amp-wp-admin-system-status.php:37
     134#: admin/partials/amp-wp-admin-system-status.php:36
    135135msgid "WordPress Environment"
    136136msgstr ""
    137137
     138#: admin/partials/amp-wp-admin-system-status.php:41
     139msgid "Home URL"
     140msgstr ""
     141
    138142#: admin/partials/amp-wp-admin-system-status.php:42
    139 msgid "Home URL"
    140 msgstr ""
    141 
    142 #: admin/partials/amp-wp-admin-system-status.php:43
    143143msgid "The URL of your site's homepage."
    144144msgstr ""
    145145
     146#: admin/partials/amp-wp-admin-system-status.php:46
     147msgid "Site URL"
     148msgstr ""
     149
    146150#: admin/partials/amp-wp-admin-system-status.php:47
    147 msgid "Site URL"
    148 msgstr ""
    149 
    150 #: admin/partials/amp-wp-admin-system-status.php:48
    151151msgid "The root URL of your site."
    152152msgstr ""
    153153
     154#: admin/partials/amp-wp-admin-system-status.php:51
     155msgid "AMP WP Version"
     156msgstr ""
     157
    154158#: admin/partials/amp-wp-admin-system-status.php:52
    155 msgid "AMP WP Version"
    156 msgstr ""
    157 
    158 #: admin/partials/amp-wp-admin-system-status.php:53
    159159msgid "The version of AMP WP installed on your site."
    160160msgstr ""
    161161
     162#: admin/partials/amp-wp-admin-system-status.php:56
     163msgid "WordPress Version"
     164msgstr ""
     165
    162166#: admin/partials/amp-wp-admin-system-status.php:57
    163 msgid "WordPress Version"
    164 msgstr ""
    165 
    166 #: admin/partials/amp-wp-admin-system-status.php:58
    167167msgid "The version of WordPress installed on your site."
    168168msgstr ""
    169169
    170 #: admin/partials/amp-wp-admin-system-status.php:77
     170#: admin/partials/amp-wp-admin-system-status.php:76
    171171#, php-format
    172172msgid "%1$s - There is a newer version of WordPress available (%2$s)"
    173173msgstr ""
    174174
     175#: admin/partials/amp-wp-admin-system-status.php:84
     176msgid "WordPress Multisite"
     177msgstr ""
     178
    175179#: admin/partials/amp-wp-admin-system-status.php:85
    176 msgid "WordPress Multisite"
    177 msgstr ""
    178 
    179 #: admin/partials/amp-wp-admin-system-status.php:86
    180180msgid "Whether or not you have WordPress Multisite enabled."
    181181msgstr ""
    182182
     183#: admin/partials/amp-wp-admin-system-status.php:89
     184msgid "WordPress Memory Limit"
     185msgstr ""
     186
    183187#: admin/partials/amp-wp-admin-system-status.php:90
    184 msgid "WordPress Memory Limit"
    185 msgstr ""
    186 
    187 #: admin/partials/amp-wp-admin-system-status.php:91
    188188msgid "The maximum amount of memory (RAM) that your site can use at one time."
    189189msgstr ""
    190190
    191 #: admin/partials/amp-wp-admin-system-status.php:96
     191#: admin/partials/amp-wp-admin-system-status.php:95
    192192#, php-format
    193193msgid "%1$s - We recommend setting memory to at least 64MB. See: %2$s"
    194194msgstr ""
    195195
    196 #: admin/partials/amp-wp-admin-system-status.php:96
     196#: admin/partials/amp-wp-admin-system-status.php:95
    197197msgid "Increasing memory allocated to PHP"
    198198msgstr ""
    199199
     200#: admin/partials/amp-wp-admin-system-status.php:103
     201msgid "WP Debug Mode"
     202msgstr ""
     203
    200204#: admin/partials/amp-wp-admin-system-status.php:104
    201 msgid "WP Debug Mode"
    202 msgstr ""
    203 
    204 #: admin/partials/amp-wp-admin-system-status.php:105
    205205msgid "Displays whether or not WordPress is in Debug Mode."
    206206msgstr ""
    207207
     208#: admin/partials/amp-wp-admin-system-status.php:114
     209msgid "WordPress Cron"
     210msgstr ""
     211
    208212#: admin/partials/amp-wp-admin-system-status.php:115
    209 msgid "WordPress Cron"
    210 msgstr ""
    211 
    212 #: admin/partials/amp-wp-admin-system-status.php:116
    213213msgid "Displays whether or not WP Cron Jobs are enabled."
    214214msgstr ""
    215215
     216#: admin/partials/amp-wp-admin-system-status.php:125
     217msgid "Language"
     218msgstr ""
     219
    216220#: admin/partials/amp-wp-admin-system-status.php:126
    217 msgid "Language"
    218 msgstr ""
    219 
    220 #: admin/partials/amp-wp-admin-system-status.php:127
    221221msgid "The current language used by WordPress. Default = English"
    222222msgstr ""
    223223
     224#: admin/partials/amp-wp-admin-system-status.php:130
     225msgid "External Object Cache"
     226msgstr ""
     227
    224228#: admin/partials/amp-wp-admin-system-status.php:131
    225 msgid "External Object Cache"
    226 msgstr ""
    227 
    228 #: admin/partials/amp-wp-admin-system-status.php:132
    229229msgid "Displays whether or not WordPress is using an external object cache."
    230230msgstr ""
    231231
    232 #: admin/partials/amp-wp-admin-system-status.php:149
     232#: admin/partials/amp-wp-admin-system-status.php:148
    233233msgid "Server Environment"
    234234msgstr ""
    235235
     236#: admin/partials/amp-wp-admin-system-status.php:153
     237msgid "Server Info:"
     238msgstr ""
     239
    236240#: admin/partials/amp-wp-admin-system-status.php:154
    237 msgid "Server Info:"
    238 msgstr ""
    239 
    240 #: admin/partials/amp-wp-admin-system-status.php:155
    241241msgid "Information about the web server that is currently hosting your site."
    242242msgstr ""
    243243
     244#: admin/partials/amp-wp-admin-system-status.php:158
     245msgid "PHP Version:"
     246msgstr ""
     247
    244248#: admin/partials/amp-wp-admin-system-status.php:159
    245 msgid "PHP Version:"
    246 msgstr ""
    247 
    248 #: admin/partials/amp-wp-admin-system-status.php:160
    249249msgid "The version of PHP installed on your hosting server."
    250250msgstr ""
    251251
    252 #: admin/partials/amp-wp-admin-system-status.php:166
     252#: admin/partials/amp-wp-admin-system-status.php:165
    253253msgid "WordPress Requirements"
    254254msgstr ""
    255255
    256 #: admin/partials/amp-wp-admin-system-status.php:170
     256#: admin/partials/amp-wp-admin-system-status.php:169
    257257msgid ""
    258258"AMP WP will run under this version of PHP, however, it has reached end of "
     
    261261msgstr ""
    262262
    263 #: admin/partials/amp-wp-admin-system-status.php:172
     263#: admin/partials/amp-wp-admin-system-status.php:171
    264264msgid ""
    265265"WordPress recommend PHP version 7.2 or above for greater performance and "
     
    267267msgstr ""
    268268
     269#: admin/partials/amp-wp-admin-system-status.php:181
     270msgid "PHP Post Max Size:"
     271msgstr ""
     272
    269273#: admin/partials/amp-wp-admin-system-status.php:182
    270 msgid "PHP Post Max Size:"
    271 msgstr ""
    272 
    273 #: admin/partials/amp-wp-admin-system-status.php:183
    274274msgid "The largest file size that can be contained in one post."
    275275msgstr ""
    276276
     277#: admin/partials/amp-wp-admin-system-status.php:186
     278msgid "PHP Time Limit:"
     279msgstr ""
     280
    277281#: admin/partials/amp-wp-admin-system-status.php:187
    278 msgid "PHP Time Limit:"
    279 msgstr ""
    280 
    281 #: admin/partials/amp-wp-admin-system-status.php:188
    282282msgid ""
    283283"The amount of time (in seconds) that your site will spend on a single "
     
    286286
    287287#. translators: %1$s: Current value. %2$s: URL.
    288 #: admin/partials/amp-wp-admin-system-status.php:195
     288#: admin/partials/amp-wp-admin-system-status.php:194
    289289#, php-format
    290290msgid ""
     
    294294msgstr ""
    295295
     296#: admin/partials/amp-wp-admin-system-status.php:202
     297msgid "PHP Max Input Vars:"
     298msgstr ""
     299
    296300#: admin/partials/amp-wp-admin-system-status.php:203
    297 msgid "PHP Max Input Vars:"
    298 msgstr ""
    299 
    300 #: admin/partials/amp-wp-admin-system-status.php:204
    301 #: admin/partials/amp-wp-admin-system-status.php:247
    302 #: admin/partials/amp-wp-admin-system-status.php:279
     301#: admin/partials/amp-wp-admin-system-status.php:246
     302#: admin/partials/amp-wp-admin-system-status.php:278
    303303msgid ""
    304304"The maximum number of variables your server can use for a single function to "
     
    307307
    308308#. translators: %1$s: Current value. $2%s: Recommended value. %3$s: URL.
    309 #: admin/partials/amp-wp-admin-system-status.php:227
    310 #: admin/partials/amp-wp-admin-system-status.php:270
    311 #: admin/partials/amp-wp-admin-system-status.php:302
     309#: admin/partials/amp-wp-admin-system-status.php:226
     310#: admin/partials/amp-wp-admin-system-status.php:269
     311#: admin/partials/amp-wp-admin-system-status.php:301
    312312#, php-format
    313313msgid ""
     
    317317msgstr ""
    318318
     319#: admin/partials/amp-wp-admin-system-status.php:234
     320msgid "cURL version"
     321msgstr ""
     322
    319323#: admin/partials/amp-wp-admin-system-status.php:235
    320 msgid "cURL version"
    321 msgstr ""
    322 
    323 #: admin/partials/amp-wp-admin-system-status.php:236
    324324msgid "The version of cURL installed on your server."
    325325msgstr ""
    326326
     327#: admin/partials/amp-wp-admin-system-status.php:239
     328msgid "SUHOSIN Installed:"
     329msgstr ""
     330
    327331#: admin/partials/amp-wp-admin-system-status.php:240
    328 msgid "SUHOSIN Installed:"
    329 msgstr ""
    330 
    331 #: admin/partials/amp-wp-admin-system-status.php:241
    332332msgid ""
    333333"Suhosin is an advanced protection system for PHP installations. It was "
     
    339339msgstr ""
    340340
    341 #: admin/partials/amp-wp-admin-system-status.php:246
     341#: admin/partials/amp-wp-admin-system-status.php:245
    342342msgid "Suhosin Post Max Vars"
    343343msgstr ""
    344344
    345 #: admin/partials/amp-wp-admin-system-status.php:278
     345#: admin/partials/amp-wp-admin-system-status.php:277
    346346msgid "Suhosin Request Max Vars:"
    347347msgstr ""
    348348
     349#: admin/partials/amp-wp-admin-system-status.php:309
     350msgid "Suhosin Post Max Value Length:"
     351msgstr ""
     352
    349353#: admin/partials/amp-wp-admin-system-status.php:310
    350 msgid "Suhosin Post Max Value Length:"
    351 msgstr ""
    352 
    353 #: admin/partials/amp-wp-admin-system-status.php:311
    354354msgid ""
    355355"Defines the maximum length of a variable that is registered through a POST "
     
    358358
    359359#. translators: %1$s: Current value. $2%s: Recommended value. %3$s: URL.
    360 #: admin/partials/amp-wp-admin-system-status.php:319
     360#: admin/partials/amp-wp-admin-system-status.php:318
    361361#, php-format
    362362msgid ""
     
    367367msgstr ""
    368368
     369#: admin/partials/amp-wp-admin-system-status.php:328
     370msgid "ZipArchive:"
     371msgstr ""
     372
    369373#: admin/partials/amp-wp-admin-system-status.php:329
    370 msgid "ZipArchive:"
    371 msgstr ""
    372 
    373 #: admin/partials/amp-wp-admin-system-status.php:330
    374374msgid ""
    375375"ZipArchive is required for importing AMP WP Option Settings. They are used "
     
    377377msgstr ""
    378378
     379#: admin/partials/amp-wp-admin-system-status.php:333
     380msgid "MySQL Version:"
     381msgstr ""
     382
    379383#: admin/partials/amp-wp-admin-system-status.php:334
    380 msgid "MySQL Version:"
    381 msgstr ""
    382 
    383 #: admin/partials/amp-wp-admin-system-status.php:335
    384384msgid "The version of MySQL installed on your hosting server."
    385385msgstr ""
    386386
    387 #: admin/partials/amp-wp-admin-system-status.php:340
     387#: admin/partials/amp-wp-admin-system-status.php:339
    388388#, php-format
    389389msgid "%1$s - We recommend a minimum MySQL version of 5.6. See: %2$s"
    390390msgstr ""
    391391
    392 #: admin/partials/amp-wp-admin-system-status.php:340
     392#: admin/partials/amp-wp-admin-system-status.php:339
    393393msgid "WordPress requirements"
    394394msgstr ""
    395395
     396#: admin/partials/amp-wp-admin-system-status.php:347
     397msgid "Max Upload Size:"
     398msgstr ""
     399
    396400#: admin/partials/amp-wp-admin-system-status.php:348
    397 msgid "Max Upload Size:"
    398 msgstr ""
    399 
    400 #: admin/partials/amp-wp-admin-system-status.php:349
    401401msgid ""
    402402"The largest file size that can be uploaded to your WordPress installation."
    403403msgstr ""
    404404
     405#: admin/partials/amp-wp-admin-system-status.php:352
     406msgid "Default timezone is UTC"
     407msgstr ""
     408
    405409#: admin/partials/amp-wp-admin-system-status.php:353
    406 msgid "Default timezone is UTC"
    407 msgstr ""
    408 
    409 #: admin/partials/amp-wp-admin-system-status.php:354
    410410msgid "The default timezone for your server."
    411411msgstr ""
    412412
    413 #: admin/partials/amp-wp-admin-system-status.php:359
     413#: admin/partials/amp-wp-admin-system-status.php:358
    414414#, php-format
    415415msgid "Default timezone is %s - it should be UTC"
    416416msgstr ""
    417417
     418#: admin/partials/amp-wp-admin-system-status.php:366
     419msgid "DOMDocument:"
     420msgstr ""
     421
    418422#: admin/partials/amp-wp-admin-system-status.php:367
    419 msgid "DOMDocument:"
    420 msgstr ""
    421 
    422 #: admin/partials/amp-wp-admin-system-status.php:368
    423423msgid "DOMDocument is required for document traversing to properly function."
    424424msgstr ""
    425425
    426 #: admin/partials/amp-wp-admin-system-status.php:375
     426#: admin/partials/amp-wp-admin-system-status.php:374
    427427#, php-format
    428428msgid ""
     
    431431msgstr ""
    432432
     433#: admin/partials/amp-wp-admin-system-status.php:380
     434msgid "GZip"
     435msgstr ""
     436
    433437#: admin/partials/amp-wp-admin-system-status.php:381
    434 msgid "GZip"
    435 msgstr ""
    436 
    437 #: admin/partials/amp-wp-admin-system-status.php:382
    438438msgid "GZip (gzopen) is used to make your site load faster."
    439439msgstr ""
    440440
    441 #: admin/partials/amp-wp-admin-system-status.php:389
     441#: admin/partials/amp-wp-admin-system-status.php:388
    442442#, php-format
    443443msgid ""
     
    446446msgstr ""
    447447
     448#: admin/partials/amp-wp-admin-system-status.php:394
     449msgid "WP Remote Get:"
     450msgstr ""
     451
    448452#: admin/partials/amp-wp-admin-system-status.php:395
    449 msgid "WP Remote Get:"
    450 msgstr ""
    451 
    452 #: admin/partials/amp-wp-admin-system-status.php:396
    453 #: admin/partials/amp-wp-admin-system-status.php:410
     453#: admin/partials/amp-wp-admin-system-status.php:409
    454454msgid ""
    455455"AMP WP uses this method to communicate with different APIs, e.g. Google, "
     
    457457msgstr ""
    458458
    459 #: admin/partials/amp-wp-admin-system-status.php:403
    460 #: admin/partials/amp-wp-admin-system-status.php:417
     459#: admin/partials/amp-wp-admin-system-status.php:402
     460#: admin/partials/amp-wp-admin-system-status.php:416
    461461#, php-format
    462462msgid "%s failed. Contact your hosting provider."
    463463msgstr ""
    464464
    465 #: admin/partials/amp-wp-admin-system-status.php:409
     465#: admin/partials/amp-wp-admin-system-status.php:408
    466466msgid "WP Remote Post:"
    467467msgstr ""
    468468
     469#: admin/partials/amp-wp-admin-system-status.php:422
     470msgid "GD Library:"
     471msgstr ""
     472
    469473#: admin/partials/amp-wp-admin-system-status.php:423
    470 msgid "GD Library:"
    471 msgstr ""
    472 
    473 #: admin/partials/amp-wp-admin-system-status.php:424
    474474msgid ""
    475475"AMP WP uses this library to resize images and speed up your site's loading "
     
    477477msgstr ""
    478478
    479 #: admin/partials/amp-wp-admin-system-status.php:427
     479#: admin/partials/amp-wp-admin-system-status.php:426
    480480msgid "Not Installed"
    481481msgstr ""
    482482
    483 #: admin/partials/amp-wp-admin-system-status.php:429
     483#: admin/partials/amp-wp-admin-system-status.php:428
    484484msgid "Installed"
    485485msgstr ""
    486486
    487 #: admin/partials/amp-wp-admin-system-status.php:446
     487#: admin/partials/amp-wp-admin-system-status.php:445
    488488msgid "Theme"
    489489msgstr ""
    490490
    491 #: admin/partials/amp-wp-admin-system-status.php:451
     491#: admin/partials/amp-wp-admin-system-status.php:450
    492492#: includes/admin/settings/class-amp-wp-translation.php:135
    493493#: includes/admin/settings/class-amp-wp-translation.php:136
     
    496496msgstr ""
    497497
    498 #: admin/partials/amp-wp-admin-system-status.php:452
     498#: admin/partials/amp-wp-admin-system-status.php:451
    499499msgid "The name of the current active theme."
    500500msgstr ""
    501501
     502#: admin/partials/amp-wp-admin-system-status.php:455
     503msgid "Version"
     504msgstr ""
     505
    502506#: admin/partials/amp-wp-admin-system-status.php:456
    503 msgid "Version"
    504 msgstr ""
    505 
    506 #: admin/partials/amp-wp-admin-system-status.php:457
    507507msgid "The installed version of the current active theme."
    508508msgstr ""
     
    510510#. translators: %s: theme latest version
    511511#. translators: %s: parent theme latest version
    512 #: admin/partials/amp-wp-admin-system-status.php:464
    513 #: admin/partials/amp-wp-admin-system-status.php:505
     512#: admin/partials/amp-wp-admin-system-status.php:463
     513#: admin/partials/amp-wp-admin-system-status.php:504
    514514#, php-format
    515515msgid "%s is available"
    516516msgstr ""
    517517
     518#: admin/partials/amp-wp-admin-system-status.php:470
     519msgid "Author URL"
     520msgstr ""
     521
    518522#: admin/partials/amp-wp-admin-system-status.php:471
    519 msgid "Author URL"
    520 msgstr ""
    521 
    522 #: admin/partials/amp-wp-admin-system-status.php:472
    523523msgid "The theme developers URL."
    524524msgstr ""
    525525
     526#: admin/partials/amp-wp-admin-system-status.php:476
     527msgid "Child theme"
     528msgstr ""
     529
    526530#: admin/partials/amp-wp-admin-system-status.php:477
    527 msgid "Child theme"
    528 msgstr ""
    529 
    530 #: admin/partials/amp-wp-admin-system-status.php:478
    531531msgid "Displays whether or not the current theme is a child theme."
    532532msgstr ""
    533533
    534 #: admin/partials/amp-wp-admin-system-status.php:485
     534#: admin/partials/amp-wp-admin-system-status.php:484
    535535#, php-format
    536536msgid ""
     
    540540msgstr ""
    541541
     542#: admin/partials/amp-wp-admin-system-status.php:492
     543msgid "Parent Theme Name"
     544msgstr ""
     545
    542546#: admin/partials/amp-wp-admin-system-status.php:493
    543 msgid "Parent Theme Name"
    544 msgstr ""
    545 
    546 #: admin/partials/amp-wp-admin-system-status.php:494
    547547msgid "The name of the parent theme."
    548548msgstr ""
    549549
     550#: admin/partials/amp-wp-admin-system-status.php:497
     551msgid "Parent Theme Version"
     552msgstr ""
     553
    550554#: admin/partials/amp-wp-admin-system-status.php:498
    551 msgid "Parent Theme Version"
    552 msgstr ""
    553 
    554 #: admin/partials/amp-wp-admin-system-status.php:499
    555555msgid "The installed version of the parent theme."
    556556msgstr ""
    557557
     558#: admin/partials/amp-wp-admin-system-status.php:510
     559msgid "Parent Theme Author URL"
     560msgstr ""
     561
    558562#: admin/partials/amp-wp-admin-system-status.php:511
    559 msgid "Parent Theme Author URL"
    560 msgstr ""
    561 
    562 #: admin/partials/amp-wp-admin-system-status.php:512
    563563msgid "The parent theme developers URL."
    564564msgstr ""
    565565
    566 #: admin/partials/amp-wp-admin-system-status.php:530
     566#: admin/partials/amp-wp-admin-system-status.php:529
    567567msgid "Active Plugins"
    568568msgstr ""
    569569
    570 #: admin/partials/amp-wp-admin-system-status.php:547
     570#: admin/partials/amp-wp-admin-system-status.php:546
    571571msgid "Visit plugin homepage"
    572572msgstr ""
    573573
    574574#. translators: plugin author.
    575 #: admin/partials/amp-wp-admin-system-status.php:557
     575#: admin/partials/amp-wp-admin-system-status.php:556
    576576#, php-format
    577577msgid "by %s"
     
    589589#: admin/partials/settings/amp-wp-admin-gdpr.php:19
    590590#: admin/partials/settings/amp-wp-admin-gdpr.php:90
    591 #: admin/partials/settings/amp-wp-admin-general.php:22
    592 #: admin/partials/settings/amp-wp-admin-general.php:185
     591#: admin/partials/settings/amp-wp-admin-general.php:23
     592#: admin/partials/settings/amp-wp-admin-general.php:181
    593593#: admin/partials/settings/amp-wp-admin-layout.php:22
    594594#: admin/partials/settings/amp-wp-admin-layout.php:360
     
    627627#: admin/partials/settings/amp-wp-admin-analytics.php:349
    628628#: admin/partials/settings/amp-wp-admin-gdpr.php:34
    629 #: admin/partials/settings/amp-wp-admin-general.php:36
    630 #: admin/partials/settings/amp-wp-admin-general.php:45
    631 #: admin/partials/settings/amp-wp-admin-general.php:142
    632629#: admin/partials/settings/amp-wp-admin-layout.php:35
    633630#: admin/partials/settings/amp-wp-admin-layout.php:44
     
    802799msgstr ""
    803800
    804 #: admin/partials/settings/amp-wp-admin-general.php:19
    805 #: admin/partials/settings/amp-wp-admin-general.php:182
     801#: admin/partials/settings/amp-wp-admin-general.php:20
     802#: admin/partials/settings/amp-wp-admin-general.php:178
    806803#: includes/admin/welcome/class-amp-wp-getting-started.php:64
    807804msgid "General Settings"
    808805msgstr ""
    809806
    810 #: admin/partials/settings/amp-wp-admin-general.php:28
     807#: admin/partials/settings/amp-wp-admin-general.php:29
    811808#: admin/partials/welcome/amp-wp-admin-features.php:170
    812809msgid "Enable/Disable AMP"
    813810msgstr ""
    814811
    815 #: admin/partials/settings/amp-wp-admin-general.php:32
     812#: admin/partials/settings/amp-wp-admin-general.php:33
    816813msgid "Enable AMP on Home Page"
    817814msgstr ""
    818815
    819 #: admin/partials/settings/amp-wp-admin-general.php:41
     816#: admin/partials/settings/amp-wp-admin-general.php:42
    820817msgid "Enable AMP on Search Page"
    821818msgstr ""
    822819
    823 #: admin/partials/settings/amp-wp-admin-general.php:54
     820#: admin/partials/settings/amp-wp-admin-general.php:55
    824821msgid "Disable AMP on Post Types"
    825822msgstr ""
    826823
    827 #: admin/partials/settings/amp-wp-admin-general.php:72
     824#: admin/partials/settings/amp-wp-admin-general.php:73
    828825msgid "Disable AMP on Taxonomies"
    829826msgstr ""
    830827
    831 #: admin/partials/settings/amp-wp-admin-general.php:86
     828#: admin/partials/settings/amp-wp-admin-general.php:87
    832829msgid "Exclude URLs From Auto Converting:"
    833830msgstr ""
    834831
    835 #: admin/partials/settings/amp-wp-admin-general.php:90
     832#: admin/partials/settings/amp-wp-admin-general.php:91
    836833msgid ""
    837834"You can exclude URLs of your site to prevent converting them into AMP URL "
     
    839836msgstr ""
    840837
    841 #: admin/partials/settings/amp-wp-admin-general.php:91
     838#: admin/partials/settings/amp-wp-admin-general.php:92
    842839msgid ""
    843840"You can use <strong>*</strong> in the end of URL to exclude all URLs that "
     
    845842msgstr ""
    846843
    847 #: admin/partials/settings/amp-wp-admin-general.php:96
     844#: admin/partials/settings/amp-wp-admin-general.php:97
    848845msgid "Exclude AMP by URL:"
    849846msgstr ""
    850847
    851 #: admin/partials/settings/amp-wp-admin-general.php:100
     848#: admin/partials/settings/amp-wp-admin-general.php:101
    852849msgid ""
    853850"You can disable AMP version of the page. e.g. /product/* will disable all "
     
    855852msgstr ""
    856853
    857 #: admin/partials/settings/amp-wp-admin-general.php:109
     854#: admin/partials/settings/amp-wp-admin-general.php:110
    858855msgid "AMP Permalink"
    859856msgstr ""
    860857
    861 #: admin/partials/settings/amp-wp-admin-general.php:113
     858#: admin/partials/settings/amp-wp-admin-general.php:114
    862859msgid "AMP URL Format"
    863860msgstr ""
    864861
    865 #: admin/partials/settings/amp-wp-admin-general.php:116
     862#: admin/partials/settings/amp-wp-admin-general.php:117
    866863msgid "Start Point - At the beginning of the URL"
    867864msgstr ""
    868865
    869 #: admin/partials/settings/amp-wp-admin-general.php:117
     866#: admin/partials/settings/amp-wp-admin-general.php:118
    870867msgid "End Point - At the end of the URL"
    871868msgstr ""
    872869
    873 #: admin/partials/settings/amp-wp-admin-general.php:120
     870#: admin/partials/settings/amp-wp-admin-general.php:121
    874871msgid "Start Point:"
    875872msgstr ""
    876873
    877 #: admin/partials/settings/amp-wp-admin-general.php:120
    878 msgid "//yoursite.com/<strong>amp</strong>/post/"
    879 msgstr ""
    880 
    881 #: admin/partials/settings/amp-wp-admin-general.php:121
     874#: admin/partials/settings/amp-wp-admin-general.php:122
    882875msgid "End Point:"
    883876msgstr ""
    884877
    885 #: admin/partials/settings/amp-wp-admin-general.php:121
    886 msgid "//yoursite.com/post/<strong>amp</strong>/"
    887 msgstr ""
    888 
    889 #: admin/partials/settings/amp-wp-admin-general.php:130
     878#: admin/partials/settings/amp-wp-admin-general.php:131
    890879msgid "Mobile Redirect"
    891880msgstr ""
    892881
    893 #: admin/partials/settings/amp-wp-admin-general.php:134
     882#: admin/partials/settings/amp-wp-admin-general.php:135
    894883msgid "Automatically Redirect Users to AMP Version:"
    895884msgstr ""
    896885
    897 #: admin/partials/settings/amp-wp-admin-general.php:145
     886#: admin/partials/settings/amp-wp-admin-general.php:141
    898887msgid ""
    899888"This will automatically redirect all mobile users to the AMP version of the "
     
    901890msgstr ""
    902891
    903 #: admin/partials/settings/amp-wp-admin-general.php:153
     892#: admin/partials/settings/amp-wp-admin-general.php:149
    904893msgid "Theme Settings"
    905894msgstr ""
    906895
    907 #: admin/partials/settings/amp-wp-admin-general.php:172
     896#: admin/partials/settings/amp-wp-admin-general.php:168
    908897msgid "More themes coming soon."
    909898msgstr ""
     
    13151304#: admin/partials/settings/amp-wp-admin-translation.php:143
    13161305#, php-format
    1317 msgid "%s1 is author name and %s2 is post publish date."
     1306msgid "%1$s1 is author name and %2$s2 is post publish date."
    13181307msgstr ""
    13191308
     
    13521341#: admin/partials/settings/amp-wp-admin-translation.php:140
    13531342#, php-format
    1354 msgid "By %s1 on %s2:"
     1343msgid "By %1$s1 on %2$s2:"
    13551344msgstr ""
    13561345
     
    17721761msgstr ""
    17731762
    1774 #: includes/admin/settings/class-amp-wp-general.php:35
     1763#: includes/admin/settings/class-amp-wp-general.php:38
    17751764msgid "Global theme"
    17761765msgstr ""
    17771766
    1778 #: includes/admin/settings/class-amp-wp-general.php:36
     1767#: includes/admin/settings/class-amp-wp-general.php:39
    17791768msgid ""
    17801769"Select design for your AMP pages, from the list of AMP WP theme plugins "
     
    17841773msgstr ""
    17851774
    1786 #: includes/admin/settings/class-amp-wp-general.php:42
     1775#: includes/admin/settings/class-amp-wp-general.php:45
    17871776msgid "tez"
    17881777msgstr ""
    17891778
    1790 #: includes/admin/settings/class-amp-wp-general.php:67
     1779#: includes/admin/settings/class-amp-wp-general.php:69
    17911780msgid "<i class=\"amp-wp-admin-icon-settings-1\"></i><span>General</span>"
    17921781msgstr ""
     
    22382227
    22392228#: includes/functions/amp-wp-template-functions.php:326
    2240 #: includes/functions/amp-wp-template-functions.php:1079
     2229#: includes/functions/amp-wp-template-functions.php:1078
    22412230msgid "This website uses cookies."
    22422231msgstr ""
     
    22442233#: includes/functions/amp-wp-template-functions.php:327
    22452234#: includes/functions/amp-wp-template-functions.php:332
    2246 #: includes/functions/amp-wp-template-functions.php:1080
    2247 #: includes/functions/amp-wp-template-functions.php:1116
     2235#: includes/functions/amp-wp-template-functions.php:1079
     2236#: includes/functions/amp-wp-template-functions.php:1115
    22482237msgid "Accept"
    22492238msgstr ""
     
    22622251
    22632252#: includes/functions/amp-wp-template-functions.php:333
    2264 #: includes/functions/amp-wp-template-functions.php:1117
     2253#: includes/functions/amp-wp-template-functions.php:1116
    22652254msgid "Reject"
    22662255msgstr ""
  • amp-wp/trunk/public/class-amp-wp-public.php

    r2552932 r2585601  
    900900
    901901    /**
    902      * Redirect Users to AMP Version of the Page Automatically
     902     * Redirect users to AMP version of the page automatically.
    903903     *
    904904     * @access  public
     
    982982            return;
    983983        }
    984         // Global $wp_filesystem.
     984
    985985        $script = amp_wp_file_get_contents( amp_wp_min_suffix( AMP_WP_DIR_PATH . 'public/js/mobile_redirect', '.js' ) );
    986986        $script = str_replace( '%%amp_permalink%%', $amp_permalink, $script );
  • amp-wp/trunk/public/css/themes/tez/pages/archive/archive.css

    r2552932 r2585601  
    1717  color: #ffffff;
    1818}
     19.archive-wrapper a {
     20  color: #ffffff;
     21}
     22.archive-wrapper a:hover {
     23  text-decoration: none;
     24}
  • amp-wp/trunk/public/css/themes/tez/pages/archive/archive.min.css

    r2552932 r2585601  
    1 .archive-wrapper{padding:30px;margin-top:30px;background:#e53935;border-radius:4px;color:#ffffff}
     1.archive-wrapper{padding:30px;margin-top:30px;background:#e53935;border-radius:4px;color:#ffffff}.archive-wrapper a{color:#ffffff}.archive-wrapper a:hover{text-decoration:none}
  • amp-wp/trunk/public/partials/tez/footer.php

    r2057758 r2585601  
    1     </div> <!-- /wrapper -->
     1    </div> <!-- /wrapper -->
    22    <?php
    3     $amp_wp_general_settings = get_option('amp_wp_general_settings');
    4     $amp_wp_layout_settings = get_option('amp_wp_layout_settings');
    5     $non_amp_version = ( isset( $amp_wp_layout_settings['non_amp_version'] ) && !empty( $amp_wp_layout_settings['non_amp_version'] ) ) ? $amp_wp_layout_settings['non_amp_version'] : '';
     3    $amp_wp_general_settings = get_option( 'amp_wp_general_settings' );
     4    $amp_wp_layout_settings  = get_option( 'amp_wp_layout_settings' );
     5    $non_amp_version         = ( isset( $amp_wp_layout_settings['non_amp_version'] ) && ! empty( $amp_wp_layout_settings['non_amp_version'] ) ) ? $amp_wp_layout_settings['non_amp_version'] : '';
    66    ?>
    77    <footer class="amp-wp-footer <?php echo amp_wp_get_global( 'footer-custom-class', '' ); ?>">
    8         <?php if( "1" == $non_amp_version ) : ?>
     8        <?php if ( 1 === $non_amp_version ) : ?>
    99        <div class="amp-wp-non-amp-url">
    1010            <?php
    1111            $args = array();
    1212
    13             // Disable Auto Redirect for This Link
     13            // Disable Auto Redirect for This Link.
    1414            $mobile_auto_redirect = '';
    15             if( isset( $amp_wp_general_settings['mobile_auto_redirect'] ) && !empty( $amp_wp_general_settings['mobile_auto_redirect'] ) ) {
    16                 $mobile_auto_redirect = intval( $amp_wp_general_settings['mobile_auto_redirect'] );
     15            if ( isset( $amp_wp_general_settings['mobile_auto_redirect'] ) && ! empty( $amp_wp_general_settings['mobile_auto_redirect'] ) ) {
     16                $mobile_auto_redirect = $amp_wp_general_settings['mobile_auto_redirect'];
    1717            }
    1818
    19             if( $mobile_auto_redirect ) {
     19            if ( $mobile_auto_redirect ) {
    2020                $args['query-args'] = array( array( 'amp-wp-skip-redirect', true ) );
    2121            }
     
    3030
    3131        <?php
    32         if( has_nav_menu('amp-wp-footer') ) {
    33             wp_nav_menu( array(
    34                 'theme_location' => 'amp-wp-footer',
    35                 'menu_class' => 'footer-navigation',
    36                 'container_class' => 'amp-wp-footer-nav'
    37             ));
     32        if ( has_nav_menu( 'amp-wp-footer' ) ) {
     33            wp_nav_menu(
     34                array(
     35                    'theme_location'  => 'amp-wp-footer',
     36                    'menu_class'      => 'footer-navigation',
     37                    'container_class' => 'amp-wp-footer-nav',
     38                )
     39            );
    3840        }
     41
    3942        ?>
    4043
    4144        <?php
    42         $footer_copyright_text = ( isset( $amp_wp_layout_settings['footer_copyright_text'] ) && !empty( $amp_wp_layout_settings['footer_copyright_text'] ) ) ? $amp_wp_layout_settings['footer_copyright_text'] : '';
    43         if( $footer_copyright_text ) :
    44         ?>
     45        $footer_copyright_text = ( isset( $amp_wp_layout_settings['footer_copyright_text'] ) && ! empty( $amp_wp_layout_settings['footer_copyright_text'] ) ) ? $amp_wp_layout_settings['footer_copyright_text'] : '';
     46        if ( $footer_copyright_text ) :
     47            ?>
    4548        <div class="amp-wp-copyright"><?php echo wp_kses_post( $footer_copyright_text ); ?></div>
    4649        <?php endif; ?>
    47        
     50
    4851        <?php
    4952        /**
     
    7174        do_action( 'amp_wp_analytics_adobe' );
    7275        ?>
    73        
     76
    7477        <?php
    7578        /**
     
    7881        do_action( 'amp_wp_notifications_bar' );
    7982        ?>
    80        
     83
    8184        <?php
    8285        /**
     
    8689        ?>
    8790    </footer>
    88     <?php amp_wp_footer(); ?>
    89     </body>
     91    <?php amp_wp_footer(); ?>
     92    </body>
    9093</html>
  • amp-wp/trunk/public/partials/tez/single-post/comments.php

    r2057758 r2585601  
    2020$show_comments          = ( isset( $amp_wp_layout_settings['show_comments'] ) && ! empty( $amp_wp_layout_settings['show_comments'] ) ) ? $amp_wp_layout_settings['show_comments'] : '';
    2121
    22 if ( ( '1' != $show_comments ) || !comments_open() || !get_comments_number() ) :
     22if ( ( '1' != $show_comments ) || ! comments_open() || ! get_comments_number() ) :
    2323    return;
    2424endif;
    2525
    2626// Enqueue CSS
    27 amp_wp_enqueue_block_style( 'comments', AMP_WP_TEMPLATE_DIR_CSS . 'themes/'.AMP_WP_THEME_NAME.'/components/comments/comments' );
     27amp_wp_enqueue_block_style( 'comments', AMP_WP_TEMPLATE_DIR_CSS . 'themes/' . AMP_WP_THEME_NAME . '/components/comments/comments' );
    2828
    2929?>
     
    4343            $amp_wp_general_settings = get_option( 'amp_wp_general_settings' );
    4444            if ( isset( $amp_wp_general_settings['mobile_auto_redirect'] ) && ! empty( $amp_wp_general_settings['mobile_auto_redirect'] ) ) {
    45                 $mobile_auto_redirect = intval( $amp_wp_general_settings['mobile_auto_redirect'] );
     45                $mobile_auto_redirect = $amp_wp_general_settings['mobile_auto_redirect'];
    4646            }
    4747        }
Note: See TracChangeset for help on using the changeset viewer.