Changeset 2756792
- Timestamp:
- 07/15/2022 10:05:09 AM (2 years ago)
- 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 4 4 * Plugin URI: https://draftpress.com/products 5 5 * 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.2 66 * Version: 1.1.2 7 7 * Requires at least: 4.9 8 8 * Requires PHP: 5.6.20 … … 10 10 * Author URI: https://draftpress.com/ 11 11 * Disclaimer: Use at your own risk. No warranty expressed or implied is provided. 12 * Text Domain: 99robots-header-footer-code-manager12 * Text Domain: header-footer-code-manager 13 13 * Domain Path: /languages 14 14 */ … … 214 214 public static function hfcm_load_translation_files() 215 215 { 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'); 217 217 } 218 218 … … 225 225 // This is the main item for the menu 226 226 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'), 229 229 'manage_options', 230 230 'hfcm-list', … … 236 236 add_submenu_page( 237 237 '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'), 240 240 'manage_options', 241 241 'hfcm-list', … … 246 246 add_submenu_page( 247 247 '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'), 250 250 'manage_options', 251 251 'hfcm-create', … … 256 256 add_submenu_page( 257 257 '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'), 260 260 'manage_options', 261 261 'hfcm-tools', … … 266 266 add_submenu_page( 267 267 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'), 270 270 'manage_options', 271 271 'hfcm-update', … … 276 276 add_submenu_page( 277 277 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'), 280 280 'manage_options', 281 281 'hfcm-request-handler', … … 330 330 <div id="hfcm-message" class="notice notice-success"> 331 331 <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'); ?> 333 333 </p> 334 334 </div> … … 1069 1069 <?php _e( 1070 1070 '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' 1072 1072 ); ?> 1073 1073 </div> … … 1084 1084 <div id="hfcm-message" class="notice notice-success is-dismissible"> 1085 1085 <p> 1086 <?php _e($message, ' 99robots-header-footer-code-manager'); ?>1086 <?php _e($message, 'header-footer-code-manager'); ?> 1087 1087 </p> 1088 1088 </div> … … 1103 1103 ?> 1104 1104 <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') ?> 1106 1106 <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') ?> 1108 1108 </a> 1109 1109 </h1> … … 1112 1112 <?php 1113 1113 $snippet_obj->prepare_items(); 1114 $snippet_obj->search_box( 'Search Snippets', 'search_id');1114 $snippet_obj->search_box(, 'search_id'); 1115 1115 $snippet_obj->display(); 1116 1116 ?> … … 1200 1200 ?> 1201 1201 <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'); ?> 1203 1203 </div> 1204 1204 <?php … … 1215 1215 ?> 1216 1216 <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'); ?> 1218 1218 </div> 1219 1219 <?php … … 1295 1295 public static function is_hfcm_pro_active() 1296 1296 { 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') ) { 1298 1298 return true; 1299 1299 } -
header-footer-code-manager/trunk/includes/class-hfcm-snippets-list.php
r2750921 r2756792 15 15 parent::__construct( 16 16 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'), 19 19 'ajax' => false, 20 20 ) … … 186 186 public function no_items() 187 187 { 188 esc_html_e('No Snippets available.', ' 99robots-header-footer-code-manager');188 esc_html_e('No Snippets available.', 'header-footer-code-manager'); 189 189 } 190 190 … … 206 206 case 'display_on': 207 207 $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'), 219 219 ); 220 220 … … 232 232 } 233 233 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>'; 235 235 } 236 236 } … … 241 241 242 242 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'); 244 244 } 245 245 246 246 $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'), 251 251 ); 252 252 return esc_html($nnr_hfcm_locations[ $item[ $column_name ] ]); … … 255 255 256 256 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'); 258 258 } 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'); 260 260 } 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'); 262 262 } else { 263 263 return esc_html($item[ $column_name ]); … … 265 265 case 'snippet_type': 266 266 $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') 270 270 ); 271 271 return esc_html($snippet_types[ $item[ $column_name ] ]); … … 275 275 if ('inactive' === $item[ $column_name ] ) { 276 276 return '<div class="nnr-switch"> 277 278 279 280 281 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 '; 283 283 } elseif ('active' === $item[ $column_name ] ) { 284 284 return '<div class="nnr-switch"> 285 286 287 288 289 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 '; 291 291 } else { 292 292 return esc_html($item[ $column_name ]); … … 341 341 } 342 342 $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), 346 346 ); 347 347 … … 358 358 $columns = array( 359 359 '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'), 368 368 ); 369 369 … … 395 395 396 396 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'), 400 400 ); 401 401 } … … 411 411 $query = isset($_POST['snippet_type']) ? sanitize_text_field($_POST['snippet_type']) : ''; 412 412 $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') 416 416 ); 417 417 418 418 echo '<div class="alignleft actions">'; 419 419 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>'; 421 421 422 422 foreach ( $snippet_type as $key_type => $type ) { … … 429 429 430 430 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); 432 432 echo '</div>'; 433 433 } … … 489 489 $class = 'all' === $current ? 'current' : ''; 490 490 $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>'; 492 492 493 493 //Foo link 494 494 $foo_url = add_query_arg('customvar', 'active'); 495 495 $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>'; 497 497 498 498 //Bar link 499 499 $bar_url = add_query_arg('customvar', 'inactive'); 500 500 $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>'; 502 502 503 503 return $views; -
header-footer-code-manager/trunk/includes/hfcm-add-edit.php
r2750134 r2756792 11 11 // Localize the script with new data 12 12 $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'), 17 17 'id' => absint($id), 18 18 'security' => wp_create_nonce('hfcm-get-posts'), … … 26 26 <div class="wrap"> 27 27 <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') ?> 29 29 <?php if ($update ) : ?> 30 30 <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') ?> 32 32 </a> 33 33 <?php endif; ?> … … 38 38 ?> 39 39 <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> 41 41 </div> 42 <a href="<?php echo admin_url('admin.php?page=hfcm-list') ?>">« <?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') ?>">« <?php esc_html_e('Back to list', 'header-footer-code-manager'); ?></a> 43 43 <?php elseif (6 === $_GET['message'] ) : ?> 44 44 <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> 46 46 </div> 47 <a href="<?php echo admin_url('admin.php?page=hfcm-list') ?>">« <?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') ?>">« <?php esc_html_e('Back to list', 'header-footer-code-manager'); ?></a> 48 48 <?php 49 49 endif; … … 66 66 <table class="wp-list-table widefat fixed hfcm-form-width form-table"> 67 67 <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> 69 69 <td> 70 70 <input type="text" name="data[name]" value="<?php echo esc_attr($name); ?>" class="hfcm-field-width"/> … … 73 73 <?php 74 74 $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') 78 78 ); ?> 79 79 <tr id="snippet_type"> 80 80 <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'); ?> 82 82 </th> 83 83 <td> … … 97 97 <?php 98 98 $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'), 110 110 ); ?> 111 111 <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> 113 113 <td> 114 114 <select name="data[display_on]" onchange="hfcm_showotherboxes(this.value);"> … … 137 137 <tr id="ex_pages" 138 138 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> 140 140 <td> 141 141 <select name="data[ex_pages][]" multiple> … … 154 154 <tr id="ex_posts" 155 155 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> 157 157 <td> 158 158 <select class="nnr-wraptext" name="data[ex_posts][]" multiple> … … 168 168 <tr id="s_pages" style="<?php echo esc_attr($nnr_hfcm_pages_style); ?>"> 169 169 <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'); ?> 171 171 </th> 172 172 <td> … … 187 187 <tr id="s_posts" style="<?php echo esc_attr($nnr_hfcm_posts_style); ?>"> 188 188 <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'); ?> 190 190 </th> 191 191 <td> … … 220 220 ?> 221 221 <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> 223 223 <td> 224 224 <select name="data[s_categories][]" multiple> … … 238 238 </tr> 239 239 <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> 241 241 <td> 242 242 <select name="data[s_tags][]" multiple> … … 256 256 </tr> 257 257 <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> 259 259 <td> 260 260 <select name="data[s_custom_posts][]" multiple> … … 272 272 </tr> 273 273 <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> 275 275 <td> 276 276 <select name="data[lp_count]"> … … 289 289 <?php 290 290 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 ); 293 297 } 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 ); 295 302 } 296 303 ?> 297 304 <tr id="locationtr" style="<?php echo esc_attr($nnr_hfcm_location_style); ?>"> 298 305 <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'); ?> 300 307 </th> 301 308 <td> … … 312 319 </select> 313 320 <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'); ?> 315 322 .</p> 316 323 </td> 317 324 </tr> 318 325 <?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') 322 329 ) ?> 323 330 <?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') 326 333 ) ?> 327 334 <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> 329 336 <td> 330 337 <select name="data[device_type]"> … … 342 349 </tr> 343 350 <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> 345 352 <td> 346 353 <select name="data[status]"> … … 359 366 <?php if ($update ) : ?> 360 367 <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> 362 369 <td> 363 370 <p> … … 366 373 ?> 367 374 <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'); ?> 369 376 </a> 370 377 <?php endif; ?> … … 375 382 <tr> 376 383 <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'); ?> 378 385 </th> 379 386 <td> 380 387 <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)) ?> 383 390 <br/> 384 391 <?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)) ?> 387 394 <?php endif; ?> 388 395 </p> … … 392 399 </table> 393 400 <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> 396 403 <div class="nnr-mt-20 nnr-hfcm-codeeditor-box"> 397 404 <textarea name="data[snippet]" aria-describedby="nnr-newcontent-description" id="nnr_newcontent" … … 400 407 <input type="submit" 401 408 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') ?>" 403 410 class="button button-primary button-large nnr-btnsave"> 404 411 <?php if ($update ) : … … 406 413 ?> 407 414 <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> 409 416 <?php endif; ?> 410 417 </div> -
header-footer-code-manager/trunk/includes/hfcm-tools.php
r2750134 r2756792 7 7 // Localize the script with new data 8 8 $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'), 13 13 'security' => wp_create_nonce('hfcm-get-posts'), 14 14 ); … … 21 21 <div class="wrap"> 22 22 <h1> 23 <?php _e('Tools', ' 99robots-header-footer-code-manager'); ?>23 <?php _e('Tools', 'header-footer-code-manager'); ?> 24 24 </h1> 25 25 <div class="hfcm-meta-box-wrap hfcm-grid"> … … 28 28 <div class="postbox-header"> 29 29 <h2 class="hndle"> 30 <?php _e('Export Snippets', ' 99robots-header-footer-code-manager'); ?>30 <?php _e('Export Snippets', 'header-footer-code-manager'); ?> 31 31 </h2> 32 32 </div> … … 37 37 'Select the snippets you would like to export and then select your export method. Use the 38 38 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' 40 40 ); ?>. 41 41 </p> 42 42 <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> 44 44 </div> 45 45 <div class="hfcm-fields"> … … 47 47 <div class="hfcm-label"> 48 48 <label for="keys"> 49 <?php _e('Select Snippets', ' 99robots-header-footer-code-manager'); ?>49 <?php _e('Select Snippets', 'header-footer-code-manager'); ?> 50 50 </label> 51 51 </div> … … 73 73 <p class="hfcm-submit"> 74 74 <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'); ?> 76 76 </button> 77 77 </p> … … 83 83 <div class="postbox-header"> 84 84 <h2 class="hndle"> 85 <?php _e('Import Snippets', ' 99robots-header-footer-code-manager'); ?>85 <?php _e('Import Snippets', 'header-footer-code-manager'); ?> 86 86 </h2> 87 87 </div> … … 91 91 <?php _e( 92 92 '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' 94 94 ); ?> 95 95 </p> … … 98 98 <div class="hfcm-label"> 99 99 <label for="hfcm_import_file"> 100 <?php _e('Select File', ' 99robots-header-footer-code-manager'); ?>100 <?php _e('Select File', 'header-footer-code-manager'); ?> 101 101 </label> 102 102 </div> … … 115 115 </div> 116 116 <p class="hfcm-submit"> 117 <input type="submit" class="button button-primary" value=" Import">117 <input type="submit" class="button button-primary" value=""> 118 118 </p> 119 119 <?php wp_nonce_field('hfcm-nonce'); ?> -
header-footer-code-manager/trunk/readme.txt
r2750921 r2756792 4 4 Requires at least: 4.9 5 5 Requires PHP: 5.6.20 6 Tested up to: 6.0 7 Stable tag: 1.1.2 66 Tested up to: 6.0 7 Stable tag: 1.1.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 79 79 == Installation == 80 80 81 1. Upload ` 99robots-header-footer-code-manager` to the `/wp-content/plugins/` directory81 1. Upload `header-footer-code-manager` to the `/wp-content/plugins/` directory 82 82 1. Activate the plugin through the 'Plugins' menu in WordPress 83 83 1. Go to plugins page to see instructions for shortcode and php template tags … … 115 115 116 116 == Changelog == 117 118 119 120 121 117 122 = 1.1.26 = 2022-07-01 118 123 * FIXED: Code snippet sanitization, removed due to incompatibility with functionality
Note: See TracChangeset
for help on using the changeset viewer.