• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_enqueue_media函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wp_enqueue_media函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_enqueue_media函数的具体用法?PHP wp_enqueue_media怎么用?PHP wp_enqueue_media使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wp_enqueue_media函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: wpum_admin_cssjs

/**
 * Loads the plugin admin assets files
 *
 * @since 1.0.0
 * @return void
 */
function wpum_admin_cssjs()
{
    $js_dir = WPUM_PLUGIN_URL . 'assets/js/';
    $css_dir = WPUM_PLUGIN_URL . 'assets/css/';
    // Use minified libraries if SCRIPT_DEBUG is turned off
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
    // Styles & scripts
    wp_register_style('wpum-admin', $css_dir . 'wp_user_manager' . $suffix . '.css', WPUM_VERSION);
    wp_register_style('wpum-admin-general', WPUM_PLUGIN_URL . 'assets/css/wp_user_manager_admin_general.css', WPUM_VERSION);
    wp_register_style('wpum-select2', WPUM_PLUGIN_URL . 'assets/select2/css/select2.css', WPUM_VERSION);
    wp_register_script('wpum-select2', WPUM_PLUGIN_URL . 'assets/select2/js/select2.min.js', 'jQuery', WPUM_VERSION, true);
    wp_register_script('wpum-serializeJSON', WPUM_PLUGIN_URL . 'assets/js/vendor/jquery.serializeJSON.js', 'jQuery', WPUM_VERSION, true);
    wp_register_script('wpum-admin-js', $js_dir . 'wp_user_manager_admin' . $suffix . '.js', 'jQuery', WPUM_VERSION, true);
    // Enquery styles and scripts anywhere needed
    wp_enqueue_style('wpum-admin-general');
    // Enqueue styles & scripts on admin page only
    $screen = get_current_screen();
    wp_enqueue_script('wpum-admin-js');
    // Load styles only on required pages.
    if ($screen->base == 'users_page_wpum-settings' || $screen->id == 'wpum_directory' || $screen->base == 'users_page_wpum-edit-field' || $screen->base == 'users_page_wpum-profile-fields') {
        wp_enqueue_script('wpum-select2');
        wp_enqueue_style('wpum-admin');
        wp_enqueue_style('wpum-select2');
        wp_enqueue_script('accordion');
        wp_enqueue_media();
        if (isset($_GET['tab']) && $_GET['tab'] == 'default_fields' && $screen->base == 'users_page_wpum-settings') {
            wp_enqueue_script('jquery-ui-sortable');
        }
        if ($screen->base == 'users_page_wpum-custom-fields-editor') {
            wp_enqueue_script('wpum-serializeJSON');
        }
    }
    // Backend JS Settings
    wp_localize_script('wpum-admin-js', 'wpum_admin_js', array('ajax' => admin_url('admin-ajax.php'), 'confirm' => __('Are you sure you want to do this? This action cannot be reversed.', 'wpum'), 'use_this_file' => __('Use This File', 'wpum'), 'upload_title' => __('Upload or select a file', 'wpum')));
}
开发者ID:pierreglardon,项目名称:gdv-ttc,代码行数:41,代码来源:assets.php


示例2: enqueue_admin_scripts

 public function enqueue_admin_scripts()
 {
     if (get_current_screen()->id == $this->plugin_screen_hook_suffix) {
         wp_enqueue_script($this->plugin_slug . '-admin-script', get_stylesheet_directory_uri() . '/video-player/js/progression-admin.js', array('jquery', 'wp-color-picker'), $this->version);
     }
     wp_enqueue_media();
 }
开发者ID:katstar01,项目名称:fivebeers,代码行数:7,代码来源:video-player.php


示例3: emg_load_wp_enqueue

 function emg_load_wp_enqueue()
 {
     if (get_post_type(get_the_ID()) == 'easymediagallery') {
         $eparams = array('pcnt' => emg_pcnt(), 'psts' => get_post_status(get_the_ID()), 'pcurtp' => get_post_meta(get_the_ID(), 'easmedia_metabox_media_type', true));
         wp_localize_script('cpscript', 'easyMeta', $eparams);
         if (EMG_WP_VER == "g35") {
             wp_enqueue_media();
         }
         wp_enqueue_script('jquery-multi-sel');
         wp_enqueue_style('jquery-multiselect-css');
         wp_enqueue_style('jquery-ui-themes-redmond');
         wp_enqueue_style('emg-bootstrap-css');
         wp_enqueue_script('jquery-ui');
         wp_enqueue_script('jquery-effects-highlight');
         wp_enqueue_script('easymedia-jplayer-js', plugins_url('js/jplayer/jquery.jplayer.min.js', __FILE__));
         wp_enqueue_script('cpscript');
         wp_enqueue_script('jquery-i-button', plugins_url('js/jquery/jquery.ibutton.js', __FILE__));
         wp_enqueue_style('metabox-ibuttoneditor', plugins_url('css/ibutton.css', __FILE__), false, EASYMEDIA_VERSION);
         wp_enqueue_style('easymedia-jplayer-css', plugins_url('css/jplayer/skin/pink.flag/jplayer.pink.flag.css', __FILE__), false, EASYMEDIA_VERSION);
         wp_enqueue_style('jquery-messi-css');
         wp_enqueue_script('jquery-messi-js');
         wp_enqueue_script('emg-bootstrap-js');
         wp_enqueue_script('easymedia-metascript', plugins_url('functions/metabox/metabox.js', __FILE__));
         // @since 1.3.10 >
         if (easy_get_option('easymedia_disen_autoupdt') != '1' && is_admin()) {
             add_action('admin_notices', 'easmedia_update_notify');
         }
     }
 }
开发者ID:paulcherrypipka,项目名称:wptest,代码行数:29,代码来源:metaboxes.php


示例4: automobile_theme_options_scripts

/**
 * Include scripts to the options page only
 */
function automobile_theme_options_scripts()
{
    if (!did_action('wp_enqueue_media')) {
        wp_enqueue_media();
    }
    wp_enqueue_script('automobile_upload', plugins_url('/js/upload.js', __FILE__));
}
开发者ID:jakiir,项目名称:auto-mobile,代码行数:10,代码来源:automobile-options.php


示例5: enqueueScripts

 /**
  * Enqueue admin scripts & styles
  */
 function enqueueScripts()
 {
     if (get_post_type() == 'wpdmpro' || in_array(wpdm_query_var('page'), array('settings', 'emails', 'wpdm-stats', 'templates', 'importable-files', 'wpdm-addons', 'orders', 'pp-license'))) {
         wp_enqueue_script('jquery');
         wp_enqueue_script('jquery-form');
         wp_enqueue_script('jquery-ui-core');
         wp_enqueue_script('jquery-ui-tabs');
         wp_enqueue_script('jquery-ui-datepicker');
         wp_enqueue_script('jquery-ui-slider');
         wp_enqueue_script('jquery-ui-sortable');
         wp_enqueue_script('jquery-ui-timepicker', WPDM_BASE_URL . 'assets/js/jquery-ui-timepicker-addon.js', array('jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'jquery-ui-slider'));
         wp_enqueue_style('icons', plugins_url() . '/download-manager/assets/css/icons.css');
         wp_enqueue_script('thickbox');
         wp_enqueue_style('thickbox');
         wp_enqueue_script('media-upload');
         wp_enqueue_media();
         wp_enqueue_script('jquery-choosen', plugins_url('/download-manager/assets/js/chosen.jquery.min.js'), array('jquery'));
         wp_enqueue_style('choosen-css', plugins_url('/download-manager/assets/css/chosen.css'));
         wp_enqueue_style('jqui-css', plugins_url('/download-manager/assets/jqui/theme/jquery-ui.css'));
         wp_enqueue_script('wpdm-bootstrap', plugins_url('/download-manager/assets/bootstrap/js/bootstrap.min.js'), array('jquery'));
         wp_enqueue_script('wpdm-admin', plugins_url('/download-manager/assets/js/wpdm-admin.js'), array('jquery'));
         wp_enqueue_style('font-awesome', WPDM_BASE_URL . 'assets/font-awesome/css/font-awesome.min.css');
         wp_enqueue_style('wpdm-bootstrap', plugins_url('/download-manager/assets/bootstrap/css/bootstrap.css'));
         wp_enqueue_style('wpdm-bootstrap-theme', plugins_url('/download-manager/assets/bootstrap/css/bootstrap-theme.min.css'));
         wp_enqueue_style('wpdm-admin-styles', plugins_url('/download-manager/assets/css/admin-styles.css'));
     }
 }
开发者ID:wilxsv,项目名称:prevensionPublicLibrary,代码行数:30,代码来源:class.WordPressDownloadManagerAdmin.php


示例6: sunset_load_admin_scripts

function sunset_load_admin_scripts($hook)
{
    //echo $hook;
    //register css admin section
    wp_register_style('raleway-admin', 'https://fonts.googleapis.com/css?family=Raleway:200,300,500');
    wp_register_style('sunset_admin', get_template_directory_uri() . '/css/sunset.admin.css', array(), '1.0.0', 'all');
    //register js admin section
    wp_register_script('sunset-admin-script', get_template_directory_uri() . '/js/sunset.admin.js', array('jquery'), '1.0.0', true);
    $pages_array = array('toplevel_page_alecaddd_sunset', 'sunset_page_alecaddd_sunset_theme', 'sunset_page_alecaddd_sunset_theme_contact');
    if (in_array($hook, $pages_array)) {
        wp_enqueue_style('raleway-admin');
        wp_enqueue_style('sunset_admin');
    } else {
        if ('toplevel_page_alecaddd_sunset' == $hook) {
            wp_enqueue_media();
            wp_enqueue_script('sunset-admin-script');
        } else {
            if ('sunset_page_alecaddd_sunset_css' == $hook) {
                wp_enqueue_style('raleway-admin');
                wp_enqueue_style('sunset_admin');
                wp_enqueue_style('ace', get_template_directory_uri() . '/css/sunset.ace.css', array(), '1.0.0', 'all');
                wp_enqueue_script('ace', get_template_directory_uri() . '/js/ace/ace.js', array('jquery'), '1.2.1', true);
                wp_enqueue_script('sunset-custom-css-script', get_template_directory_uri() . '/js/sunset.custom_css.js', array('jquery'), '1.0.0', true);
            } else {
                return;
            }
        }
    }
}
开发者ID:Alecaddd,项目名称:Sunset-theme,代码行数:29,代码来源:enqueue.php


示例7: enqueue_media

 public function enqueue_media()
 {
     if (!$this->is_active()) {
         return;
     }
     wp_enqueue_media();
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:7,代码来源:New.php


示例8: admin_enqueue_scripts

 /**
  * Queue assets for taxonomy screens.
  *
  * @since 1.5.0
  */
 public function admin_enqueue_scripts()
 {
     $pagenow = $GLOBALS['pagenow'];
     if (!(self::is_term_edit($pagenow) || self::is_term_overview($pagenow))) {
         return;
     }
     $asset_manager = new WPSEO_Admin_Asset_Manager();
     $asset_manager->enqueue_style('scoring');
     $tag_id = filter_input(INPUT_GET, 'tag_ID');
     if (self::is_term_edit($pagenow) && !empty($tag_id)) {
         wp_enqueue_media();
         // Enqueue files needed for upload functionality.
         $asset_manager->enqueue_style('metabox-css');
         $asset_manager->enqueue_style('snippet');
         $asset_manager->enqueue_style('scoring');
         wp_editor('', 'description');
         $asset_manager->enqueue_script('metabox');
         $asset_manager->enqueue_script('term-scraper');
         wp_localize_script(WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper', 'wpseoTermScraperL10n', $this->localize_term_scraper_script());
         wp_localize_script(WPSEO_Admin_Asset_Manager::PREFIX . 'replacevar-plugin', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script());
         wp_localize_script(WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', substr(get_locale(), 0, 2));
         $asset_manager->enqueue_script('admin-media');
         wp_localize_script(WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media', 'wpseoMediaL10n', array('choose_image' => __('Use Image', 'wordpress-seo')));
     }
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:30,代码来源:class-taxonomy.php


示例9: accesspress_lite_admin_scripts

 function accesspress_lite_admin_scripts()
 {
     wp_enqueue_media();
     wp_enqueue_script('accesspresslite_custom_js', get_template_directory_uri() . '/inc/admin-panel/js/custom.js', array('jquery'));
     wp_enqueue_script('of-media-uploader', get_template_directory_uri() . '/inc/admin-panel/js/media-uploader.js', array('jquery'));
     wp_enqueue_style('accesspresslite_admin_style', get_template_directory_uri() . '/inc/admin-panel/css/admin.css', '1.0', 'screen');
 }
开发者ID:Kashnars,项目名称:portfolio,代码行数:7,代码来源:theme-options.php


示例10: admin_enqueue_scripts

 /**
  * Enqueue scripts and styles
  *
  * @return void
  */
 static function admin_enqueue_scripts()
 {
     wp_enqueue_media();
     wp_enqueue_style('mashsb-rwmb-media', MASHSB_RWMB_CSS_URL . 'media.css', array(), MASHSB_RWMB_VER);
     wp_enqueue_script('mashsb-rwmb-media', MASHSB_RWMB_JS_URL . 'media.js', array('jquery-ui-sortable', 'underscore', 'backbone'), MASHSB_RWMB_VER, true);
     wp_localize_script('mashsb-rwmb-media', 'i18nRwmbMedia', array('add' => apply_filters('rwmb_media_add_string', _x('Add Image', 'media', 'meta-box')), 'single' => apply_filters('rwmb_media_single_files_string', _x(' file', 'media', 'meta-box')), 'multiple' => apply_filters('rwmb_media_multiple_files_string', _x(' files', 'media', 'meta-box')), 'remove' => apply_filters('rwmb_media_remove_string', _x('Remove', 'media', 'meta-box')), 'edit' => apply_filters('rwmb_media_edit_string', _x('Edit', 'media', 'meta-box')), 'view' => apply_filters('rwmb_media_view_string', _x('View', 'media', 'meta-box')), 'noTitle' => _x('No Title', 'media', 'meta-box'), 'loadingUrl' => MASHSB_RWMB_URL . 'img/loader.gif', 'extensions' => self::get_mime_extensions(), 'select' => _x('Select Files', 'media', 'meta-box'), 'uploadInstructions' => _x('Drop files here to upload', 'media', 'meta-box')));
 }
开发者ID:netmagik,项目名称:netmagik,代码行数:12,代码来源:media.php


示例11: __construct

    public function __construct()
    {
        add_action('admin_enqueue_scripts', function () {
            if (did_action('wp_enqueue_media') == false) {
                wp_enqueue_media();
            }
            wp_add_inline_script('image-edit', '
				jQuery(".plance-medial-button-select").live("click",function()
				{
					var send_attachment_bkp = wp.media.editor.send.attachment;
					var $btn = jQuery(this);
					wp.media.editor.send.attachment = function(props, attachment)
					{
						jQuery($btn).parents(".plance-medial").find(".plance-medial-img").attr("src", attachment.url);
						jQuery($btn).parents(".plance-medial").find(".plance-medial-src").val(attachment.url);
						wp.media.editor.send.attachment = send_attachment_bkp;
					}
					wp.media.editor.open($btn);

					return false;
				});

				jQuery(".plance-medial-button-remove").live("click",function()
				{
					var $p = jQuery(this).parents(".plance-medial");
					var src = $p.find(".plance-medial-img").attr("data-src");
					$p.find(".plance-medial-img").attr("src", src);
					$p.find(".plance-medial-src").val("");

					return false;
				});
			');
        });
    }
开发者ID:plance,项目名称:wp-plugin-library,代码行数:34,代码来源:media.php


示例12: admin_setup

 function admin_setup()
 {
     wp_enqueue_media();
     wp_register_script('tpw-admin-js', plugins_url('tpw_admin.js', __FILE__), array('jquery', 'media-upload', 'media-views'));
     wp_enqueue_script('tpw-admin-js');
     wp_enqueue_style('tpw-admin', plugins_url('tpw_admin.css', __FILE__));
 }
开发者ID:jqueryalmeida,项目名称:wp-widgets,代码行数:7,代码来源:titlepage_widget.php


示例13: fg_enqueue_stuff

function fg_enqueue_stuff()
{
    wp_enqueue_media();
    wp_enqueue_script('fg-admin-script', plugin_dir_url(dirname(__FILE__)) . 'js/admin.js');
    wp_localize_script('fg-admin-script', 'myAjax', array('ajaxurl' => admin_url('admin-ajax.php')));
    wp_enqueue_style('fg-admin-style', plugin_dir_url(dirname(__FILE__)) . 'css/admin.css');
}
开发者ID:domalexxx,项目名称:nashvancouver,代码行数:7,代码来源:enqueuing.php


示例14: theme_widgets_admin_scripts

function theme_widgets_admin_scripts()
{
    wp_enqueue_media();
    wp_enqueue_style('theme-widgets-style', ELUSICVE_THEME_URI . '/includes/widgets/scripts/theme-widgets-style.css');
    wp_enqueue_script('theme-widgets-js', ELUSICVE_THEME_URI . '/includes/widgets/scripts/theme-widgets-js.js', array('jquery', 'media-upload'), '1.0', true);
    wp_localize_script('theme-widgets-js', 'theme_widgets_settings', array('ajax_url' => admin_url('admin-ajax.php'), 'action' => 'theme_widgets_stttings'));
}
开发者ID:anup04sust,项目名称:filtrustfinancial,代码行数:7,代码来源:widgets-init.php


示例15: addCommonScripts

 /**
  * 
  * add common used scripts
  */
 public static function addCommonScripts()
 {
     //include jquery ui
     if (GlobalsRevSlider::$isNewVersion) {
         //load new jquery ui library
         $urlJqueryUI = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js";
         self::addScriptAbsoluteUrl($urlJqueryUI, "jquery-ui");
         self::addStyle("jquery-ui-1.9.2.custom.min", "jui-smoothness", "css/jui/new");
         if (function_exists("wp_enqueue_media")) {
             wp_enqueue_media();
         }
     } else {
         //load old jquery ui library
         $urlJqueryUI = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js";
         self::addScriptAbsoluteUrl($urlJqueryUI, "jquery-ui");
         self::addStyle("jquery-ui-1.8.18.custom", "jui-smoothness", "css/jui/old");
     }
     self::addScriptCommon("settings", "unite_settings");
     self::addScriptCommon("admin", "unite_admin");
     self::addScriptCommon("jquery.tipsy", "tipsy");
     //--- add styles
     self::addStyleCommon("admin", "unite_admin");
     //add tipsy
     self::addStyleCommon("tipsy", "tipsy");
     //include farbtastic
     self::addScriptCommon("my-farbtastic", "my-farbtastic", "js/farbtastic");
     self::addStyleCommon("farbtastic", "farbtastic", "js/farbtastic");
     //include codemirror
     self::addScriptCommon("codemirror", "codemirror_js", "js/codemirror");
     self::addScriptCommon("css", "codemirror_js_css", "js/codemirror");
     self::addStyleCommon("codemirror", "codemirror_css", "js/codemirror");
 }
开发者ID:venkimithu,项目名称:npmgroups,代码行数:36,代码来源:base_admin.class.php


示例16: enqueue_scripts

 public function enqueue_scripts()
 {
     wp_enqueue_media();
     wp_enqueue_script($this->plugin_name . '-admin', plugin_dir_url(__FILE__) . 'js/selcont-admin.js', array('jquery'), $this->version, false);
     wp_enqueue_script($this->plugin_name . '-slides', plugin_dir_url(__FILE__) . 'js/selcont-slides.js', array('jquery'), $this->version, false);
     wp_localize_script($this->plugin_name . '-slides', 'selcont_admin', array('gallery_title' => __('Add Slides to Lecture', 'selcont'), 'gallery_button' => __('Add to lecture', 'selcont'), 'delete_image' => __('Delete slide', 'selcont'), 'default_title' => __('Upload', 'selcont'), 'default_button' => __('Select this', 'selcont')));
 }
开发者ID:aandreatos,项目名称:selcont,代码行数:7,代码来源:class-selcont-admin.php


示例17: saasaparilla_load_admin_scripts

/**
 * Load admin scripts
 *
 * @since       1.0.0
 * @param       string $hook The hook for the page we are viewing
 * @global      object $post The WordPress post object
 * @global      string $wp_version The WordPress version
 * @return      void
 */
function saasaparilla_load_admin_scripts($hook)
{
    // Use minified libraries if SCRIPT_DEBUG is turned off
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
    $js_dir = SAASAPARILLA_URL . 'assets/js/';
    $css_dir = SAASAPARILLA_URL . 'assets/css/';
    // Font must be loaded globally
    wp_enqueue_style('saasaparilla-font', $css_dir . 'font' . $suffix . '.css', SAASAPARILLA_VER);
    if (!apply_filters('saasaparilla_load_admin_scripts', saasaparilla_is_admin_page($hook), $hook)) {
        return;
    }
    global $post, $wp_version;
    wp_enqueue_script('saasaparilla', $js_dir . 'admin' . $suffix . '.js', array('jquery'), SAASAPARILLA_VER, false);
    wp_localize_script('saasaparilla', 'saasaparilla_vars', array());
    wp_enqueue_style('wp-color-picker');
    wp_enqueue_script('wp-color-picker');
    wp_enqueue_style('colorbox', $css_dir . 'colorbox' . $suffix . '.css', array(), '1.3.20');
    wp_enqueue_script('colorbox', $js_dir . 'jquery.colorbox-min.js', array('jquery'), '1.3.20');
    if (function_exists('wp_enqueue_media') && version_compare($wp_version, '3.5', '>=')) {
        wp_enqueue_media();
    }
    wp_enqueue_script('jquery-ui-datepicker');
    wp_enqueue_script('jquery-ui-dialog');
    $ui_style = get_user_option('admin_color') == 'classic' ? 'classic' : 'fresh';
    wp_enqueue_style('jquery-ui-css', $css_dir . 'jquery-ui-' . $ui_style . $suffix . '.css');
    wp_enqueue_script('media-upload');
    wp_enqueue_script('thickbox');
    wp_enqueue_style('thickbox');
    wp_enqueue_style('saasaparilla', $css_dir . 'saasaparilla' . $suffix . '.css', SAASAPARILLA_VER);
}
开发者ID:saivarunk,项目名称:SaaSaparilla,代码行数:39,代码来源:scripts.php


示例18: enqueueMediaUploaderAssets

 /**
  *
  */
 public function enqueueMediaUploaderAssets()
 {
     // necessary for wp.media to work (already handled in post edit screen, but not for widgets.php)
     wp_enqueue_media();
     wp_enqueue_script('media-uploader-js', '/wp-content/plugins/oop-theme-plugin/resources/scripts/media-uploader.js', array('jquery', 'media-upload', 'media-views'), $this->getWidget()->getVersion());
     wp_enqueue_style('media-uploader-css', '/wp-content/plugins/oop-theme-plugin/resources/styles/media-uploader.css', array(), $this->getWidget()->getVersion());
 }
开发者ID:blogwerk,项目名称:oop-theme-plugin,代码行数:10,代码来源:WidgetAttachmentFormField.php


示例19: enqueue_admin_script

 /**
  * Enqueue scripts
  */
 public function enqueue_admin_script()
 {
     WR_Pb_Helper_Functions::enqueue_scripts_modal();
     wp_enqueue_media();
     WR_Pb_Helper_Functions::enqueue_scripts_end();
     WR_Pb_Init_Assets::load(array('wr-pb-placeholder'));
 }
开发者ID:zulfnore,项目名称:WR-PageBuilder,代码行数:10,代码来源:modal.php


示例20: generate_meta_box

 /**
  * generate Input type
  */
 public function generate_meta_box()
 {
     global $post_id;
     $bootstrap = new Bootstrap();
     $bootstrap->load_bootstrap_css();
     foreach ($this->meta_boxes["input"] as $input) {
         switch ($input["type"]) {
             case "text":
                 $this->render->view("input.text", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             case "editor":
                 $this->render->view("input.editor", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             case "textarea":
                 $this->render->view("input.textarea", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             case "email":
                 $this->render->view("input.email", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             case "img":
                 wp_enqueue_media();
                 $this->render->view("img", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             default:
                 $this->render->view($input["type"], $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
         }
     }
 }
开发者ID:Darkan35,项目名称:Wordpress-CPT-class,代码行数:32,代码来源:PluginMetaBox.php



注:本文中的wp_enqueue_media函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_enqueue_script函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_encode_emoji函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap