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


PHP plugins_url函数代码示例

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


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

示例1: montkailash_scripts

/**
 * Enqueue scripts and styles.
 *
 * @since Twenty Fifteen 1.0
 */
function montkailash_scripts()
{
    // Load our main stylesheet.
    wp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css');
    wp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap-theme.min.css');
    wp_enqueue_style('lightbox-style', get_template_directory_uri() . '/css/lightbox.css');
    wp_enqueue_style('montkailash-style', get_stylesheet_uri());
    if (is_page('Contact')) {
        wp_register_script('gmap', "http://maps.google.com/maps/api/js?sensor=true", '', '', true);
        wp_enqueue_script('gmap');
        wp_enqueue_script('gmaps', get_template_directory_uri() . '/js/gmaps.js', array('jquery'), '', true);
        wp_enqueue_script('function-map', get_template_directory_uri() . '/js/function_map.js', array('jquery'), '0.1', true);
    }
    if (!is_admin()) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js", '', '1.8.3', true);
        wp_enqueue_script('jquery');
        wp_deregister_script('wonderplugin-slider-skins-script');
        wp_deregister_script('wonderplugin-slider-script');
        wp_deregister_script('wonderplugin-slider-creator-script');
        wp_deregister_script('woo-vou-public-script');
        wp_register_script('wonderplugin-slider-skins-script', plugins_url() . '/wonderplugin-slider/engine/wonderpluginsliderskins.js', array('jquery'), '4.9', true);
        wp_register_script('wonderplugin-slider-script', plugins_url() . '/wonderplugin-slider/engine/wonderpluginslider.js', array('jquery'), '4.9', true);
        wp_register_script('wonderplugin-slider-creator-script', plugins_url() . '/wonderplugin-slider/app/wonderplugin-slider-creator.js', array('jquery'), '4.9', true);
        wp_register_script('woo-vou-public-script', plugins_url() . '/woocommerce-pdf-vouchers/includes/js/woo-vou-public.js', array('jquery'), '2.4.4', true);
        wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20150330', true);
        wp_enqueue_script('lightbox', get_template_directory_uri() . '/js/lightbox.js', array('jquery'), '2.8.1', true);
        wp_enqueue_script('montkailash-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '0.1', true);
    }
}
开发者ID:flasomm,项目名称:Montkailash,代码行数:35,代码来源:functions.php

示例2: __construct

 /**
  * Constructor.
  *
  *
  */
 public function __construct()
 {
     $this->plugin_url = plugins_url('/', __FILE__);
     $this->plugin_path = plugin_dir_path(__FILE__);
     $this->load_language('script-manager');
     add_action('plugins_loaded', array($this, 'init'));
 }
开发者ID:semiologic,项目名称:script-manager,代码行数:12,代码来源:script-manager.php

示例3: define_constants

 /**
  * Define Meta Slider constants
  */
 private function define_constants()
 {
     define('METASLIDER_VERSION', $this->version);
     define('METASLIDER_BASE_URL', trailingslashit(plugins_url('ml-slider')));
     define('METASLIDER_ASSETS_URL', trailingslashit(METASLIDER_BASE_URL . 'assets'));
     define('METASLIDER_PATH', plugin_dir_path(__FILE__));
 }
开发者ID:ayoayco,项目名称:upbeat,代码行数:10,代码来源:ml-slider.php

示例4: serverinfo_scripts_admin

function serverinfo_scripts_admin($hook_suffix)
{
    $serverinfo_admin_pages = array('dashboard_page_wp-serverinfo/wp-serverinfo');
    if (in_array($hook_suffix, $serverinfo_admin_pages)) {
        wp_enqueue_script('wp-serverinfo', plugins_url('wp-serverinfo/serverinfo-js.js'), array('jquery'), '1.60', true);
    }
}
开发者ID:alexanderpetrob89,项目名称:fei.edu,代码行数:7,代码来源:wp-serverinfo.php

示例5: dr_create_menu

function dr_create_menu()
{
    // create top-level menu
    add_menu_page('DR Redirect', 'DR Redirect', 'administrator', __FILE__, 'dr_settings_page', plugins_url('/images/icon.png', __FILE__));
    // call register settings function
    add_action('admin_init', 'dr_register_settings');
}
开发者ID:Delektre,项目名称:dr-redirect,代码行数:7,代码来源:dr-redirect.php

示例6: show_theme_calendar

function show_theme_calendar()
{
    ?>

    
 
<div class="updated" style="font-size: 14px; color:red !important"><p><strong><a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;"> This feature is disabled for the non-commercial version.</a></strong></p></div>
   <table width="95%">
                <tr>
        <td width="100%" style="font-size:14px; font-weight:bold"><a href="http://web-dorado.com/step-4-adding-themes/spider-calendar-wordpress-guide-step-4-1.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br>
This section allows you to create/edit themes for the calendars.<br /> This feature is disabled for
the non-commercial version. <a href="http://web-dorado.com/step-4-adding-themes/spider-calendar-wordpress-guide-step-4-1.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
<br />
Here are some examples of 11 standard templates included in the commercial version.<a href="http://wpdemo.web-dorado.com/spider-calendar/" target="_blank" style="color:blue; text-decoration:none;">Demo</a></td>
            <td colspan="7" align="right" style="font-size:16px;">
              <a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
            <img src="<?php 
    echo plugins_url('images/header.png', __FILE__);
    ?>
" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br>
            Get the full version&nbsp;&nbsp;&nbsp;&nbsp;
            </a>
 			 </td>
   			</tr>
            </table>

<br /><br />
<img src="<?php 
    echo plugins_url('images/calendar_widjet_theme.jpg', __FILE__);
    ?>
" />
<?php 
}
开发者ID:andripriyanto,项目名称:WebTKJ-BPI,代码行数:33,代码来源:Theme_functions.php

示例7: __construct

 /**
  * Constructor for the gateway.
  *
  * @access public
  * @return void
  */
 public function __construct()
 {
     $this->id = 'ecpay';
     $this->icon = apply_filters('woocommerce_ecpay_icon', plugins_url('icon/green_log_40.gif', __FILE__));
     $this->has_fields = false;
     $this->method_title = __('ecpay', 'woocommerce');
     // Load the form fields.
     $this->init_form_fields();
     // Load the settings.
     $this->init_settings();
     // Define user set variables
     $this->title = $this->settings['title'];
     $this->description = $this->settings['description'];
     $this->mer_id = $this->settings['mer_id'];
     $this->check_code = $this->settings['check_code'];
     $this->notify_url = trailingslashit(home_url());
     $this->gateway = "https://ecpay.com.tw/form_Sc_to5.php";
     // Actions
     add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
     add_action('woocommerce_thankyou_ecpay', array($this, 'thankyou_page'));
     //需與id名稱大小寫相同
     add_action('woocommerce_receipt_ecpay', array($this, 'receipt_page'));
     //add_action('init', array(&$this, 'check_ecpay_response'));
     // Customer Emails
     //add_action('woocommerce_email_before_order_table', array(&$this, 'email_instructions'), 10, 2);
 }
开发者ID:aaron1102,项目名称:ecbank,代码行数:32,代码来源:class-ecpay.php

示例8: genesis_responsive_slider_settings_scripts

/**
 * Loads the scripts required for the settings page
 */
function genesis_responsive_slider_settings_scripts()
{
    wp_enqueue_script('common');
    wp_enqueue_script('wp-lists');
    wp_enqueue_script('postbox');
    wp_enqueue_script('genesis_responsive_slider_admin_scripts', plugins_url('js/admin.js', __FILE__), array('jquery'), GENESIS_RESPONSIVE_SLIDER_VERSION, TRUE);
}
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:10,代码来源:admin.php

示例9: define_constants

 /**
  * defines constants
  * may be overriden by a plugin if set before plugins_loaded, 1
  *
  * @since 1.6
  */
 public static function define_constants()
 {
     // our url. Don't use WP_PLUGIN_URL http://wordpress.org/support/topic/ssl-doesnt-work-properly
     if (!defined('POLYLANG_URL')) {
         define('POLYLANG_URL', plugins_url('', POLYLANG_FILE));
     }
     // default url to access user data such as custom flags
     if (!defined('PLL_LOCAL_URL')) {
         define('PLL_LOCAL_URL', content_url('/polylang'));
     }
     // cookie name. no cookie will be used if set to false
     if (!defined('PLL_COOKIE')) {
         define('PLL_COOKIE', 'pll_language');
     }
     // avoid loading polylang admin for frontend ajax requests
     // special test for plupload which does not use jquery ajax and thus does not pass our ajax prefilter
     // special test for customize_save done in frontend but for which we want to load the admin
     if (!defined('PLL_AJAX_ON_FRONT')) {
         $in = isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('upload-attachment', 'customize_save'));
         define('PLL_AJAX_ON_FRONT', defined('DOING_AJAX') && DOING_AJAX && empty($_REQUEST['pll_ajax_backend']) && !$in);
     }
     // admin
     if (!defined('PLL_ADMIN')) {
         define('PLL_ADMIN', defined('DOING_CRON') || is_admin() && !PLL_AJAX_ON_FRONT);
     }
     // settings page whatever the tab
     if (!defined('PLL_SETTINGS')) {
         define('PLL_SETTINGS', is_admin() && (isset($_GET['page']) && 'mlang' == $_GET['page'] || !empty($_REQUEST['pll_ajax_settings'])));
     }
 }
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:36,代码来源:class-polylang.php

示例10: enqueue_checkout_settings_js

 public function enqueue_checkout_settings_js()
 {
     if (isset($_GET['tab']) && $_GET['tab'] == 'checkout') {
         wp_enqueue_script('pay4pay_settings_checkout', plugins_url('/js/pay4pay-settings-checkout.js', dirname(__FILE__)), array('woocommerce_admin'));
         wp_enqueue_style('pay4pay_settings_checkout', plugins_url('/css/pay4pay-settings-checkout.css', dirname(__FILE__)), array());
     }
 }
开发者ID:sawan34,项目名称:tanzi,代码行数:7,代码来源:class-pay4pay-admin.php

示例11: __construct

 public function __construct()
 {
     $this->id = 'tbz_voguepay_gateway';
     $this->icon = apply_filters('woocommerce_vogueway_icon', plugins_url('assets/pay-via-voguepay.png', __FILE__));
     $this->has_fields = false;
     $this->order_button_text = 'Make Payment';
     $this->payment_url = 'https://voguepay.com/pay/';
     $this->notify_url = WC()->api_request_url('WC_Tbz_Voguepay_Gateway');
     $this->method_title = 'VoguePay Payment Gateway';
     $this->method_description = 'VoguePay Payment Gateway allows you to receive Mastercard, Verve Card and Visa Card Payments On your Woocommerce Powered Site.';
     // Load the form fields.
     $this->init_form_fields();
     // Load the settings.
     $this->init_settings();
     // Define user set variables
     $this->title = $this->get_option('title');
     $this->description = $this->get_option('description');
     $this->voguePayMerchantId = $this->get_option('voguePayMerchantId');
     $this->storeId = $this->get_option('storeId');
     //Actions
     add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
     // Payment listener/API hook
     add_action('woocommerce_api_wc_tbz_voguepay_gateway', array($this, 'check_voguepay_response'));
     // Check if the gateway can be used
     if (!$this->is_valid_for_use()) {
         $this->enabled = false;
     }
 }
开发者ID:seyisulu,项目名称:voguepay-woocommerce-payment-gateway,代码行数:28,代码来源:voguepay-woocommerce-payment-gateway.php

示例12: route

 public function route()
 {
     wp_enqueue_script('wpProQuiz_front_javascript', plugins_url('js/wpProQuiz_front' . (WPPROQUIZ_DEV ? '' : '.min') . '.js', WPPROQUIZ_FILE), array('jquery', 'jquery-ui-sortable'), WPPROQUIZ_VERSION);
     wp_localize_script('wpProQuiz_front_javascript', 'WpProQuizGlobal', array('ajaxurl' => admin_url('admin-ajax.php'), 'loadData' => __('Loading', 'wp-pro-quiz'), 'questionNotSolved' => __('You must answer this question.', 'wp-pro-quiz'), 'questionsNotSolved' => __('You must answer all questions before you can completed the quiz.', 'wp-pro-quiz'), 'fieldsNotFilled' => __('All fields have to be filled.', 'wp-pro-quiz')));
     wp_enqueue_style('wpProQuiz_front_style', plugins_url('css/wpProQuiz_front' . (WPPROQUIZ_DEV ? '' : '.min') . '.css', WPPROQUIZ_FILE), array(), WPPROQUIZ_VERSION);
     $this->showAction($_GET['id']);
 }
开发者ID:richardtape,项目名称:Wp-Pro-Quiz,代码行数:7,代码来源:WpProQuiz_Controller_Preview.php

示例13: json_api_client_js

/**
 * Plugin Name: WP-API Client JS
 */
function json_api_client_js()
{
    $scripts = wp_scripts();
    $src = plugins_url('build/js/wp-api.js', __FILE__);
    if (isset($scripts->registered['wp-api'])) {
        $scripts->registered['wp-api']->src = $src;
    } else {
        wp_register_script('wp-api', $src, array('jquery', 'underscore', 'backbone'), '1.0', true);
    }
    /**
     * @var \WP_REST_Server $wp_rest_server
     */
    global $wp_rest_server;
    if (empty($wp_rest_server)) {
        /** This filter is documented in wp-includes/rest-api.php */
        $wp_rest_server_class = apply_filters('wp_rest_server_class', 'WP_REST_Server');
        $wp_rest_server = new $wp_rest_server_class();
        /** This filter is documented in wp-includes/rest-api.php */
        do_action('rest_api_init', $wp_rest_server);
    }
    $schema_request = new WP_REST_Request('GET', '/wp/v2');
    $schema_response = $wp_rest_server->dispatch($schema_request);
    $schema = null;
    if (!$schema_response->is_error()) {
        $schema = $schema_response->get_data();
    }
    $settings = array('root' => esc_url_raw(get_rest_url()), 'nonce' => wp_create_nonce('wp_rest'), 'versionString' => 'wp/v2/', 'schema' => $schema);
    wp_localize_script('wp-api', 'wpApiSettings', $settings);
}
开发者ID:vickoman,项目名称:client-js,代码行数:32,代码来源:client-js.php

示例14: __construct

 /**
  * __construct function.
  *
  * @access public
  * @return void
  * @since 1.0.0
  */
 public function __construct($file)
 {
     // Default values
     $this->plugin_url = trailingslashit(plugins_url('', $file));
     $this->plugin_path = plugin_dir_path($file);
     $this->token = 'sensei-certificate-templates';
     // Setup post type
     add_action('init', array($this, 'setup_certificate_templates_post_type'), 110);
     /**
      * FRONTEND
      */
     add_action('sensei_additional_styles', array($this, 'enqueue_styles'));
     /**
      * BACKEND
      */
     if (is_admin()) {
         // Admin section
         include $this->plugin_path . 'admin/woothemes-sensei-certificate-templates-admin-init.php';
         // Custom Write Panel Columns
         add_filter('manage_edit-course_columns', array($this, 'add_column_headings'), 11, 1);
         add_action('manage_posts_custom_column', array($this, 'add_column_data'), 11, 2);
     }
     // End If Statement
     // Preview Template
     add_filter('single_template', array($this, 'certificate_templates_locate_preview_template'));
 }
开发者ID:bramburn,项目名称:sensei-certificates,代码行数:33,代码来源:class-woothemes-sensei-certificate-templates.php

示例15: Acf

 function Acf()
 {
     // vars
     $this->path = plugin_dir_path(__FILE__);
     $this->dir = plugins_url('', __FILE__);
     $this->version = '3.5.0';
     $this->upgrade_version = '3.4.1';
     // this is the latest version which requires an upgrade
     $this->cache = array();
     // basic array cache to hold data throughout the page load
     // set text domain
     load_plugin_textdomain('acf', false, basename(dirname(__FILE__)) . '/lang');
     // controllers
     $this->setup_controllers();
     // actions
     add_action('init', array($this, 'init'));
     add_filter('post_updated_messages', array($this, 'post_updated_messages'));
     add_filter('manage_edit-acf_columns', array($this, 'acf_columns_filter'));
     add_action('admin_menu', array($this, 'admin_menu'));
     add_action('admin_head', array($this, 'admin_head'));
     add_action('acf_save_post', array($this, 'acf_save_post'), 10);
     // save post, called from many places (api, input, everything, options)
     // ajax
     add_action('wp_ajax_get_input_metabox_ids', array($this, 'get_input_metabox_ids'));
     return true;
 }
开发者ID:agentfitz,项目名称:thb,代码行数:26,代码来源:acf.php


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