コード例 #1
0
 /**
  * @internal
  */
 public function _admin_action_enqueue_scripts($hook)
 {
     if ('widgets.php' === $hook) {
         wp_enqueue_style('fw-extension-' . $this->get_name() . '-css', $this->locate_css_URI('sidebar'), array('fw', 'fw-selectize', 'fw-backend-options'), $this->manifest->get_version());
         wp_enqueue_script('fw-extension-' . $this->get_name() . '-autocomplete-js', $this->locate_js_URI('sidebar-autocomplete'), array('fw-events', 'jquery', 'jquery-ui-autocomplete', 'fw'), $this->manifest->get_version());
         wp_localize_script('fw-extension-' . $this->get_name() . '-autocomplete-js', 'noMatchesFoundMsg', __('No matches found', 'fw'));
         wp_enqueue_script('fw-extension-' . $this->get_name() . '-general-js', $this->locate_js_URI('sidebar-general'), array('fw-events', 'jquery', 'fw', 'fw-selectize', 'jquery-ui-tabs'), $this->manifest->get_version());
         wp_localize_script('fw-extension-' . $this->get_name() . '-general-js', 'PhpVar', array('confirmMessage' => __('Do you realy want to change without saving?', 'fw'), 'dynamicSidebars' => $this->backend->get_sidebars_list(), 'missingIdMessage' => __('Missing ID. Check that you provided all mandatory data.', 'fw'), 'createdTabName' => __('Created', 'fw'), 'groupedTabDesc' => __('(For Grouped Pages)', 'fw'), 'specificTabDesc' => __('(For Specific Pages)', 'fw'), 'missingSidebarName' => __('No sidebar name specified', 'fw'), 'newSidebarPlaceholder' => __('Sidebar Name', 'fw'), 'newSidebarLabel' => __('New Sidebar', 'fw'), 'addSidebarButtonTxt' => __('Add', 'fw')));
     }
 }