Changeset 2490297
- Timestamp:
- 03/09/2021 07:59:22 AM (5 years ago)
- File:
-
- 1 edited
-
redirect-editor/trunk/redirect-editor.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
redirect-editor/trunk/redirect-editor.php
r2488683 r2490297 110 110 return $notices; 111 111 } 112 public function create_plugin_settings_page() { 113 // Add the menu item and page 114 $page_title = 'SEO redirect editor'; 115 $menu_title = 'SEO redirect editor'; 116 $capability = 'manage_options'; 117 $slug = 'smashing_fields'; 118 $callback = array( $this, 'plugin_settings_page_content' ); 119 $icon = 'dashicons-admin-plugins'; 120 $position = 100; 121 122 add_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position ); 123 } 124 125 public function plugin_settings_page_content() { 126 $redirects = $this->get_setting('redirects_raw'); 127 128 129 wp_enqueue_script('ajax-security', plugin_dir_url(__FILE__) . 'plugin.js', [ 130 'jquery' 131 ], false, true); 132 wp_enqueue_script('datatables', 'data-tables.css', array( 133 'jquery' 134 )); 135 wp_enqueue_style('datatables-style', 'jquery-datatables.css'); 136 wp_enqueue_style('font-awesome', 'font-awesome.css'); 137 138 wp_localize_script('ajax-security', 'ajax_object', [ 139 'ajax_url' => admin_url('admin-ajax.php'), 140 'nonce' => wp_create_nonce($this->_SaveScanIdActionName) 141 ]); 142 143 require_once ('form.php'); 144 145 } 112 146 113 147 private static function update_notices(array $notices)
Note: See TracChangeset
for help on using the changeset viewer.