本文整理汇总了PHP中Note::plugin_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Note::plugin_url方法的具体用法?PHP Note::plugin_url怎么用?PHP Note::plugin_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note::plugin_url方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wp_enqueue_scripts
public function wp_enqueue_scripts()
{
// Note Widget Styles (only enqueue styles if this widget is active)
if (function_exists('Note_Widget')) {
// Grab the Note Widget instance
$note_widget = Note_Widget();
if (is_active_widget(false, false, $note_widget->id_base, true)) {
// Note Widget
wp_enqueue_style('note-widget', Note::plugin_url() . '/assets/css/widgets/note-widget.css', false, Note::$version);
}
}
}
示例2: wp_enqueue_scripts
public function wp_enqueue_scripts()
{
global $tinymce_version, $concatenate_scripts, $compress_scripts, $wp_version;
// Concatenate Scripts
if (!isset($concatenate_scripts)) {
script_concat_settings();
}
// TinyMCE Compressed
if ($compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) {
wp_enqueue_script('note-tinymce', includes_url('js/tinymce') . '/wp-tinymce.php?c=1', false, $tinymce_version, true);
} else {
wp_enqueue_script('note-tinymce', includes_url('js/tinymce') . '/tinymce.min.js', false, $tinymce_version, true);
wp_enqueue_script('note-tinymce-compat3x', includes_url('js/tinymce') . '/plugins/compat3x/plugin.min.js', array('note-tinymce'), $tinymce_version, true);
}
// Localize the Note TinyMCE script information
wp_localize_script('note-tinymce', 'note_tinymce', $this->note_tinymce_localize);
// If less than WordPress 4.0
if (version_compare($wp_version, '4.0', '<')) {
// Load our version of 'wpview' plugin
wp_enqueue_script('note-tinymce-wpview', Note::plugin_url() . '/assets/js/note-tinymce-view.js', array('note-tinymce'), Note::$version, true);
// Load backwards compatibility 'lists' plugin
wp_enqueue_script('note-tinymce-lists', Note::plugin_url() . '/assets/js/note-tinymce-lists.js', array('note-tinymce'), Note::$version, true);
}
// Note TinyMCE Insert Plugin
wp_enqueue_script('note-tinymce-insert', Note::plugin_url() . '/assets/js/note-tinymce-insert.js', array('note-tinymce'), Note::$version, true);
// Note TinyMCE Image Plugin
wp_enqueue_script('note-tinymce-image', Note::plugin_url() . '/assets/js/note-tinymce-image.js', array('note-tinymce'), Note::$version, true);
// Note TinyMCE Theme
wp_enqueue_script('note-tinymce-theme', Note::plugin_url() . '/assets/js/note-tinymce-theme.js', array('note-tinymce'), Note::$version, true);
// Note Core
wp_enqueue_script('note', Note::plugin_url() . '/assets/js/note.js', array('note-tinymce', 'wp-util', 'editor', 'wp-lists', 'customize-preview-widgets', 'jquery-ui-core', 'underscore'), Note::$version, true);
wp_localize_script('note', 'note', $this->note_localize);
// WordPress Lists
wp_enqueue_script('wp-lists');
wp_localize_script('wp-lists', 'ajaxurl', admin_url('admin-ajax.php'));
// WordPress Links
wp_enqueue_script('wplink');
wp_localize_script('wplink', 'ajaxurl', admin_url('admin-ajax.php'));
// WordPress Core/Modal Styles
wp_enqueue_style('wp-core-ui', Note::plugin_url() . '/assets/css/wp-core-ui.css', false, Note::$version);
wp_enqueue_style('buttons');
wp_enqueue_style('note-modal', Note::plugin_url() . '/assets/css/modal.css', false, Note::$version);
wp_enqueue_style('note-link-modal', Note::plugin_url() . '/assets/css/link-modal.css', false, Note::$version);
// WordPress Media (has to come after WordPress Core/Modal Styles)
wp_enqueue_media();
// TinyMCE Core CSS
wp_enqueue_style('tinymce-core', Note::plugin_url() . '/assets/css/tinymce-core.css', false, Note::$version);
// TinyMCE View CSS
wp_enqueue_style('tinymce-view', Note::plugin_url() . '/assets/css/tinymce-view.css', false, Note::$version);
// Note Theme CSS
wp_enqueue_style('note', Note::plugin_url() . '/assets/css/note.css', false, Note::$version);
// Dashicons
wp_enqueue_style('dashicons');
}
示例3: admin_enqueue_scripts
/**
* This function enqueues the necessary styles associated with this widget on admin.
*/
public function admin_enqueue_scripts($hook)
{
// Only on Widgets Admin Page
if ($hook === 'widgets.php') {
wp_enqueue_style('note-widget-admin', Note::plugin_url() . '/assets/css/widgets/note-widget-admin.css', array('dashicons'));
}
}
示例4: admin_enqueue_scripts
/**
* This function enqueues CSS/JavaScript on the Note Options Page.
*/
public function admin_enqueue_scripts($hook)
{
// Bail if we're not on the note page
if ($hook !== Note_Admin_Options::$menu_page) {
return;
}
// Stylesheets
wp_enqueue_style('note-admin', Note::plugin_url() . '/assets/css/note-admin.css', false, Note::$version);
// Scripts
wp_enqueue_script('note-admin', Note::plugin_url() . '/assets/js/note-admin.js', array('jquery', 'common'), Note::$version, true);
wp_enqueue_script('jquery-fitvids', Note::plugin_url() . '/assets/js/fitvids.js', array('jquery'), Note::$version, true);
}
示例5: admin_enqueue_scripts
/**
* This function enqueues the necessary styles associated with this widget on admin.
*/
public function admin_enqueue_scripts($hook)
{
// Only on Widgets Admin Page
if ($hook === 'widgets.php') {
// Note Widget Admin CSS
wp_enqueue_style('note-widget-admin', Note::plugin_url() . '/assets/css/widgets/note-widget-admin.css', array('dashicons'), Note::$version);
//Note Widget Admin
wp_enqueue_script('note-widget-admin', Note::plugin_url() . '/assets/js/widgets/note-widget-admin.js', array('jquery', 'underscore'), Note::$version, true);
// Only in the widgets admin
if (!is_customize_preview()) {
// Grab the Note Customizer instance
$note_customizer = Note_Customizer();
// Setup Note Widget localize data (data is stored in $note_customizer->note_localize after this function runs)
$note_customizer->setup_note_widget_localize_data();
// Localize the Note Customizer script information
wp_localize_script('note-widget-admin', 'note', $note_customizer->note_localize);
}
}
}