当前位置: 首页>>代码示例>>PHP>>正文


PHP Utils::assets_url方法代码示例

本文整理汇总了PHP中Utils::assets_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils::assets_url方法的具体用法?PHP Utils::assets_url怎么用?PHP Utils::assets_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utils的用法示例。


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

示例1: scripts_and_styles

 /**
  * Add scripts and styles
  */
 public function scripts_and_styles()
 {
     /**
      * Add scripts
      */
     wp_enqueue_script('accordion-widget', Utils::assets_url() . '/js/accordion-widget.js', array('jquery'));
     /**
      * Add styles
      */
     wp_enqueue_style('accordion', Utils::assets_url() . '/css/accordion.css');
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:14,代码来源:monster-accordion.php

示例2: scripts_and_styles

 /**
  * Add scripts and styles
  */
 public function scripts_and_styles()
 {
     /**
      * Add scripts
      */
     wp_enqueue_script('flex-slider', Utils::assets_url() . 'js/jquery.flexslider-min.js', array('jquery'));
     wp_enqueue_script('flex-slider-widget', Utils::assets_url() . 'js/flex-slider-widget.js', array('jquery'));
     /**
      * Add styles
      */
     wp_enqueue_style('flex-slider', Utils::assets_url() . 'css/flexslider.css');
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:15,代码来源:monster-flex-slider.php

示例3: conf_enqueue_comment_reply

<?php

/**
 * Load all assets
 *
 * @package photolab
 */
/**
 * Enqueue comment reply
 */
function conf_enqueue_comment_reply()
{
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
return array('scripts' => array(array('photolab-navigation', Utils::assets_url() . 'js/navigation.js', array(), '20120206', true), array('photolab-skip-link-focus-fix', Utils::assets_url() . 'js/skip-link-focus-fix.js', array(), '20130115', true), array('photolab-superfish', Utils::assets_url() . 'js/jquery.superfish.min.js', array('jquery'), '1.4.9', true), array('photolab-mobilemenu', Utils::assets_url() . 'js/jquery.mobilemenu.js', array('jquery'), '1.0', true), array('photolab-sfmenutouch', Utils::assets_url() . 'js/jquery.sfmenutouch.js', array('jquery'), '1.0', true), array('photolab-magnific-popup', Utils::assets_url() . 'js/jquery.magnific-popup.min.js', array('jquery'), '1.0.0', true), array('photolab-device', Utils::assets_url() . 'js/device.min.js', array('jquery'), '1.0.2', true), array('photolab-sticky', Utils::assets_url() . 'js/jquery.stickyheader.js', array('jquery'), '1.0', true), array('photolab-custom', Utils::assets_url() . 'js/custom.js', array('jquery'), '1.0', true), array('masonry', 'https://cdnjs.cloudflare.com/ajax/libs/masonry/3.3.2/masonry.pkgd.min.js', array('jquery'))), 'styles' => array(array('photolab-layout', Utils::assets_url() . 'css/layout.css', array(), '1.1.0'), array('photolab-magnific-popup', Utils::assets_url() . 'css/magnific-popup.css', array(), '1.1.0'), array('dashicons'), array('photolab-fonts', Main_Model::fonts_url(), array(), null), array('photolab-style', get_stylesheet_uri(), array(), '1.1.0'), array('photolab-font-awesome', Utils::assets_url() . 'css/font-awesome-4.5.0/css/font-awesome.min.css', array()), array('photolab-layout-ie', Utils::assets_url() . 'css/layout-ie.css', array(), '1.1.0')), 'localize' => array(array('photolab-custom', 'photolab_custom', array('stickup_menu' => Header_Settings_Model::get_stickup_menu())), array('photolab-layout-ie', 'conditional', 'lte IE 8')), 'custom' => array('conf_enqueue_comment_reply'));
开发者ID:gcofficial,项目名称:basetheme,代码行数:17,代码来源:assets.php

示例4: admin_assets

 /**
  * Include admin assets
  *
  * @since 1.0
  */
 public function admin_assets()
 {
     // Custom styles
     wp_register_style('tm-custom-posts-admin', Utils::assets_url() . '/css/custom-posts-widget-admin.min.css');
     wp_enqueue_style('tm-custom-posts-admin');
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:11,代码来源:monster-custom-posts-widget.php

示例5: frontend_assets

 /**
  * Include frontend assets
  *
  * @since 1.0
  */
 public function frontend_assets()
 {
     // Custom styles
     wp_register_style('tm-youtube-subscribe-frontend', Utils::assets_url() . '/css/youtube-subscribe-widget-frontend.min.css');
     wp_enqueue_style('tm-youtube-subscribe-frontend');
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:11,代码来源:monster-youtube-subscribe-widget.php

示例6: scripts_and_styles

 /**
  * This function enqueues scripts and styles in the Customizer.
  */
 public function scripts_and_styles()
 {
     wp_enqueue_script('my-customizer-script', Utils::assets_url() . '/js/customizer.js', array('customize-controls'));
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:7,代码来源:options.php

示例7: form

 /**
  * Create admin form for widget
  *
  * @param type $instance array.
  * @since 1.1
  */
 public function form($instance)
 {
     $this->admin_assets();
     $title_field = new UI_Input_Fox(array('id' => $this->get_field_id('title'), 'name' => $this->get_field_name('title'), 'value' => Utils::array_get($instance, 'title'), 'placeholder' => __('New title', PHOTOLAB_BASE_TM_ALIAS), 'label' => __('Title widget', PHOTOLAB_BASE_TM_ALIAS)));
     $title_html = $title_field->output();
     $users_list = get_users();
     foreach ($users_list as $user) {
         $users[$user->ID] = $user->display_name;
     }
     $users_field = new UI_Select_Fox(array('id' => $this->get_field_id('user_id'), 'name' => $this->get_field_name('user_id'), 'default' => Utils::array_get($instance, 'user_id'), 'options' => $users));
     $users_html = $users_field->output();
     $url_field = new UI_Input_Fox(array('id' => $this->get_field_id('url'), 'name' => $this->get_field_name('url'), 'value' => Utils::array_get($instance, 'url'), 'placeholder' => __('detail url', PHOTOLAB_BASE_TM_ALIAS), 'label' => __('Detail url', PHOTOLAB_BASE_TM_ALIAS)));
     $url_html = $url_field->output();
     $text_link_field = new UI_Input_Fox(array('id' => $this->get_field_id('text_link'), 'name' => $this->get_field_name('text_link'), 'value' => Utils::array_get($instance, 'text_link'), 'placeholder' => __('link text', PHOTOLAB_BASE_TM_ALIAS), 'label' => __('Link text', PHOTOLAB_BASE_TM_ALIAS)));
     $text_link_html = $text_link_field->output();
     $upload_file_field = new UI_Input_Fox(array('id' => $this->get_field_id('upload_image_button'), 'class' => 'upload_image_button button-image', 'type' => 'button', 'name' => $this->get_field_name('upload_image_button'), 'value' => __('Upload image', PHOTOLAB_BASE_TM_ALIAS)));
     $upload_html = $upload_file_field->output();
     $image_url_field = new UI_Input_Fox(array('id' => $this->get_field_id('image'), 'class' => ' custom-image-url', 'type' => 'hidden', 'name' => $this->get_field_name('image'), 'value' => Utils::array_get($instance, 'image')));
     $image_html = $image_url_field->output();
     $delete_image_url_field = new UI_Input_Fox(array('id' => $this->get_field_id('delete_image'), 'class' => 'delete_image_url button-image', 'type' => 'button', 'name' => $this->get_field_name('delete_image'), 'value' => __('Delete image', PHOTOLAB_BASE_TM_ALIAS)));
     $delete_image_html = $delete_image_url_field->output();
     $user_info = get_userdata(Utils::array_get($instance, 'user_id'));
     $default_avatar = Utils::assets_url() . '/images/default-avatar.png';
     if (!empty($image)) {
         $main_avatar = $image;
     } else {
         $main_avatar = $default_avatar;
     }
     echo View::make('widgets/back-end/about-author', array('title_html' => $title_html, 'users_html' => $users_html, 'url_html' => $url_html, 'text_link_html' => $text_link_html, 'upload_html' => $upload_html, 'delete_image_html' => $delete_image_html, 'image_html' => $image_html, 'avatar_id' => $this->get_field_id('avatar'), 'default_image' => $default_avatar, 'avatar' => $main_avatar));
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:36,代码来源:monster-about-author-widget.php

示例8: array

<?php

/**
 * Install all supports
 *
 * @package photolab
 */
return array('title-tag', 'automatic-feed-links', 'post-formats' => array('aside', 'image', 'gallery', 'video', 'quote', 'link'), 'custom-background' => apply_filters('photolab_custom_background_args', array('default-color' => 'ffffff', 'default-image' => '')), 'html5' => array('comment-list', 'search-form', 'comment-form', 'gallery', 'caption'), 'post-thumbnails', 'infinite-scroll' => array('container' => 'main', 'footer' => 'page'), 'custom-header' => array('default-image' => Utils::assets_url() . '/images/header.jpg', 'random-default' => false, 'width' => 1920, 'height' => 585, 'flex-height' => true, 'flex-width' => true, 'header-text' => false, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => array('Custom_Header', 'style'), 'admin-preview-callback' => array('Custom_Header', 'image')));
开发者ID:gcofficial,项目名称:basetheme,代码行数:8,代码来源:supports.php

示例9: frontend_assets

 /**
  * Include frontend assets
  *
  * @since 1.0
  */
 public function frontend_assets($instance)
 {
     // twitter widget js
     wp_register_script('twitter-widget', Utils::assets_url() . '/js/twitter-widget.js', '', '', true);
     wp_enqueue_script('twitter-widget');
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:11,代码来源:monster-twitter-timeline-widget.php

示例10: form

 /**
  * Create admin form for widget
  *
  * @param type $instance array.
  */
 public function form($instance)
 {
     // Include assets
     $this->admin_assets();
     $title_field = new UI_Input_Fox(array('id' => $this->get_field_id('title'), 'class' => 'title', 'name' => $this->get_field_name('title'), 'value' => Utils::array_get($instance, 'title'), 'placeholder' => __('New title', PHOTOLAB_BASE_TM_ALIAS)));
     $title_html = $title_field->output();
     $theme_field = new UI_Select_Fox(array('id' => $this->get_field_id('theme'), 'name' => $this->get_field_name('theme'), 'default' => Utils::array_get($instance, 'theme'), 'options' => $this->themes));
     $theme_html = $theme_field->output();
     $switcher = new UI_Switcher_Fox(array('id' => $this->get_field_id('show_count'), 'class' => 'pull-right', 'name' => $this->get_field_name('show_count'), 'values' => array('true' => 'ON', 'false' => 'OFF'), 'default' => Utils::array_get($instance, 'show_count')));
     $show_count_html = $switcher->output();
     $categories_list = get_categories(array('hide_empty' => 0));
     $categories_array = array('1' => 'default');
     foreach ($categories_list as $category_item) {
         $categories_array[$category_item->term_id] = $category_item->name;
     }
     // Universal
     $default_image = Utils::assets_url() . '/images/default-image.jpg';
     $categories = Utils::array_get($instance, 'categories');
     $tiles_items = array();
     if (is_array($categories) && count($categories) > 0) {
         foreach ($categories as $key => $category_item) {
             $category_field = new UI_Select_Fox(array('id' => $this->get_field_id('category_' . $key), 'name' => $this->get_field_name('category[]'), 'default' => $category_item['category'], 'options' => $categories_array));
             $image_field = new UI_Input_Fox(array('id' => $this->get_field_id('image_' . $key), 'class' => 'custom-image-url', 'type' => 'hidden', 'name' => $this->get_field_name('image[]'), 'value' => $categories[$key]['image']));
             $tiles_items[] = array('src' => $categories[$key]['image'], 'image' => $image_field->output(), 'category' => $category_field->output());
         }
     }
     $category_field = new UI_Select_Fox(array('id' => $this->get_field_id('category_new'), 'name' => $this->get_field_name('category_new[]'), 'default' => 0, 'options' => $categories_array));
     $image_field = new UI_Input_Fox(array('id' => $this->get_field_id('image_new'), 'class' => 'custom-image-url', 'type' => 'hidden', 'name' => $this->get_field_name('image_new[]'), 'value' => ''));
     $tile_new = array('image' => $image_field->output(), 'category' => $category_field->output());
     // show view
     echo View::make('widgets/back-end/categories-tiles', array('title_html' => $title_html, 'theme_html' => $theme_html, 'show_count_html' => $show_count_html, 'tiles_items' => $tiles_items, 'default_image' => $default_image, 'tile_new' => $tile_new));
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:37,代码来源:monster-categories-tiles-widget.php

示例11: admin_assets

 /**
  * Include admin assets
  *
  * @since 1.0
  */
 public function admin_assets()
 {
     // Custom styles
     wp_register_style('tm-post-slider-admin', Utils::assets_url() . '/css/posts-slider-widget-admin.min.css');
     wp_enqueue_style('tm-post-slider-admin');
     // Custom js
     wp_register_script('tm-post-slider-script-admin', Utils::assets_url() . '/js/posts-slider-widget-admin.min.js');
     wp_localize_script('tm-post-slider-script-admin', 'TMWidgetParam', array('ajaxurl' => admin_url('admin-ajax.php'), 'button_is' => $this->get_field_id('button_is')));
     wp_enqueue_script('tm-post-slider-script-admin');
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:15,代码来源:monster-posts-slider-widget.php

示例12: admin_assets

 /**
  * Include admin assets
  *
  * @since 1.0
  */
 public function admin_assets()
 {
     // Custom styles
     wp_register_style('tm-image-grid-admin', Utils::assets_url() . '/css/image-grid-widget-admin.min.css');
     wp_enqueue_style('tm-image-grid-admin');
     // Custom js
     wp_register_script('tm-subscribe-and-social-script-admin', Utils::assets_url() . '/js/subscribe-and-social-widget-admin.min.js');
     wp_localize_script('tm-subscribe-and-social-script-admin', 'TMWidgetParam', array('ajaxurl' => admin_url('admin-ajax.php')));
     wp_enqueue_script('tm-subscribe-and-social-script-admin');
     // Custom styles
     wp_register_style('tm-subscribe-and-social-admin', Utils::assets_url() . '/css/subscribe-and-social-widget-admin.min.css');
     wp_enqueue_style('tm-subscribe-and-social-admin');
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:18,代码来源:monster-subscribe-and-social-widget.php

示例13: uploadScripts

 /**
  * Upload some scripts to admin and customize
  */
 public function uploadScripts()
 {
     wp_enqueue_media();
     wp_enqueue_script('upload_media_widget', Utils::assets_url() . '/js/advertisement.js', array('jquery'));
 }
开发者ID:gcofficial,项目名称:basetheme,代码行数:8,代码来源:monster-advertisement.php


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