本文整理汇总了PHP中wp_register_style函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_register_style函数的具体用法?PHP wp_register_style怎么用?PHP wp_register_style使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_register_style函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: bp_core_register_common_styles
/**
* Register styles commonly used by BuddyPress.
*
* @since 2.1.0
*/
function bp_core_register_common_styles()
{
$min = bp_core_get_minified_asset_suffix();
$url = buddypress()->plugin_url . 'bp-core/css/';
/**
* Filters the URL for the Admin Bar stylesheet.
*
* @since 1.1.0
*
* @param string $value URL for the Admin Bar stylesheet.
*/
$admin_bar_file = apply_filters('bp_core_admin_bar_css', "{$url}admin-bar{$min}.css");
/**
* Filters the BuddyPress Core stylesheet files to register.
*
* @since 2.1.0
*
* @param array $value Array of stylesheet file information to register.
*/
$styles = apply_filters('bp_core_register_common_styles', array('bp-admin-bar' => array('file' => $admin_bar_file, 'dependencies' => array('admin-bar')), 'bp-avatar' => array('file' => "{$url}avatar{$min}.css", 'dependencies' => array('jcrop'))));
foreach ($styles as $id => $style) {
wp_register_style($id, $style['file'], $style['dependencies'], bp_get_version());
wp_style_add_data($id, 'rtl', true);
if ($min) {
wp_style_add_data($id, 'suffix', $min);
}
}
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:33,代码来源:bp-core-cssjs.php
示例2: load_scripts
public function load_scripts()
{
wp_register_script('jquery-slick', '//cdn.jsdelivr.net/jquery.slick/1.3.8/slick.min.js', array('jquery'));
wp_enqueue_script('jquery-slick');
wp_register_style('jquery-slick', '//cdn.jsdelivr.net/jquery.slick/1.3.8/slick.css');
wp_enqueue_style('jquery-slick');
}
开发者ID:raulmontejo,项目名称:vimeography,代码行数:7,代码来源:pro.php
示例3: scripts_init
function scripts_init()
{
wp_register_script('admin_options_category_dialog', get_template_directory_uri() . '/admin-options/js/select-category.js');
wp_enqueue_script('admin_options_category_dialog');
wp_register_style('admin_options_category_dialog', get_template_directory_uri() . '/admin-options/css/select-category.css');
wp_enqueue_style('admin_options_category_dialog');
}
开发者ID:xfalcons,项目名称:wordpress-youmeifd,代码行数:7,代码来源:hook.php
示例4: Attachments
function Attachments()
{
wp_register_script('admin-bar-plugin', $this->pluginUrl . '/js/admin-bar.js', array('jquery-form'));
wp_enqueue_script('admin-bar-plugin');
wp_register_style('admin-bar-plugin', $this->pluginUrl . '/css/admin-bar.css');
wp_enqueue_style('admin-bar-plugin');
}
开发者ID:AC85,项目名称:musikschule-wp-theme,代码行数:7,代码来源:admin-bar.php
示例5: register
public function register()
{
$links = $this->get_font_links();
foreach ($links as $name => $link) {
wp_register_style($name, $link);
}
}
开发者ID:cntlscrut,项目名称:bicyclepeddler2,代码行数:7,代码来源:googlewebfont.php
示例6: init
function init()
{
rh_register_script('bootstrap', $this->url . 'bootstrap/js/bootstrap.min.js', array(), '2.2.2');
rh_register_script('jquery-isotope', $this->url . 'js/jquery.isotope.min.js', array(), '1.5.14');
rh_register_script('jquery-infinite-scroll', $this->url . 'js/jquery.infinitescroll.min.js', array(), '2.0b2.110713');
wp_register_style('rhcss-bootstrap', $this->url . 'bootstrap/css/namespaced.bootstrap.min.css', array(), '2.2.2');
}
开发者ID:kaydwithers,项目名称:crossfittanjongpagar,代码行数:7,代码来源:class.google_web_fonts_admin.original.php
示例7: wppa_add_style
function wppa_add_style()
{
global $wppa_api_version;
// Are we allowed to look in theme?
if (wppa_switch('wppa_use_custom_style_file')) {
// In child theme?
$userstyle = get_theme_root() . '/' . get_option('stylesheet') . '/wppa-style.css';
if (is_file($userstyle)) {
wp_register_style('wppa_style', get_theme_root_uri() . '/' . get_option('stylesheet') . '/wppa-style.css', array(), $wppa_api_version);
wp_enqueue_style('wppa_style');
return;
}
// In theme?
$userstyle = get_theme_root() . '/' . get_option('template') . '/wppa-style.css';
if (is_file($userstyle)) {
wp_register_style('wppa_style', get_theme_root_uri() . '/' . get_option('template') . '/wppa-style.css', array(), $wppa_api_version);
wp_enqueue_style('wppa_style');
return;
}
}
// Use standard
wp_register_style('wppa_style', WPPA_URL . '/theme/wppa-style.css', array(), $wppa_api_version);
wp_enqueue_style('wppa_style');
// Dynamic css
if (!wppa_switch('wppa_inline_css')) {
if (!file_exists(WPPA_PATH . '/wppa-dynamic.css')) {
wppa_create_wppa_dynamic_css();
update_option('wppa_dynamic_css_version', get_option('wppa_dynamic_css_version', '0') + '1');
}
if (file_exists(WPPA_PATH . '/wppa-dynamic.css')) {
wp_enqueue_style('wppa-dynamic', WPPA_URL . '/wppa-dynamic.css', array('wppa_style'), get_option('wppa_dynamic_css_version'));
}
}
}
开发者ID:billadams,项目名称:forever-frame,代码行数:34,代码来源:wppa-non-admin.php
示例8: Ecordia
function Ecordia()
{
$this->addActions();
$this->addFilters();
wp_register_style('ecordia', plugins_url('resources/ecordia.css', __FILE__), array(), $this->version);
wp_register_script('ecordia', plugins_url('resources/ecordia.js', __FILE__), array('jquery'), $this->version);
}
开发者ID:simpsonjulian,项目名称:puppet-wordpress,代码行数:7,代码来源:scribe.php
示例9: custom_post_template_css
function custom_post_template_css()
{
// add css files
wp_register_style('wp-custom-style', plugins_url('/css/myStyle.css', __FILE__));
wp_enqueue_style('wp-custom-style');
//add js files
}
开发者ID:SelaInc,项目名称:eassignment,代码行数:7,代码来源:wp-custom-post-template.php
示例10: admin_enqueue_scripts
/**
* Enqueue scripts and styles
*
* @return void
*/
static function admin_enqueue_scripts()
{
$url = RWMB_CSS_URL . 'jqueryui';
wp_register_style('jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17');
wp_register_style('jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17');
wp_register_style('jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array('jquery-ui-core', 'jquery-ui-theme'), '1.8.17');
wp_register_style('jquery-ui-slider', "{$url}/jquery.ui.slider.css", array('jquery-ui-core', 'jquery-ui-theme'), '1.8.17');
wp_enqueue_style('jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.css", array('jquery-ui-datepicker', 'jquery-ui-slider'), '0.9.7');
$url = RWMB_JS_URL . 'jqueryui';
wp_register_script('jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.js", array('jquery-ui-datepicker', 'jquery-ui-slider'), '0.9.7', true);
$deps = array('jquery-ui-timepicker');
$locale = str_replace('_', '-', get_locale());
$timepicker_locale_js_url = '';
if (file_exists(RWMB_DIR . "js/jqueryui/timepicker-i18n/jquery-ui-timepicker-{$locale}.js")) {
$timepicker_locale_js_url = "{$url}/timepicker-i18n/jquery-ui-timepicker-{$locale}.js";
} elseif (strlen($locale) > 2 && file_exists(RWMB_DIR . 'js/jqueryui/timepicker-i18n/jquery-ui-timepicker-' . substr($locale, 0, 2) . '.js')) {
$timepicker_locale_js_url = "{$url}/timepicker-i18n/jquery-ui-timepicker-" . substr($locale, 0, 2) . '.js';
}
if ($timepicker_locale_js_url) {
wp_register_script('jquery-ui-timepicker-i18n', $timepicker_locale_js_url, array('jquery-ui-timepicker'), '0.9.7', true);
$deps = array('jquery-ui-timepicker-i18n');
}
wp_enqueue_script('rwmb-time', RWMB_JS_URL . 'time.js', $deps, RWMB_VER, true);
wp_localize_script('rwmb-time', 'RWMB_Timepicker', array('lang' => $locale));
}
开发者ID:sammyboy45467,项目名称:wp-theme,代码行数:30,代码来源:time.php
示例11: coll_enqueue_styles
function coll_enqueue_styles()
{
global $coll_is_mobile;
if (!$coll_is_mobile) {
wp_register_style('scrollbar', get_template_directory_uri() . '/css/perfect-scrollbar.css');
wp_enqueue_style('scrollbar');
}
wp_register_style('googlefonts', '//fonts.googleapis.com/css?family=Bentham|Pinyon+Script|Bitter:400,700|Raleway:300,400,500,600|Sacramento|Lato:300,400,900|Open+Sans:400,700,800|Pacifico|Lobster|Roboto:400,900,700|Oswald:400,700');
wp_register_style('normalize', get_template_directory_uri() . '/css/normalize.css');
wp_register_style('foundation', get_template_directory_uri() . '/css/foundation.css', null, null);
wp_register_style('magicpopup', get_template_directory_uri() . '/css/magnific-popup.css');
wp_register_style('icons', get_template_directory_uri() . '/css/font-awesome.min.css');
wp_register_style('superfish', get_template_directory_uri() . '/css/superfish.css');
wp_register_style('flexslider', get_template_directory_uri() . '/css/flexslider.css', null, null);
wp_register_style('plugin', get_template_directory_uri() . '/css/plugin.css', null, null);
wp_register_style('public', get_template_directory_uri() . '/css/public.css', null, null);
wp_register_style('morpheus', get_stylesheet_uri(), null, null);
wp_enqueue_style('googlefonts');
wp_enqueue_style('foundation');
wp_enqueue_style('magicpopup');
wp_enqueue_style('icons');
wp_enqueue_style('superfish');
wp_enqueue_style('flexslider');
wp_enqueue_style('plugin');
wp_enqueue_style('public');
wp_enqueue_style('morpheus');
// add custom css
$custom_css = ot_get_option('coll_custom_css');
if (!empty($custom_css)) {
wp_add_inline_style('morpheus', $custom_css);
}
}
开发者ID:Air-Craft,项目名称:air-craft-www,代码行数:32,代码来源:enqueue.php
示例12: hudson_enqueue_admin_styles
/**
* Enqueues admin stylesheets and JavaScript.
*/
function hudson_enqueue_admin_styles()
{
wp_register_style('hudson-admin', get_stylesheet_directory_uri() . '/css/admin.css');
wp_enqueue_style('hudson-admin');
wp_register_script('hudson-admin', get_stylesheet_directory_uri() . '/js/admin.min.js');
wp_enqueue_script('hudson-admin');
}
开发者ID:noahcoley,项目名称:standard-child-themes,代码行数:10,代码来源:functions.php
示例13: woothemes_add_css
function woothemes_add_css()
{
global $woo_options;
wp_register_style('prettyPhoto', get_template_directory_uri() . '/includes/css/prettyPhoto.css');
wp_register_style('non-responsive', get_template_directory_uri() . '/css/non-responsive.css');
// Disable prettyPhoto css if WooCommerce is activated and user is on the product page
$woocommerce_activated = is_woocommerce_activated();
$woocommerce_lightbox = get_option('woocommerce_enable_lightbox') == 'yes' ? true : false;
$woocommerce_product = false;
if ($woocommerce_activated) {
$woocommerce_product = is_product();
}
if ($woocommerce_activated && $woocommerce_product && $woocommerce_lightbox) {
wp_deregister_style('prettyPhoto');
}
// Conditionally load the Portfolio CSS, where needed.
$load_portfolio_css = false;
if (is_page_template('template-portfolio.php') || is_singular() && get_post_type() == 'portfolio' || is_post_type_archive('portfolio') || is_tax('portfolio-gallery')) {
$load_portfolio_css = true;
}
// Allow child themes/plugins to load the portfolio CSS when they need it.
$load_portfolio_css = apply_filters('woo_load_portfolio_css', $load_portfolio_css);
if ($load_portfolio_css) {
wp_enqueue_style('prettyPhoto');
}
do_action('woothemes_add_css');
}
开发者ID:plusplusminus,项目名称:athol,代码行数:27,代码来源:theme-js.php
示例14: bootstrap_four_theme_styles
function bootstrap_four_theme_styles()
{
global $bootstrap_four_version;
wp_enqueue_style('bootstrap-four-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.4.0');
wp_register_style('bootstrap-four-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), $bootstrap_four_version);
wp_enqueue_style('bootstrap-four-styles', get_stylesheet_uri(), array('bootstrap-four-bootstrap'), '1');
}
开发者ID:jenrasmussen,项目名称:bootstrapfour,代码行数:7,代码来源:functions.php
示例15: tography_lite_enqueue_admin_stylesheets
function tography_lite_enqueue_admin_stylesheets()
{
//Admin Stylesheet =================================================
wp_register_style('admin-stylesheet', TOGRAPHY_LITE_CSS . '/admin_styles.css', array(), '1.0', 'all');
wp_enqueue_style('admin-stylesheet');
//=================================================================
}
开发者ID:nicoandrade,项目名称:Tography-Lite,代码行数:7,代码来源:stylesheets.php
示例16: wck_sas_print_scripts
function wck_sas_print_scripts($hook)
{
if ('wck_page_sas-page' == $hook) {
wp_register_style('wck-sas-css', plugins_url('/css/wck-sas.css', __FILE__));
wp_enqueue_style('wck-sas-css');
}
}
开发者ID:Idealien,项目名称:examplewp,代码行数:7,代码来源:wck-sas.php
示例17: add_style
/**
* Print CSS
*
* @since 0.1.0
* @change 1.4.0
*/
public static function add_style()
{
/* Register CSS */
wp_register_style('statify', plugins_url('/css/dashboard.min.css', STATIFY_FILE), array(), self::$_plugin_version);
/* Load CSS */
wp_enqueue_style('statify');
}
开发者ID:jbeyta,项目名称:joelandsam,代码行数:13,代码来源:statify_dashboard.class.php
示例18: init_assets
public function init_assets()
{
// register base files
// load the aid against JS errors (@see https://github.com/andyet/ConsoleDummy.js)
wp_register_script('consoledummy', get_template_directory_uri() . '/includes/js/SlimConsoleDummy.min.js');
wp_register_script('cc-admin-ajaxhooks', get_template_directory_uri() . '/includes/admin/js/ajaxhooks.js', array('jquery'));
wp_register_script('cc-admin-helper', get_template_directory_uri() . '/includes/admin/js/admin-helper.js', array('jquery'));
wp_register_script('cc-admin-js', get_template_directory_uri() . '/includes/admin/js/admin.js', array('jquery', 'cc-admin-helper'));
wp_register_style('cc-admin-css', get_template_directory_uri() . '/includes/admin/css/admin.css');
// customizer helper
wp_register_script('cc2-customizer-helper', get_template_directory_uri() . '/includes/admin/js/customizer-helper.js', array('jquery', 'wp-color-picker'));
// avoid rendering blockers / slow downs during debug mode
if (!defined('CC2_THEME_DEBUG')) {
wp_register_style('cc_tk_zendesk_css', '//assets.zendesk.com/external/zenbox/v2.6/zenbox.css');
wp_register_script('cc_tk_zendesk_js', '//assets.zendesk.com/external/zenbox/v2.6/zenbox.js');
}
/**
* NOTE: Possible fix for the external script rendering blockers
*/
wp_register_script('cc-support-helper', get_template_directory_uri() . '/includes/admin/js/support-helper.js', array('jquery', 'cc-admin-ajaxhooks'));
/**
* NOTE: Rest of the assets are registered for on-demand loading
*/
// load bootstrap css
wp_register_style('cc-bootstrap', get_template_directory_uri() . '/includes/resources/bootstrap/dist/css/bootstrap.min.css');
// load bootstrap js
wp_register_script('cc-bootstrap-js', get_template_directory_uri() . '/includes/resources/bootstrap/dist/js/bootstrap.min.js', array('jquery'));
// load the glyphicons
wp_register_style('cc-glyphicons', get_template_directory_uri() . '/includes/resources/glyphicons/css/bootstrap-glyphicons.css');
// load animate.css
wp_register_style('cc-animate-css', get_template_directory_uri() . '/includes/resources/animatecss/animate.min.css');
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:32,代码来源:base.php
示例19: admin_enqueue_scripts
/**
* Enqueue scripts and styles
*
* @return void
*/
static function admin_enqueue_scripts()
{
$url = RWMB_CSS_URL . 'jqueryui';
wp_register_style('jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17');
wp_register_style('jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17');
wp_register_style('jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array('jquery-ui-core', 'jquery-ui-theme'), '1.8.17');
wp_register_style('jquery-ui-slider', "{$url}/jquery.ui.slider.css", array('jquery-ui-core', 'jquery-ui-theme'), '1.8.17');
wp_enqueue_style('jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.css", array('jquery-ui-datepicker', 'jquery-ui-slider'), '0.9.7');
wp_register_script('jquery-ui-timepicker', RWMB_JS_URL . 'jqueryui/jquery-ui-timepicker-addon.js', array('jquery-ui-datepicker', 'jquery-ui-slider'), '0.9.7', true);
// Load localized scripts
$locale = str_replace('_', '-', get_locale());
$date_path = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js';
$time_path = 'jqueryui/timepicker-i18n/jquery-ui-timepicker-' . $locale . '.js';
$deps = array('jquery-ui-datepicker', 'jquery-ui-timepicker');
if (file_exists(RWMB_DIR . 'js/' . $date_path)) {
wp_register_script('jquery-ui-datepicker-i18n', RWMB_JS_URL . $date_path, array('jquery-ui-datepicker'), '1.8.17', true);
$deps[] = 'jquery-ui-datepicker-i18n';
}
if (file_exists(RWMB_DIR . 'js/' . $time_path)) {
wp_register_script('jquery-ui-timepicker-i18n', RWMB_JS_URL . $time_path, array('jquery-ui-timepicker'), '1.8.17', true);
$deps[] = 'jquery-ui-timepicker-i18n';
}
wp_enqueue_script('rwmb-datetime', RWMB_JS_URL . 'datetime.js', $deps, RWMB_VER, true);
wp_localize_script('rwmb-datetime', 'RWMB_Datetimepicker', array('lang' => $locale));
}
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:30,代码来源:datetime.php
示例20: angulartheme_enqueue_styles
function angulartheme_enqueue_styles()
{
// add a default stylesheet
wp_register_style('style', get_bloginfo('template_directory') . '/style.css', array(), '1.0', false);
// enqueue stylesheet
wp_enqueue_style('style');
}
开发者ID:ijones922,项目名称:wp-json-widget,代码行数:7,代码来源:functions.php
注:本文中的wp_register_style函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论