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

PHP wp_admin_css_uri函数代码示例

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

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



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

示例1: wp_admin_css

/**
 * Enqueues or directly prints a stylesheet link to the specified CSS file.
 *
 * "Intelligently" decides to enqueue or to print the CSS file. If the
 * 'wp_print_styles' action has *not* yet been called, the CSS file will be
 * enqueued. If the wp_print_styles action *has* been called, the CSS link will
 * be printed. Printing may be forced by passing true as the $force_echo
 * (second) parameter.
 *
 * For backward compatibility with WordPress 2.3 calling method: If the $file
 * (first) parameter does not correspond to a registered CSS file, we assume
 * $file is a file relative to wp-admin/ without its ".css" extension. A
 * stylesheet link to that generated URL is printed.
 *
 * @since 2.3.0
 *
 * @param string $file       Optional. Style handle name or file name (without ".css" extension) relative
 * 	                         to wp-admin/. Defaults to 'wp-admin'.
 * @param bool   $force_echo Optional. Force the stylesheet link to be printed rather than enqueued.
 */
function wp_admin_css($file = 'wp-admin', $force_echo = false)
{
    // For backward compatibility
    $handle = 0 === strpos($file, 'css/') ? substr($file, 4) : $file;
    if (wp_styles()->query($handle)) {
        if ($force_echo || did_action('wp_print_styles')) {
            // we already printed the style queue. Print this one immediately
            wp_print_styles($handle);
        } else {
            // Add to style queue
            wp_enqueue_style($handle);
        }
        return;
    }
    /**
     * Filter the stylesheet link to the specified CSS file.
     *
     * If the site is set to display right-to-left, the RTL stylesheet link
     * will be used instead.
     *
     * @since 2.3.0
     *
     * @param string $file Style handle name or filename (without ".css" extension)
     *                     relative to wp-admin/. Defaults to 'wp-admin'.
     */
    echo apply_filters('wp_admin_css', "<link rel='stylesheet' href='" . esc_url(wp_admin_css_uri($file)) . "' type='text/css' />\n", $file);
    if (function_exists('is_rtl') && is_rtl()) {
        /** This filter is documented in wp-includes/general-template.php */
        echo apply_filters('wp_admin_css', "<link rel='stylesheet' href='" . esc_url(wp_admin_css_uri("{$file}-rtl")) . "' type='text/css' />\n", "{$file}-rtl");
    }
}
开发者ID:jenoya,项目名称:final,代码行数:51,代码来源:general-template.php


示例2: wp_admin_css

/**
 * Enqueues or directly prints a stylesheet link to the specified CSS file.
 *
 * "Intelligently" decides to enqueue or to print the CSS file. If the
 * 'wp_print_styles' action has *not* yet been called, the CSS file will be
 * enqueued. If the wp_print_styles action *has* been called, the CSS link will
 * be printed. Printing may be forced by passing true as the $force_echo
 * (second) parameter.
 *
 * For backward compatibility with WordPress 2.3 calling method: If the $file
 * (first) parameter does not correspond to a registered CSS file, we assume
 * $file is a file relative to wp-admin/ without its ".css" extension. A
 * stylesheet link to that generated URL is printed.
 *
 * @package WordPress
 * @since 2.3.0
 * @uses $wp_styles WordPress Styles Object
 *
 * @param string $file Optional. Style handle name or file name (without ".css" extension) relative
 * 	 to wp-admin/. Defaults to 'wp-admin'.
 * @param bool $force_echo Optional. Force the stylesheet link to be printed rather than enqueued.
 */
function wp_admin_css($file = 'wp-admin', $force_echo = false)
{
    global $wp_styles;
    if (!is_a($wp_styles, 'WP_Styles')) {
        $wp_styles = new WP_Styles();
    }
    // For backward compatibility
    $handle = 0 === strpos($file, 'css/') ? substr($file, 4) : $file;
    if ($wp_styles->query($handle)) {
        if ($force_echo || did_action('wp_print_styles')) {
            // we already printed the style queue. Print this one immediately
            wp_print_styles($handle);
        } else {
            // Add to style queue
            wp_enqueue_style($handle);
        }
        return;
    }
    echo apply_filters('wp_admin_css', "<link rel='stylesheet' href='" . esc_url(wp_admin_css_uri($file)) . "' type='text/css' />\n", $file);
    if (function_exists('is_rtl') && is_rtl()) {
        echo apply_filters('wp_admin_css', "<link rel='stylesheet' href='" . esc_url(wp_admin_css_uri("{$file}-rtl")) . "' type='text/css' />\n", "{$file}-rtl");
    }
}
开发者ID:batruji,项目名称:metareading,代码行数:45,代码来源:general-template.php


示例3: wp_admin_css

/**
 * Enqueues or directly prints a stylesheet link to the specified CSS file.
 *
 * "Intelligently" decides to enqueue or to print the CSS file. If the
 * 'wp_print_styles' action has *not* yet been called, the CSS file will be
 * enqueued. If the wp_print_styles action *has* been called, the CSS link will
 * be printed. Printing may be forced by passing TRUE as the $force_echo
 * (second) parameter.
 *
 * For backward compatibility with WordPress 2.3 calling method: If the $file
 * (first) parameter does not correspond to a registered CSS file, we assume
 * $file is a file relative to wp-admin/ without its ".css" extension. A
 * stylesheet link to that generated URL is printed.
 *
 * @package WordPress
 * @since 2.3.0
 * @uses $wp_styles WordPress Styles Object
 *
 * @param string $file Style handle name or file name (without ".css" extension) relative to wp-admin/
 * @param bool $force_echo Optional.  Force the stylesheet link to be printed rather than enqueued.
 */
function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
	global $wp_styles;
	if ( !is_a($wp_styles, 'WP_Styles') )
		$wp_styles = new WP_Styles();

	// For backward compatibility
	$handle = 0 === strpos( $file, 'css/' ) ? substr( $file, 4 ) : $file;

	if ( $wp_styles->query( $handle ) ) {
		if ( $force_echo || did_action( 'wp_print_styles' ) ) // we already printed the style queue.  Print this one immediately
			wp_print_styles( $handle );
		else // Add to style queue
			wp_enqueue_style( $handle );
		return;
	}

	echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . clean_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );
	if ( 'rtl' == get_bloginfo( 'text_direction' ) )
		echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . clean_url( wp_admin_css_uri( "$file-rtl" ) ) . "' type='text/css' />\n", "$file-rtl" );
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:41,代码来源:general-template.php


示例4: wp_admin_css

function wp_admin_css( $file = 'wp-admin' ) {

	echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $file ) . "' type='text/css' />\n", $file );
	if ( 'rtl' == get_bloginfo( 'text_direction' ) ) {
		$rtl = ( 'wp-admin' == $file ) ? 'rtl' : "$file-rtl";
		echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $rtl ) . "' type='text/css' />\n", $rtl );
	}
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:8,代码来源:general-template.php


示例5: wp_admin_css

function wp_admin_css($file = 'wp-admin', $force_echo = false)
{
    echo apply_filters('wp_admin_css', "<link rel='stylesheet' href='" . esc_url(wp_admin_css_uri($file)) . "' type='text/css' />\n", $file);
    if (function_exists('is_rtl') && is_rtl()) {
        echo apply_filters('wp_admin_css', "<link rel='stylesheet' href='" . esc_url(wp_admin_css_uri("{$file}-rtl")) . "' type='text/css' />\n", "{$file}-rtl");
    }
}
开发者ID:basdog22,项目名称:Qool,代码行数:7,代码来源:layer.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wp_ajax_trash_post函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_admin_css_color函数代码示例发布时间: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