function extrp_enqueue_scripts() { global $extrp_settings; $css = $extrp_settings['css']; if ($css) { wp_enqueue_style('extrp', extrp_style_uri(), array(), EXTRP_PLUGIN_VERSION); } }
public function extrp_enqueu_scripts() { global $extrp_settings, $extrp_screen_id, $extrp_screen_id_tool; $screen = get_current_screen(); if ($extrp_screen_id != $screen->id && $extrp_screen_id_tool != $screen->id && 'widgets' != $screen->id) { return; } wp_enqueue_style('extrp', extrp_style_uri(), array(), EXTRP_PLUGIN_VERSION, false); wp_enqueue_style('wp-color-picker'); wp_enqueue_style('thickbox'); wp_enqueue_script('wp-lists'); wp_enqueue_script('postbox'); wp_enqueue_script('extrp-script-handle', EXTRP_PLUGIN_URL . 'lib/assets/js/jquery.extrp.js', array('wp-color-picker'), EXTRP_PLUGIN_VERSION, true); wp_enqueue_media(); wp_localize_script('extrp-script-handle', 'extrpL10n', array('subtitletxt' => __('Related News', 'extrp'), 'titlerandomtxt' => __('Random News', 'extrp'), 'notice1' => __('You don't need this parameter by this highlight type.', 'extrp'), 'notice2' => __('Please choose type of highlight first.', 'extrp'), 'notice3' => __('Its default value, enter another one.', 'extrp'), 'notice4' => __('No Value', 'extrp'), 'notice5' => __('Activate or install Relevanssi plugin', 'extrp'), 'ok' => __('OK', 'extrp'), 'null' => __('empty', 'extrp'), 'mediatitle' => __('Select or Upload Media Of Your Chosen Persuasion', 'extrp'), 'buttonmediatext' => __('Set as No Image Thumbnail', 'extrp'))); wp_localize_script('extrp-script-handle', 'extrpSet', array('iecol' => $this->iecol, 'ieclass' => $this->ieclass, 'iecss' => $this->iecss, 'hl' => '', 'noimage' => $extrp_settings['noimage']['default'])); add_thickbox(); $extrp_css = ' .column-parameter, .column-lang{width:10%} .column-normal{width:11%} .column-description{width:20%} '; if ($screen->id == $extrp_screen_id_tool) { wp_add_inline_style('extrp', $extrp_css); } }