Plugin Directory

Changeset 2756792

Timestamp:
07/15/2022 10:05:09 AM (2 years ago)
Author:
99robots
Message:

1.1.27 = 2022-07-15

  • FIXED: Internationalization support for PO Translation files. Plugin now supports translation to additional languages in addition to the base language, English.
  • ADDED: 1 Translation for Hindi.
  • UPDATED: Compatibility with WordPress 6.0.1
Location:
header-footer-code-manager
Files:
27 added
42 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • header-footer-code-manager/trunk/99robots-header-footer-code-manager.php

    r2750921 r2756792  
    44 * Plugin URI: https://draftpress.com/products
    55 * Description: Header Footer Code Manager by 99 Robots is a quick and simple way for you to add tracking code snippets, conversion pixels, or other scripts required by third party services for analytics, tracking, marketing, or chat functions. For detailed documentation, please visit the plugin's <a href="https://draftpress.com/"> official page</a>.
    6  * Version: 1.1.26
     6 * Version: 1.1.2
    77 * Requires at least: 4.9
    88 * Requires PHP: 5.6.20
     
    1010 * Author URI: https://draftpress.com/
    1111 * Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
    12  * Text Domain: 99robots-header-footer-code-manager
     12 * Text Domain: header-footer-code-manager
    1313 * Domain Path: /languages
    1414 */
     
    214214        public static function hfcm_load_translation_files()
    215215        {
    216             load_plugin_textdomain('99robots-header-footer-code-manager', false, dirname(plugin_basename(__FILE__)) . '/languages');
     216            load_plugin_textdomain('header-footer-code-manager', false, dirname(plugin_basename(__FILE__)) . '/languages');
    217217        }
    218218
     
    225225            // This is the main item for the menu
    226226            add_menu_page(
    227                 __('Header Footer Code Manager', '99robots-header-footer-code-manager'),
    228                 __('HFCM', '99robots-header-footer-code-manager'),
     227                __('Header Footer Code Manager', 'header-footer-code-manager'),
     228                __('HFCM', 'header-footer-code-manager'),
    229229                'manage_options',
    230230                'hfcm-list',
     
    236236            add_submenu_page(
    237237                'hfcm-list',
    238                 __('All Snippets', '99robots-header-footer-code-manager'),
    239                 __('All Snippets', '99robots-header-footer-code-manager'),
     238                __('All Snippets', 'header-footer-code-manager'),
     239                __('All Snippets', 'header-footer-code-manager'),
    240240                'manage_options',
    241241                'hfcm-list',
     
    246246            add_submenu_page(
    247247                'hfcm-list',
    248                 __('Add New Snippet', '99robots-header-footer-code-manager'),
    249                 __('Add New', '99robots-header-footer-code-manager'),
     248                __('Add New Snippet', 'header-footer-code-manager'),
     249                __('Add New', 'header-footer-code-manager'),
    250250                'manage_options',
    251251                'hfcm-create',
     
    256256            add_submenu_page(
    257257                'hfcm-list',
    258                 __('Tools', '99robots-header-footer-code-manager'),
    259                 __('Tools', '99robots-header-footer-code-manager'),
     258                __('Tools', 'header-footer-code-manager'),
     259                __('Tools', 'header-footer-code-manager'),
    260260                'manage_options',
    261261                'hfcm-tools',
     
    266266            add_submenu_page(
    267267                null,
    268                 __('Update Script', '99robots-header-footer-code-manager'),
    269                 __('Update', '99robots-header-footer-code-manager'),
     268                __('Update Script', 'header-footer-code-manager'),
     269                __('Update', 'header-footer-code-manager'),
    270270                'manage_options',
    271271                'hfcm-update',
     
    276276            add_submenu_page(
    277277                null,
    278                 __('Request Handler Script', '99robots-header-footer-code-manager'),
    279                 __('Request Handler', '99robots-header-footer-code-manager'),
     278                __('Request Handler Script', 'header-footer-code-manager'),
     279                __('Request Handler', 'header-footer-code-manager'),
    280280                'manage_options',
    281281                'hfcm-request-handler',
     
    330330                <div id="hfcm-message" class="notice notice-success">
    331331                    <a class="hfcm-dismiss-alert notice-dismiss" href="?hfcm-admin-notice-dismissed">Dismiss</a>
    332                     <p><?php _e('Hey there! You’ve been using the <strong>Header Footer Code Manager</strong> plugin for a while now. If you like the plugin, please support our awesome development and support team by leaving a <a class="hfcm-review-stars" href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> rating. <a href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/">Rate it!</a> It’ll mean the world to us and keep this plugin free and constantly updated. <a href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/">Leave A Review</a>', '99robots-header-footer-code-manager'); ?>
     332                    <p><?php _e('Hey there! You’ve been using the <strong>Header Footer Code Manager</strong> plugin for a while now. If you like the plugin, please support our awesome development and support team by leaving a <a class="hfcm-review-stars" href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> rating. <a href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/">Rate it!</a> It’ll mean the world to us and keep this plugin free and constantly updated. <a href="https://wordpress.org/support/plugin/header-footer-code-manager/reviews/">Leave A Review</a>', 'header-footer-code-manager'); ?>
    333333                    </p>
    334334                </div>
     
    10691069                    <?php _e(
    10701070                        'Please deactivate the free version of this plugin in order to avoid duplication of the snippets.
    1071                     You can use our tools to import all the snippets from the free version of this plugin.', '99robots-header-footer-code-manager'
     1071                    You can use our tools to import all the snippets from the free version of this plugin.', 'header-footer-code-manager'
    10721072                    ); ?>
    10731073                </div>
     
    10841084                <div id="hfcm-message" class="notice notice-success is-dismissible">
    10851085                    <p>
    1086                         <?php _e($message, '99robots-header-footer-code-manager'); ?>
     1086                        <?php _e($message, 'header-footer-code-manager'); ?>
    10871087                    </p>
    10881088                </div>
     
    11031103            ?>
    11041104            <div class="wrap">
    1105                 <h1><?php esc_html_e('Snippets', '99robots-header-footer-code-manager') ?>
     1105                <h1><?php esc_html_e('Snippets', 'header-footer-code-manager') ?>
    11061106                    <a href="<?php echo admin_url('admin.php?page=hfcm-create') ?>" class="page-title-action">
    1107                         <?php esc_html_e('Add New Snippet', '99robots-header-footer-code-manager') ?>
     1107                        <?php esc_html_e('Add New Snippet', 'header-footer-code-manager') ?>
    11081108                    </a>
    11091109                </h1>
     
    11121112                    <?php
    11131113                    $snippet_obj->prepare_items();
    1114                     $snippet_obj->search_box('Search Snippets', 'search_id');
     1114                    $snippet_obj->search_box(, 'search_id');
    11151115                    $snippet_obj->display();
    11161116                    ?>
     
    12001200                    ?>
    12011201                    <div class="notice hfcm-warning-notice notice-warning">
    1202                         <?php _e('Please upload a valid import file', '99robots-header-footer-code-manager'); ?>
     1202                        <?php _e('Please upload a valid import file', 'header-footer-code-manager'); ?>
    12031203                    </div>
    12041204                    <?php
     
    12151215                    ?>
    12161216                    <div class="notice hfcm-warning-notice notice-warning">
    1217                         <?php _e('Please upload a valid import file', '99robots-header-footer-code-manager'); ?>
     1217                        <?php _e('Please upload a valid import file', 'header-footer-code-manager'); ?>
    12181218                    </div>
    12191219                    <?php
     
    12951295        public static function is_hfcm_pro_active()
    12961296        {
    1297             if (is_plugin_active('99robots-header-footer-code-manager-pro/99robots-header-footer-code-manager-pro.php') ) {
     1297            if (is_plugin_active('header-footer-code-manager-pro.php') ) {
    12981298                return true;
    12991299            }
  • header-footer-code-manager/trunk/includes/class-hfcm-snippets-list.php

    r2750921 r2756792  
    1515        parent::__construct(
    1616            array(
    17                 'singular' => esc_html__('Snippet', '99robots-header-footer-code-manager'),
    18                 'plural'   => esc_html__('Snippets', '99robots-header-footer-code-manager'),
     17                'singular' => esc_html__('Snippet', 'header-footer-code-manager'),
     18                'plural'   => esc_html__('Snippets', 'header-footer-code-manager'),
    1919                'ajax'     => false,
    2020            )
     
    186186    public function no_items()
    187187    {
    188         esc_html_e('No Snippets available.', '99robots-header-footer-code-manager');
     188        esc_html_e('No Snippets available.', 'header-footer-code-manager');
    189189    }
    190190
     
    206206        case 'display_on':
    207207            $nnr_hfcm_display_array = array(
    208                 'All'            => esc_html__('Site Wide', '99robots-header-footer-code-manager'),
    209                 's_posts'        => esc_html__('Specific Posts', '99robots-header-footer-code-manager'),
    210                 's_pages'        => esc_html__('Specific Pages', '99robots-header-footer-code-manager'),
    211                 's_categories'   => esc_html__('Specific Categories', '99robots-header-footer-code-manager'),
    212                 's_custom_posts' => esc_html__('Specific Custom Post Types', '99robots-header-footer-code-manager'),
    213                 's_tags'         => esc_html__('Specific Tags', '99robots-header-footer-code-manager'),
    214                 's_is_home'      => esc_html__('Home Page', '99robots-header-footer-code-manager'),
    215                 's_is_search'    => esc_html__('Search Page', '99robots-header-footer-code-manager'),
    216                 's_is_archive'   => esc_html__('Archive Page', '99robots-header-footer-code-manager'),
    217                 'latest_posts'   => esc_html__('Latest Posts', '99robots-header-footer-code-manager'),
    218                 'manual'         => esc_html__('Shortcode Only', '99robots-header-footer-code-manager'),
     208                'All'            => esc_html__('Site Wide', 'header-footer-code-manager'),
     209                's_posts'        => esc_html__('Specific Posts', 'header-footer-code-manager'),
     210                's_pages'        => esc_html__('Specific Pages', 'header-footer-code-manager'),
     211                's_categories'   => esc_html__('Specific Categories', 'header-footer-code-manager'),
     212                's_custom_posts' => esc_html__('Specific Custom Post Types', 'header-footer-code-manager'),
     213                's_tags'         => esc_html__('Specific Tags', 'header-footer-code-manager'),
     214                's_is_home'      => esc_html__('Home Page', 'header-footer-code-manager'),
     215                's_is_search'    => esc_html__('Search Page', 'header-footer-code-manager'),
     216                's_is_archive'   => esc_html__('Archive Page', 'header-footer-code-manager'),
     217                'latest_posts'   => esc_html__('Latest Posts', 'header-footer-code-manager'),
     218                'manual'         => esc_html__('Shortcode Only', 'header-footer-code-manager'),
    219219            );
    220220
     
    232232                }
    233233                if ($empty ) {
    234                     return '<span class="hfcm-red">' . esc_html__('No post selected', '99robots-header-footer-code-manager') . '</span>';
     234                    return '<span class="hfcm-red">' . esc_html__('No post selected', 'header-footer-code-manager') . '</span>';
    235235                }
    236236            }
     
    241241
    242242            if (!$item[ $column_name ] ) {
    243                 return esc_html__('N/A', '99robots-header-footer-code-manager');
     243                return esc_html__('N/A', 'header-footer-code-manager');
    244244            }
    245245
    246246            $nnr_hfcm_locations = array(
    247                 'header'         => esc_html__('Header', '99robots-header-footer-code-manager'),
    248                 'before_content' => esc_html__('Before Content', '99robots-header-footer-code-manager'),
    249                 'after_content'  => esc_html__('After Content', '99robots-header-footer-code-manager'),
    250                 'footer'         => esc_html__('Footer', '99robots-header-footer-code-manager'),
     247                'header'         => esc_html__('Header', 'header-footer-code-manager'),
     248                'before_content' => esc_html__('Before Content', 'header-footer-code-manager'),
     249                'after_content'  => esc_html__('After Content', 'header-footer-code-manager'),
     250                'footer'         => esc_html__('Footer', 'header-footer-code-manager'),
    251251            );
    252252            return esc_html($nnr_hfcm_locations[ $item[ $column_name ] ]);
     
    255255
    256256            if ('both' === $item[ $column_name ] ) {
    257                 return esc_html__('Show on All Devices', '99robots-header-footer-code-manager');
     257                return esc_html__('Show on All Devices', 'header-footer-code-manager');
    258258            } elseif ('mobile' === $item[ $column_name ] ) {
    259                 return esc_html__('Only Mobile Devices', '99robots-header-footer-code-manager');
     259                return esc_html__('Only Mobile Devices', 'header-footer-code-manager');
    260260            } elseif ('desktop' === $item[ $column_name ] ) {
    261                 return esc_html__('Only Desktop', '99robots-header-footer-code-manager');
     261                return esc_html__('Only Desktop', 'header-footer-code-manager');
    262262            } else {
    263263                return esc_html($item[ $column_name ]);
     
    265265        case 'snippet_type':
    266266            $snippet_types = array(
    267                 'html' => esc_html__('HTML', '99robots-header-footer-code-manager'),
    268                 'css'  => esc_html__('CSS', '99robots-header-footer-code-manager'),
    269                 'js'   => esc_html__('Javascript', '99robots-header-footer-code-manager')
     267                'html' => esc_html__('HTML', 'header-footer-code-manager'),
     268                'css'  => esc_html__('CSS', 'header-footer-code-manager'),
     269                'js'   => esc_html__('Javascript', 'header-footer-code-manager')
    270270            );
    271271            return esc_html($snippet_types[ $item[ $column_name ] ]);
     
    275275            if ('inactive' === $item[ $column_name ] ) {
    276276                return '<div class="nnr-switch">
    277                                 <label for="nnr-round-toggle' . esc_attr($item['script_id']) . '">OFF</label>
    278                                 <input id="nnr-round-toggle' . esc_attr($item['script_id']) . '" class="round-toggle round-toggle-round-flat" type="checkbox" data-id="' . esc_attr($item['script_id']) . '" />
    279                                 <label for="nnr-round-toggle' . esc_attr($item['script_id']) . '"></label>
    280                                 <label for="nnr-round-toggle' . esc_attr($item['script_id']) . '">ON</label>
    281                             </div>
    282                             ';
     277<label for="nnr-round-toggle' . esc_attr($item['script_id']) . '">OFF</label>
     278<input id="nnr-round-toggle' . esc_attr($item['script_id']) . '" class="round-toggle round-toggle-round-flat" type="checkbox" data-id="' . esc_attr($item['script_id']) . '" />
     279<label for="nnr-round-toggle' . esc_attr($item['script_id']) . '"></label>
     280<label for="nnr-round-toggle' . esc_attr($item['script_id']) . '">ON</label>
     281</div>
     282';
    283283            } elseif ('active' === $item[ $column_name ] ) {
    284284                return '<div class="nnr-switch">
    285                                 <label for="nnr-round-toggle' . esc_attr($item['script_id']) . '">OFF</label>
    286                                 <input id="nnr-round-toggle' . esc_attr($item['script_id']) . '" class="round-toggle round-toggle-round-flat" type="checkbox" data-id="' . esc_attr($item['script_id']) . '" checked="checked" />
    287                                 <label for="nnr-round-toggle' . esc_attr($item['script_id']) . '"></label>
    288                                 <label for="nnr-round-toggle' . esc_attr($item['script_id']) . '">ON</label>
    289                             </div>
    290                             ';
     285<label for="nnr-round-toggle' . esc_attr($item['script_id']) . '">OFF</label>
     286<input id="nnr-round-toggle' . esc_attr($item['script_id']) . '" class="round-toggle round-toggle-round-flat" type="checkbox" data-id="' . esc_attr($item['script_id']) . '" checked="checked" />
     287<label for="nnr-round-toggle' . esc_attr($item['script_id']) . '"></label>
     288<label for="nnr-round-toggle' . esc_attr($item['script_id']) . '">ON</label>
     289</div>
     290';
    291291            } else {
    292292                return esc_html($item[ $column_name ]);
     
    341341        }
    342342        $actions = array(
    343             'edit'   => sprintf('<a href="?page=%s&action=%s&id=%s&_wpnonce=%s">' . esc_html__('Edit', '99robots-header-footer-code-manager') . '</a>', esc_attr('hfcm-update'), 'edit', absint($item['script_id']), $edit_nonce),
    344             'copy'   => sprintf('<a href="javascript:void(0);" data-shortcode=\'[hfcm id="%s"]\'  class="hfcm_copy_shortcode" id="hfcm_copy_shortcode_%s">' . esc_html__('Copy Shortcode', '99robots-header-footer-code-manager') . '</a>', absint($item['script_id']), absint($item['script_id'])),
    345             'delete' => sprintf('<a href="?page=%s&action=%s&snippet=%s&_wpnonce=%s">' . esc_html__('Delete', '99robots-header-footer-code-manager') . '</a>', $page, 'delete', absint($item['script_id']), $delete_nonce),
     343            'edit'   => sprintf('<a href="?page=%s&action=%s&id=%s&_wpnonce=%s">' . esc_html__('Edit', 'header-footer-code-manager') . '</a>', esc_attr('hfcm-update'), 'edit', absint($item['script_id']), $edit_nonce),
     344            'copy'   => sprintf('<a href="javascript:void(0);" data-shortcode=\'[hfcm id="%s"]\'  class="hfcm_copy_shortcode" id="hfcm_copy_shortcode_%s">' . esc_html__('Copy Shortcode', 'header-footer-code-manager') . '</a>', absint($item['script_id']), absint($item['script_id'])),
     345            'delete' => sprintf('<a href="?page=%s&action=%s&snippet=%s&_wpnonce=%s">' . esc_html__('Delete', 'header-footer-code-manager') . '</a>', $page, 'delete', absint($item['script_id']), $delete_nonce),
    346346        );
    347347
     
    358358        $columns = array(
    359359            'cb'           => '<input type="checkbox" />',
    360             'script_id'    => esc_html__('ID', '99robots-header-footer-code-manager'),
    361             'status'       => esc_html__('Status', '99robots-header-footer-code-manager'),
    362             'name'         => esc_html__('Snippet Name', '99robots-header-footer-code-manager'),
    363             'display_on'   => esc_html__('Display On', '99robots-header-footer-code-manager'),
    364             'location'     => esc_html__('Location', '99robots-header-footer-code-manager'),
    365             'snippet_type' => esc_html__('Snippet Type', '99robots-header-footer-code-manager'),
    366             'device_type'  => esc_html__('Devices', '99robots-header-footer-code-manager'),
    367             'shortcode'    => esc_html__('Shortcode', '99robots-header-footer-code-manager'),
     360            'script_id'    => esc_html__('ID', 'header-footer-code-manager'),
     361            'status'       => esc_html__('Status', 'header-footer-code-manager'),
     362            'name'         => esc_html__('Snippet Name', 'header-footer-code-manager'),
     363            'display_on'   => esc_html__('Display On', 'header-footer-code-manager'),
     364            'location'     => esc_html__('Location', 'header-footer-code-manager'),
     365            'snippet_type' => esc_html__('Snippet Type', 'header-footer-code-manager'),
     366            'device_type'  => esc_html__('Devices', 'header-footer-code-manager'),
     367            'shortcode'    => esc_html__('Shortcode', 'header-footer-code-manager'),
    368368        );
    369369
     
    395395
    396396        return array(
    397             'bulk-activate'   => esc_html__('Activate', '99robots-header-footer-code-manager'),
    398             'bulk-deactivate' => esc_html__('Deactivate', '99robots-header-footer-code-manager'),
    399             'bulk-delete'     => esc_html__('Remove', '99robots-header-footer-code-manager'),
     397            'bulk-activate'   => esc_html__('Activate', 'header-footer-code-manager'),
     398            'bulk-deactivate' => esc_html__('Deactivate', 'header-footer-code-manager'),
     399            'bulk-delete'     => esc_html__('Remove', 'header-footer-code-manager'),
    400400        );
    401401    }
     
    411411            $query        = isset($_POST['snippet_type']) ? sanitize_text_field($_POST['snippet_type']) : '';
    412412            $snippet_type = array(
    413                 'html' => esc_html__('HTML', '99robots-header-footer-code-manager'),
    414                 'css'  => esc_html__('CSS', '99robots-header-footer-code-manager'),
    415                 'js'   => esc_html__('Javascript', '99robots-header-footer-code-manager')
     413                'html' => esc_html__('HTML', 'header-footer-code-manager'),
     414                'css'  => esc_html__('CSS', 'header-footer-code-manager'),
     415                'js'   => esc_html__('Javascript', 'header-footer-code-manager')
    416416            );
    417417
    418418            echo '<div class="alignleft actions">';
    419419            echo '<select name="snippet_type">';
    420             echo '<option value="">' . esc_html__('All Snippet Types', '99robots-header-footer-code-manager') . '</option>';
     420            echo '<option value="">' . esc_html__('All Snippet Types', 'header-footer-code-manager') . '</option>';
    421421
    422422            foreach ( $snippet_type as $key_type => $type ) {
     
    429429
    430430            echo '</select>';
    431             submit_button(__('Filter', '99robots-header-footer-code-manager'), 'button', 'filter_action', false);
     431            submit_button(__('Filter', 'header-footer-code-manager'), 'button', 'filter_action', false);
    432432            echo '</div>';
    433433        }
     
    489489        $class        = 'all' === $current ? 'current' : '';
    490490        $all_url      = remove_query_arg('customvar');
    491         $views['all'] = '<a href="' . esc_html($all_url) . '" class="' . esc_html($class) . '">' . esc_html__('All', '99robots-header-footer-code-manager') . ' (' . esc_html__($this->record_count()) . ')</a>';
     491        $views['all'] = '<a href="' . esc_html($all_url) . '" class="' . esc_html($class) . '">' . esc_html__('All', 'header-footer-code-manager') . ' (' . esc_html__($this->record_count()) . ')</a>';
    492492
    493493        //Foo link
    494494        $foo_url         = add_query_arg('customvar', 'active');
    495495        $class           = ('active' === $current ? 'current' : '');
    496         $views['active'] = '<a href="' . esc_html($foo_url) . '" class="' . esc_html($class) . '">' . esc_html__('Active', '99robots-header-footer-code-manager') . ' (' . esc_html__($this->record_count('active')) . ')</a>';
     496        $views['active'] = '<a href="' . esc_html($foo_url) . '" class="' . esc_html($class) . '">' . esc_html__('Active', 'header-footer-code-manager') . ' (' . esc_html__($this->record_count('active')) . ')</a>';
    497497
    498498        //Bar link
    499499        $bar_url           = add_query_arg('customvar', 'inactive');
    500500        $class             = ('inactive' === $current ? 'current' : '');
    501         $views['inactive'] = '<a href="' . esc_html($bar_url) . '" class="' . esc_html($class) . '">' . esc_html__('Inactive', '99robots-header-footer-code-manager') . ' (' . esc_html__($this->record_count('inactive')) . ')</a>';
     501        $views['inactive'] = '<a href="' . esc_html($bar_url) . '" class="' . esc_html($class) . '">' . esc_html__('Inactive', 'header-footer-code-manager') . ' (' . esc_html__($this->record_count('inactive')) . ')</a>';
    502502
    503503        return $views;
  • header-footer-code-manager/trunk/includes/hfcm-add-edit.php

    r2750134 r2756792  
    1111// Localize the script with new data
    1212$translation_array = array(
    13     'header'         => __('Header', '99robots-header-footer-code-manager'),
    14     'before_content' => __('Before Content', '99robots-header-footer-code-manager'),
    15     'after_content'  => __('After Content', '99robots-header-footer-code-manager'),
    16     'footer'         => __('Footer', '99robots-header-footer-code-manager'),
     13    'header'         => __('Header', 'header-footer-code-manager'),
     14    'before_content' => __('Before Content', 'header-footer-code-manager'),
     15    'after_content'  => __('After Content', 'header-footer-code-manager'),
     16    'footer'         => __('Footer', 'header-footer-code-manager'),
    1717    'id'             => absint($id),
    1818    'security'       => wp_create_nonce('hfcm-get-posts'),
     
    2626<div class="wrap">
    2727    <h1>
    28         <?php echo $update ? esc_html__('Edit Snippet', '99robots-header-footer-code-manager') : esc_html__('Add New Snippet', '99robots-header-footer-code-manager') ?>
     28        <?php echo $update ? esc_html__('Edit Snippet', 'header-footer-code-manager') ?>
    2929        <?php if ($update ) : ?>
    3030            <a href="<?php echo admin_url('admin.php?page=hfcm-create') ?>" class="page-title-action">
    31                 <?php esc_html_e('Add New Snippet', '99robots-header-footer-code-manager') ?>
     31                <?php esc_html_e('Add New Snippet', 'header-footer-code-manager') ?>
    3232            </a>
    3333        <?php endif; ?>
     
    3838            ?>
    3939            <div class="updated">
    40                 <p><?php esc_html_e('Script updated', '99robots-header-footer-code-manager'); ?></p>
     40                <p><?php esc_html_e('Script updated', 'header-footer-code-manager'); ?></p>
    4141            </div>
    42             <a href="<?php echo admin_url('admin.php?page=hfcm-list') ?>">&laquo; <?php esc_html_e('Back to list', '99robots-header-footer-code-manager'); ?></a>
     42            <a href="<?php echo admin_url('admin.php?page=hfcm-list') ?>">&laquo; <?php esc_html_e('Back to list', 'header-footer-code-manager'); ?></a>
    4343        <?php elseif (6 === $_GET['message'] ) : ?>
    4444            <div class="updated">
    45                 <p><?php esc_html_e('Script Added Successfully', '99robots-header-footer-code-manager'); ?></p>
     45                <p><?php esc_html_e('Script Added Successfully', 'header-footer-code-manager'); ?></p>
    4646            </div>
    47             <a href="<?php echo admin_url('admin.php?page=hfcm-list') ?>">&laquo; <?php esc_html_e('Back to list', '99robots-header-footer-code-manager'); ?></a>
     47            <a href="<?php echo admin_url('admin.php?page=hfcm-list') ?>">&laquo; <?php esc_html_e('Back to list', 'header-footer-code-manager'); ?></a>
    4848            <?php
    4949        endif;
     
    6666        <table class="wp-list-table widefat fixed hfcm-form-width form-table">
    6767            <tr>
    68                 <th class="hfcm-th-width"><?php esc_html_e('Snippet Name', '99robots-header-footer-code-manager'); ?></th>
     68                <th class="hfcm-th-width"><?php esc_html_e('Snippet Name', 'header-footer-code-manager'); ?></th>
    6969                <td>
    7070                    <input type="text" name="data[name]" value="<?php echo esc_attr($name); ?>" class="hfcm-field-width"/>
     
    7373            <?php
    7474            $nnr_hfcm_snippet_type_array = array(
    75                 'html' => esc_html__('HTML', '99robots-header-footer-code-manager'),
    76                 'css'  => esc_html__('CSS', '99robots-header-footer-code-manager'),
    77                 'js'   => esc_html__('Javascript', '99robots-header-footer-code-manager')
     75                'html' => esc_html__('HTML', 'header-footer-code-manager'),
     76                'css'  => esc_html__('CSS', 'header-footer-code-manager'),
     77                'js'   => esc_html__('Javascript', 'header-footer-code-manager')
    7878            ); ?>
    7979            <tr id="snippet_type">
    8080                <th class="hfcm-th-width">
    81                     <?php esc_html_e('Snippet Type', '99robots-header-footer-code-manager'); ?>
     81                    <?php esc_html_e('Snippet Type', 'header-footer-code-manager'); ?>
    8282                </th>
    8383                <td>
     
    9797            <?php
    9898            $nnr_hfcm_display_array = array(
    99                 'All'            => esc_html__('Site Wide', '99robots-header-footer-code-manager'),
    100                 's_posts'        => esc_html__('Specific Posts', '99robots-header-footer-code-manager'),
    101                 's_pages'        => esc_html__('Specific Pages', '99robots-header-footer-code-manager'),
    102                 's_categories'   => esc_html__('Specific Categories (Archive & Posts)', '99robots-header-footer-code-manager'),
    103                 's_custom_posts' => esc_html__('Specific Post Types (Archive & Posts)', '99robots-header-footer-code-manager'),
    104                 's_tags'         => esc_html__('Specific Tags (Archive & Posts)', '99robots-header-footer-code-manager'),
    105                 's_is_home'      => esc_html__('Home Page', '99robots-header-footer-code-manager'),
    106                 's_is_search'    => esc_html__('Search Page', '99robots-header-footer-code-manager'),
    107                 's_is_archive'   => esc_html__('Archive Page', '99robots-header-footer-code-manager'),
    108                 'latest_posts'   => esc_html__('Latest Posts', '99robots-header-footer-code-manager'),
    109                 'manual'         => esc_html__('Shortcode Only', '99robots-header-footer-code-manager'),
     99                'All'            => esc_html__('Site Wide', 'header-footer-code-manager'),
     100                's_posts'        => esc_html__('Specific Posts', 'header-footer-code-manager'),
     101                's_pages'        => esc_html__('Specific Pages', 'header-footer-code-manager'),
     102                's_categories'   => esc_html__('Specific Categories (Archive & Posts)', 'header-footer-code-manager'),
     103                's_custom_posts' => esc_html__('Specific Post Types (Archive & Posts)', 'header-footer-code-manager'),
     104                's_tags'         => esc_html__('Specific Tags (Archive & Posts)', 'header-footer-code-manager'),
     105                's_is_home'      => esc_html__('Home Page', 'header-footer-code-manager'),
     106                's_is_search'    => esc_html__('Search Page', 'header-footer-code-manager'),
     107                's_is_archive'   => esc_html__('Archive Page', 'header-footer-code-manager'),
     108                'latest_posts'   => esc_html__('Latest Posts', 'header-footer-code-manager'),
     109                'manual'         => esc_html__('Shortcode Only', 'header-footer-code-manager'),
    110110            ); ?>
    111111            <tr>
    112                 <th class="hfcm-th-width"><?php esc_html_e('Site Display', '99robots-header-footer-code-manager'); ?></th>
     112                <th class="hfcm-th-width"><?php esc_html_e('Site Display', 'header-footer-code-manager'); ?></th>
    113113                <td>
    114114                    <select name="data[display_on]" onchange="hfcm_showotherboxes(this.value);">
     
    137137            <tr id="ex_pages"
    138138                style="<?php echo esc_attr($nnr_hfcm_exclude_pages_style . $nnr_hfcm_exclude_posts_style . $nnr_hfcm_exclude_tags_style . $nnr_hfcm_exclude_custom_posts_style . $nnr_hfcm_exclude_categories_style . $nnr_hfcm_exclude_lp_count_style . $nnr_hfcm_exclude_manual_style); ?>">
    139                 <th class="hfcm-th-width"><?php esc_html_e('Exclude Pages', '99robots-header-footer-code-manager'); ?></th>
     139                <th class="hfcm-th-width"><?php esc_html_e('Exclude Pages', 'header-footer-code-manager'); ?></th>
    140140                <td>
    141141                    <select name="data[ex_pages][]" multiple>
     
    154154            <tr id="ex_posts"
    155155                style="<?php echo esc_attr($nnr_hfcm_exclude_pages_style . $nnr_hfcm_exclude_posts_style . $nnr_hfcm_exclude_tags_style . $nnr_hfcm_exclude_custom_posts_style . $nnr_hfcm_exclude_categories_style . $nnr_hfcm_exclude_lp_count_style . $nnr_hfcm_exclude_manual_style); ?>">
    156                 <th class="hfcm-th-width"><?php esc_html_e('Exclude Posts', '99robots-header-footer-code-manager'); ?></th>
     156                <th class="hfcm-th-width"><?php esc_html_e('Exclude Posts', 'header-footer-code-manager'); ?></th>
    157157                <td>
    158158                    <select class="nnr-wraptext" name="data[ex_posts][]" multiple>
     
    168168            <tr id="s_pages" style="<?php echo esc_attr($nnr_hfcm_pages_style); ?>">
    169169                <th class="hfcm-th-width">
    170                     <?php esc_html_e('Page List', '99robots-header-footer-code-manager'); ?>
     170                    <?php esc_html_e('Page List', 'header-footer-code-manager'); ?>
    171171                </th>
    172172                <td>
     
    187187            <tr id="s_posts" style="<?php echo esc_attr($nnr_hfcm_posts_style); ?>">
    188188                <th class="hfcm-th-width">
    189                     <?php esc_html_e('Post List', '99robots-header-footer-code-manager'); ?>
     189                    <?php esc_html_e('Post List', 'header-footer-code-manager'); ?>
    190190                </th>
    191191                <td>
     
    220220            ?>
    221221            <tr id="s_categories" style="<?php echo esc_attr($nnr_hfcm_categories_style); ?>">
    222                 <th class="hfcm-th-width"><?php esc_html_e('Category List', '99robots-header-footer-code-manager'); ?></th>
     222                <th class="hfcm-th-width"><?php esc_html_e('Category List', 'header-footer-code-manager'); ?></th>
    223223                <td>
    224224                    <select name="data[s_categories][]" multiple>
     
    238238            </tr>
    239239            <tr id="s_tags" style="<?php echo esc_attr($nnr_hfcm_tags_style); ?>">
    240                 <th class="hfcm-th-width"><?php esc_html_e('Tags List', '99robots-header-footer-code-manager'); ?></th>
     240                <th class="hfcm-th-width"><?php esc_html_e('Tags List', 'header-footer-code-manager'); ?></th>
    241241                <td>
    242242                    <select name="data[s_tags][]" multiple>
     
    256256            </tr>
    257257            <tr id="c_posttype" style="<?php echo esc_attr($nnr_hfcm_custom_posts_style); ?>">
    258                 <th class="hfcm-th-width"><?php esc_html_e('Post Types', '99robots-header-footer-code-manager'); ?></th>
     258                <th class="hfcm-th-width"><?php esc_html_e('Post Types', 'header-footer-code-manager'); ?></th>
    259259                <td>
    260260                    <select name="data[s_custom_posts][]" multiple>
     
    272272            </tr>
    273273            <tr id="lp_count" style="<?php echo esc_attr($nnr_hfcm_lpcount_style); ?>">
    274                 <th class="hfcm-th-width"><?php esc_html_e('Post Count', '99robots-header-footer-code-manager'); ?></th>
     274                <th class="hfcm-th-width"><?php esc_html_e('Post Count', 'header-footer-code-manager'); ?></th>
    275275                <td>
    276276                    <select name="data[lp_count]">
     
    289289            <?php
    290290            if (in_array($display_on, array( 's_posts', 's_pages', 's_custom_posts', 's_tags', 'latest_posts' )) ) {
    291                 $nnr_hfcm_locations = array( 'header'        => 'Header', 'before_content' => 'Before Content',
    292                                              'after_content' => 'After Content', 'footer' => 'Footer' );
     291                $nnr_hfcm_locations = array(
     292                        'header'        => __('Header', 'header-footer-code-manager'),
     293                        'before_content' => __('Before Content', 'header-footer-code-manager'),
     294                        'after_content' => __('After Content', 'header-footer-code-manager'),
     295                        'footer' => __('Footer', 'header-footer-code-manager')
     296                );
    293297            } else {
    294                 $nnr_hfcm_locations = array( 'header' => 'Header', 'footer' => 'Footer' );
     298                $nnr_hfcm_locations = array(
     299                        'header' => __('Header', 'header-footer-code-manager'),
     300                        'footer' => __('Footer', 'header-footer-code-manager')
     301                );
    295302            }
    296303            ?>
    297304            <tr id="locationtr" style="<?php echo esc_attr($nnr_hfcm_location_style); ?>">
    298305                <th class="hfcm-th-width">
    299                     <?php esc_html_e('Location', '99robots-header-footer-code-manager'); ?>
     306                    <?php esc_html_e('Location', 'header-footer-code-manager'); ?>
    300307                </th>
    301308                <td>
     
    312319                    </select>
    313320                    <p>
    314                         <b><?php _e("Note", '99robots-header-footer-code-manager'); ?></b>: <?php _e("Snippet will only execute if the placement hook exists on the page", '99robots-header-footer-code-manager'); ?>
     321                        <b><?php _e("Note", 'header-footer-code-manager'); ?>
    315322                        .</p>
    316323                </td>
    317324            </tr>
    318325            <?php $nnr_hfcm_device_type_array = array(
    319                 'both'    => __('Show on All Devices', '99robots-header-footer-code-manager'),
    320                 'desktop' => __('Only Desktop', '99robots-header-footer-code-manager'),
    321                 'mobile'  => __('Only Mobile Devices', '99robots-header-footer-code-manager')
     326                'both'    => __('Show on All Devices', 'header-footer-code-manager'),
     327                'desktop' => __('Only Desktop', 'header-footer-code-manager'),
     328                'mobile'  => __('Only Mobile Devices', 'header-footer-code-manager')
    322329            ) ?>
    323330            <?php $nnr_hfcm_status_array = array(
    324                 'active'   => __('Active', '99robots-header-footer-code-manager'),
    325                 'inactive' => __('Inactive', '99robots-header-footer-code-manager')
     331                'active'   => __('Active', 'header-footer-code-manager'),
     332                'inactive' => __('Inactive', 'header-footer-code-manager')
    326333            ) ?>
    327334            <tr>
    328                 <th class="hfcm-th-width"><?php esc_html_e('Device Display', '99robots-header-footer-code-manager'); ?></th>
     335                <th class="hfcm-th-width"><?php esc_html_e('Device Display', 'header-footer-code-manager'); ?></th>
    329336                <td>
    330337                    <select name="data[device_type]">
     
    342349            </tr>
    343350            <tr>
    344                 <th class="hfcm-th-width"><?php esc_html_e('Status', '99robots-header-footer-code-manager'); ?></th>
     351                <th class="hfcm-th-width"><?php esc_html_e('Status', 'header-footer-code-manager'); ?></th>
    345352                <td>
    346353                    <select name="data[status]">
     
    359366            <?php if ($update ) : ?>
    360367                <tr>
    361                     <th class="hfcm-th-width"><?php esc_html_e('Shortcode', '99robots-header-footer-code-manager'); ?></th>
     368                    <th class="hfcm-th-width"><?php esc_html_e('Shortcode', 'header-footer-code-manager'); ?></th>
    362369                    <td>
    363370                        <p>
     
    366373                                ?>
    367374                                <a data-shortcode='[hfcm id="<?php echo absint($id); ?>"]' href="javascript:void(0);" class="nnr-btn-click-to-copy nnr-btn-copy-inline" id="hfcm_copy_shortcode">
    368                                     <?php esc_html_e('Copy', '99robots-header-footer-code-manager'); ?>
     375                                    <?php esc_html_e('Copy', 'header-footer-code-manager'); ?>
    369376                                </a>
    370377                            <?php endif; ?>
     
    375382                <tr>
    376383                    <th class="hfcm-th-width">
    377                         <?php esc_html_e('Changelog', '99robots-header-footer-code-manager'); ?>
     384                        <?php esc_html_e('Changelog', 'header-footer-code-manager'); ?>
    378385                    </th>
    379386                    <td>
    380387                        <p>
    381                             <?php esc_html_e('Snippet created by', '99robots-header-footer-code-manager'); ?>
    382                             <b><?php echo esc_html($createdby); ?></b> <?php echo _e('on', '99robots-header-footer-code-manager') . ' ' . date_i18n(get_option('date_format'), strtotime($createdon)) . ' ' . __('at', '99robots-header-footer-code-manager') . ' ' . date_i18n(get_option('time_format'), strtotime($createdon)) ?>
     388                            <?php esc_html_e('Snippet created by', 'header-footer-code-manager'); ?>
     389                            <b><?php echo esc_html($createdby); ?></b> <?php echo _e('on', 'header-footer-code-manager') . ' ' . date_i18n(get_option('time_format'), strtotime($createdon)) ?>
    383390                            <br/>
    384391                            <?php if (!empty($lastmodifiedby) ) : ?>
    385                                 <?php esc_html_e('Last edited by', '99robots-header-footer-code-manager'); ?>
    386                                 <b><?php echo esc_html($lastmodifiedby); ?></b> <?php echo _e('on', '99robots-header-footer-code-manager') . ' ' . date_i18n(get_option('date_format'), strtotime($lastrevisiondate)) . ' ' . __('at', '99robots-header-footer-code-manager') . ' ' . date_i18n(get_option('time_format'), strtotime($lastrevisiondate)) ?>
     392                                <?php esc_html_e('Last edited by', 'header-footer-code-manager'); ?>
     393                                <b><?php echo esc_html($lastmodifiedby); ?></b> <?php echo _e('on', 'header-footer-code-manager') . ' ' . date_i18n(get_option('time_format'), strtotime($lastrevisiondate)) ?>
    387394                            <?php endif; ?>
    388395                        </p>
     
    392399        </table>
    393400        <div class="nnr-mt-20">
    394             <h1><?php esc_html_e('Snippet', '99robots-header-footer-code-manager'); ?>
    395                 / <?php esc_html_e('Code', '99robots-header-footer-code-manager') ?></h1>
     401            <h1><?php esc_html_e('Snippet', 'header-footer-code-manager'); ?>
     402                / <?php esc_html_e('Code', 'header-footer-code-manager') ?></h1>
    396403            <div class="nnr-mt-20 nnr-hfcm-codeeditor-box">
    397404                    <textarea name="data[snippet]" aria-describedby="nnr-newcontent-description" id="nnr_newcontent"
     
    400407                    <input type="submit"
    401408                           name="<?php echo $update ? 'update' : 'insert'; ?>"
    402                            value="<?php echo $update ? esc_html__('Update', '99robots-header-footer-code-manager') : esc_html__('Save', '99robots-header-footer-code-manager') ?>"
     409                           value="<?php echo $update ? esc_html__('Update', 'header-footer-code-manager') ?>"
    403410                           class="button button-primary button-large nnr-btnsave">
    404411                    <?php if ($update ) :
     
    406413                        ?>
    407414                        <a onclick="return nnr_confirm_delete_snippet();" href="<?php echo esc_url(admin_url('admin.php?page=hfcm-list&action=delete&_wpnonce=' . $delete_nonce . '&snippet=' . absint($id))); ?>"
    408                            class="button button-secondary button-large nnr-btndelete"><?php esc_html_e('Delete', '99robots-header-footer-code-manager'); ?></a>
     415                           class="button button-secondary button-large nnr-btndelete"><?php esc_html_e('Delete', 'header-footer-code-manager'); ?></a>
    409416                    <?php endif; ?>
    410417                </div>
  • header-footer-code-manager/trunk/includes/hfcm-tools.php

    r2750134 r2756792  
    77// Localize the script with new data
    88$translation_array = array(
    9     'header'         => __('Header', '99robots-header-footer-code-manager'),
    10     'before_content' => __('Before Content', '99robots-header-footer-code-manager'),
    11     'after_content'  => __('After Content', '99robots-header-footer-code-manager'),
    12     'footer'         => __('Footer', '99robots-header-footer-code-manager'),
     9    'header'         => __('Header', 'header-footer-code-manager'),
     10    'before_content' => __('Before Content', 'header-footer-code-manager'),
     11    'after_content'  => __('After Content', 'header-footer-code-manager'),
     12    'footer'         => __('Footer', 'header-footer-code-manager'),
    1313    'security'       => wp_create_nonce('hfcm-get-posts'),
    1414);
     
    2121<div class="wrap">
    2222    <h1>
    23         <?php _e('Tools', '99robots-header-footer-code-manager'); ?>
     23        <?php _e('Tools', 'header-footer-code-manager'); ?>
    2424    </h1>
    2525    <div class="hfcm-meta-box-wrap hfcm-grid">
     
    2828                <div class="postbox-header">
    2929                    <h2 class="hndle">
    30                         <?php _e('Export Snippets', '99robots-header-footer-code-manager'); ?>
     30                        <?php _e('Export Snippets', 'header-footer-code-manager'); ?>
    3131                    </h2>
    3232                </div>
     
    3737                                'Select the snippets you would like to export and then select your export method. Use the
    3838                                download button to export to a .json file which you can then import to another HFCM
    39                                 installation', '99robots-header-footer-code-manager'
     39                                installation', 'header-footer-code-manager'
    4040                            ); ?>.
    4141                        </p>
    4242                        <div class="hfcm-notice notice-warning">
    43                             <p><?php _e('NOTE: Import/Export Functionality is only intended to operate within the same website.  Using the export/import to move snippets from one website to a different site, may result in inconsistent behavior, particularly if you have specific elements as criteria such as pages, posts, categories, or tags.', '99robots-header-footer-code-manager'); ?></p>
     43                            <p><?php _e('NOTE: Import/Export Functionality is only intended to operate within the same website.  Using the export/import to move snippets from one website to a different site, may result in inconsistent behavior, particularly if you have specific elements as criteria such as pages, posts, categories, or tags.', 'header-footer-code-manager'); ?></p>
    4444                        </div>
    4545                        <div class="hfcm-fields">
     
    4747                                <div class="hfcm-label">
    4848                                    <label for="keys">
    49                                         <?php _e('Select Snippets', '99robots-header-footer-code-manager'); ?>
     49                                        <?php _e('Select Snippets', 'header-footer-code-manager'); ?>
    5050                                    </label>
    5151                                </div>
     
    7373                        <p class="hfcm-submit">
    7474                            <button type="submit" name="action" class="button button-primary" value="download">
    75                                 <?php _e('Export File', '99robots-header-footer-code-manager'); ?>
     75                                <?php _e('Export File', 'header-footer-code-manager'); ?>
    7676                            </button>
    7777                        </p>
     
    8383                <div class="postbox-header">
    8484                    <h2 class="hndle">
    85                         <?php _e('Import Snippets', '99robots-header-footer-code-manager'); ?>
     85                        <?php _e('Import Snippets', 'header-footer-code-manager'); ?>
    8686                    </h2>
    8787                </div>
     
    9191                            <?php _e(
    9292                                'Select the HFCM JSON file you would like to import. When you click the import button below,
    93                                 HFCM will import the field groups.', '99robots-header-footer-code-manager'
     93                                HFCM will import the field groups.', 'header-footer-code-manager'
    9494                            ); ?>
    9595                        </p>
     
    9898                                <div class="hfcm-label">
    9999                                    <label for="hfcm_import_file">
    100                                         <?php _e('Select File', '99robots-header-footer-code-manager'); ?>
     100                                        <?php _e('Select File', 'header-footer-code-manager'); ?>
    101101                                    </label>
    102102                                </div>
     
    115115                        </div>
    116116                        <p class="hfcm-submit">
    117                             <input type="submit" class="button button-primary" value="Import">
     117                            <input type="submit" class="button button-primary" value="">
    118118                        </p>
    119119                        <?php wp_nonce_field('hfcm-nonce'); ?>
  • header-footer-code-manager/trunk/readme.txt

    r2750921 r2756792  
    44Requires at least: 4.9
    55Requires PHP: 5.6.20
    6 Tested up to: 6.0
    7 Stable tag: 1.1.26
     6Tested up to: 6.0
     7Stable tag: 1.1.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7979== Installation ==
    8080
    81 1. Upload `99robots-header-footer-code-manager` to the `/wp-content/plugins/` directory
     811. Upload `header-footer-code-manager` to the `/wp-content/plugins/` directory
    82821. Activate the plugin through the 'Plugins' menu in WordPress
    83831. Go to plugins page to see instructions for shortcode and php template tags
     
    115115
    116116== Changelog ==
     117
     118
     119
     120
     121
    117122= 1.1.26 = 2022-07-01
    118123* FIXED: Code snippet sanitization, removed due to incompatibility with functionality
Note: See TracChangeset for help on using the changeset viewer.