本文整理汇总了PHP中wp_head函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_head函数的具体用法?PHP wp_head怎么用?PHP wp_head使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_head函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_head_template
function get_head_template()
{
?>
<head>
<meta charset="UTF-8">
<title>KENYANKE</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<link rel="stylesheet" type="text/css" href="<?php
echo get_template_directory_uri();
?>
/sanitize.css">
<link rel="stylesheet" type="text/css" href="<?php
echo get_template_directory_uri();
?>
/style.css">
<!-- Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-67612178-1', 'auto');
ga('send', 'pageview');
</script>
<?php
wp_head();
?>
</head>
<?php
}
开发者ID:kenyakodaira,项目名称:kenyanke,代码行数:34,代码来源:template-head.php
示例2: wcng_email_header
/**
* Email header for hooking scripts and stylesheet for admin
*
* @return void
*/
function wcng_email_header()
{
if (wcng_current_user_can_edit_newsletter()) {
wp_head();
}
do_action('wcng_email_header');
}
开发者ID:gregoriopellegrino,项目名称:woocommerce-newsletter-generator,代码行数:12,代码来源:functions-wc-newsletter-generator-template-tags.php
示例3: wordpressAction
public function wordpressAction(Request $request)
{
$this->get('wordpress.loader')->load();
$this->get('wordpress.loader')->loadPostInWordpressFromRequest($request);
remove_theme_support('custom-header');
remove_action('wp_head', 'wp_enqueue_scripts', 1);
remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
remove_action('wp_head', 'locale_stylesheet');
remove_action('wp_head', 'noindex', 1);
remove_action('wp_head', 'wp_print_styles', 8);
remove_action('wp_head', 'wp_print_head_scripts', 9);
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'rel_canonical');
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
ob_start();
@wp_head();
$head = ob_get_clean();
ob_start();
$content = dynamic_sidebar('sidebar-2');
$side = ob_get_clean();
ob_start();
the_content();
$content = ob_get_clean();
$post = array('content' => $content);
return $this->render($this->container->getParameter('wordpress.template'), array('post' => $post));
}
开发者ID:cmoncy,项目名称:WordpressBundle,代码行数:30,代码来源:DefaultController.php
示例4: get_rendered_item
function get_rendered_item()
{
$item_id = explode('-', $_REQUEST['id']);
if (count($item_id) == 2) {
global $wp_query;
query_posts('page_id=' . $item_id[0]);
query_posts(array('p' => $item_id[0], 'post_type' => $item_id[1]));
ob_start();
wp_head();
$header = ob_get_contents();
ob_end_clean();
ob_start();
include RHC_PATH . 'templates/calendar-single-post.php';
$content = ob_get_contents();
ob_end_clean();
ob_start();
wp_footer();
$footer = ob_get_contents();
ob_end_clean();
$response = (object) array('R' => 'OK', 'MSG' => '', 'DATA' => array('body' => $content, 'footer' => $footer));
die(json_encode($response));
} else {
die(json_encode(array('R' => 'ERR', 'MSG' => __('Invalid item id', 'rhc'))));
}
}
开发者ID:TheMysticalSock,项目名称:westmichigansymphony,代码行数:25,代码来源:class.calendar_ajax.php
示例5: hw_ajax_before_content
/**
* do before show content ajax
*/
function hw_ajax_before_content()
{
$allow_head = isset($_REQUEST['include_head']) && $_REQUEST['include_head'] ? true : false;
//call wp_head()
if ($allow_head) {
wp_head();
}
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:11,代码来源:ajax.php
示例6: wp_head
public function wp_head()
{
if (is_singular() && get_option('thread_comments')) {
wp_enqueue_script("comment-reply");
}
wp_head();
do_action("pe_theme_wp_head");
}
开发者ID:JeffreyBue,项目名称:jb,代码行数:8,代码来源:PeThemeHeader.php
示例7: renderPage
public function renderPage($templateName, $templateVars = false)
{
echo $this->render('header', ChesterWPCoreDataHelpers::getBlogInfoData());
wp_head();
echo $this->render('header_close', array('siteTitleHTML' => self::renderSiteTitle()));
echo $this->render($templateName, $templateVars);
wp_footer();
echo $this->render('footer');
}
开发者ID:zakirsajib,项目名称:Chester-WordPress-MVC-Theme-Framework,代码行数:9,代码来源:base_controller.php
示例8: test_json_url_is_passed
/**
* Test that the emoji.json URL is passed.
*/
function test_json_url_is_passed()
{
$post_id = $this->factory->post->create();
$this->go_to(get_permalink($post_id));
ob_start();
wp_head();
$head = ob_get_clean();
$this->assertEquals(1, preg_match("/emoji_url: '[^']*emoji.json'/", $head));
}
开发者ID:pento,项目名称:react,代码行数:12,代码来源:test-frontend.php
示例9: get_header
public function get_header()
{
// get the closing tag of the html head
$pos = strpos($this->_header, '</head>');
// echo the header and 'inject' the wp_head hook
echo substr($this->_header, 0, $pos);
wp_head();
echo substr($this->_header, $pos);
}
开发者ID:vrtulka23,项目名称:daiquiri,代码行数:9,代码来源:functions.php
示例10: wptouch_head
function wptouch_head()
{
if (is_single()) {
add_action('wp_head', 'wptouch_canonical_link');
remove_action('wp_head', 'rel_canonical');
}
do_action('wptouch_pre_head');
wp_head();
do_action('wptouch_post_head');
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:10,代码来源:theme.php
示例11: tna_wp_head
function tna_wp_head()
{
ob_start();
wp_head();
$wp_head = ob_get_contents();
ob_end_clean();
global $pre_path;
$wp_head = str_replace(site_url(), 'http://www.nationalarchives.gov.uk' . $pre_path, $wp_head);
echo $wp_head;
}
开发者ID:nationalarchives,项目名称:tna-base,代码行数:10,代码来源:url-rewriting.php
示例12: clink_page_generator
/**
* Generate Clink countdown page when is needed
*/
function clink_page_generator()
{
global $clink_url;
global $post_id;
$clink_powered_by_text = get_option('clink_powered_by_text');
$clink_countdown_duration = get_option('clink_countdown_duration');
if (!is_numeric($clink_countdown_duration) or empty($clink_countdown_duration)) {
$clink_countdown_duration = 10;
}
?>
<!DOCTYPE html>
<html>
<head>
<?php
echo '<title>' . get_the_title($post_id) . ' - ' . get_bloginfo('name') . '</title>';
echo '<meta name="robots" content="noindex,nofollow"/>';
wp_head();
echo "<script>\n\t\t\t\t\t\tvar countdown_duration =" . $clink_countdown_duration . ";\n\t\t\t\t\t\tvar redirect_target_url ='" . $clink_url . "';\t\t\t\t\t\t\n\t\t\t\t\t</script>";
?>
</head>
<body <?php
body_class(get_bloginfo('language'));
?>
<?php
if (is_rtl()) {
echo 'dir="rtl"';
}
?>
>
<div class="clink-page">
<div class="container">
<div class="clink-box">
<p><?php
_e('You will redirect to the destination link In a moment', 'aryan-themes');
?>
</p>
<div id="countdown"></div>
<p class="problem"><?php
printf(__('If the page does not redirect automatically, click on <a href="%s">this link</a>', 'aryan-themes'), $clink_url);
?>
</p>
</div>
</div>
<?php
if ($clink_powered_by_text === "1") {
echo '<div class="aryan-themes"><p>';
printf(__('Powered By <a href="%s">Aryan Themes</a>', 'aryan-themes'), 'http://aryanthemes.com');
echo '</p></div>';
}
?>
</div>
</body>
</html>
<?php
}
开发者ID:aryanthemes,项目名称:Clink,代码行数:58,代码来源:clink-template.php
示例13: wptouch_core_header_enqueue
function wptouch_core_header_enqueue()
{
$version = get_bloginfo('version');
if (!bnc_wptouch_is_exclusive()) {
wp_enqueue_script('wptouch-core', '' . compat_get_plugin_url('wptouch') . '/themes/core/core.js', array('jquery'), '1.9');
wp_head();
} elseif (bnc_wptouch_is_exclusive()) {
echo "<script src='" . get_bloginfo('wpurl') . "/wp-includes/js/jquery/jquery.js' type='text/javascript' charset='utf-8'></script>\n";
echo "<script src='" . compat_get_plugin_url('wptouch') . "/themes/core/core.js' type='text/javascript' charset='utf-8'></script>\n";
}
}
开发者ID:emelleme,项目名称:Drexel-Cab,代码行数:11,代码来源:core-functions.php
示例14: dite_zoom_shortcode
function dite_zoom_shortcode($arg)
{
global $wpdb, $post;
wp_enqueue_script('jquery');
wp_deregister_script('jquery-zoom');
wp_enqueue_script('jquery-zoom', dite_zoom_pluginurl('js') . '/jquery.jqzoom-core.js');
wp_enqueue_style('jquery-zoom', dite_zoom_pluginurl('css') . '/jquery.jqzoom.css');
wp_head();
$id = $arg['id'];
include_once dite_zoom_pluginpath() . '/views/shortcode.php';
}
开发者ID:johntcook,项目名称:zoom-images,代码行数:11,代码来源:shortcode.php
示例15: renderPage
/**
* Print head + template + footer
*
* @param string $templateName Template name to print
* @param array $templateVars Parameters to template
*/
public function renderPage($templateName, $templateVars = [])
{
// HEAD
ob_start();
wp_head();
$wpHead = ob_get_clean();
// FOOTER
ob_start();
wp_footer();
$wpFooter = ob_get_clean();
return $this->render($templateName, array_merge($templateVars, ['wp_head' => $wpHead, 'wp_footer' => $wpFooter]));
}
开发者ID:chemaclass,项目名称:knob-base,代码行数:18,代码来源:BaseController.php
示例16: process_edit_post_data
protected function process_edit_post_data($post_data)
{
foreach ($this->form_fields as $field) {
$ok = $this->player->set($field->name, $field->value);
}
if (!count($this->form_error_fields)) {
$this->player->save();
wp_redirect($this->page_url(array('player_saved' => $this->player->get_id())));
exit;
} else {
wp_head();
}
}
开发者ID:vsalx,项目名称:rattieinfo,代码行数:13,代码来源:jwp6-class-admin-page-players.php
示例17: bizz_html_header
function bizz_html_header()
{
global $post;
echo apply_filters('bizz_doctype', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">') . "\n";
#filter
?>
<html xmlns="http://www.w3.org/1999/xhtml" <?php
language_attributes();
?>
>
<?php
// HEAD
echo "<head" . apply_filters('bizz_head_profile', ' profile="http://gmpg.org/xfn/11"') . ">\n";
#filter
echo '<meta http-equiv="Content-Type" content="' . get_bloginfo('html_type') . '; charset=' . get_bloginfo('charset') . '" />' . "\n";
#wp
if (!is_admin()) {
if (is_singular() && comments_open() && get_option('thread_comments') == 1) {
wp_enqueue_script('comment-reply');
}
}
#wp
do_action('bizz_head_before');
#hook
do_action('bizz_head_title');
#hook
do_action('bizz_head_meta');
#hook
do_action('bizz_head_stylesheets');
#hook
do_action('bizz_head_links');
#hook
do_action('bizz_head_scripts');
#hook
wp_head();
#wp #hook
do_action('bizz_head_after');
#hook
echo '<link rel="pingback" href="' . get_bloginfo('pingback_url') . '" />' . "\n";
#wp
echo "</head>\n";
#END <head> tag
// BODY
echo "<body " . apply_filters('bizz_body_class', 'class="' . implode(' ', get_body_class()) . '"') . ">\n";
#filter
do_action('bizz_body_after');
#hook
do_action('bizz_head_grid');
#hook
}
开发者ID:loevendahl,项目名称:flexbil,代码行数:51,代码来源:frame_html.php
示例18: tc_display_head
/**
* The template for displaying <head> stuffs.
*
*
* @package Customizr
* @since Customizr 3.0
*/
function tc_display_head()
{
?>
<head>
<meta charset="<?php
bloginfo('charset');
?>
" />
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />
<title><?php
wp_title('|', true, 'right');
?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="profile" href="http://gmpg.org/xfn/11" />
<?php
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if (is_singular() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
?>
<!-- Favicon -->
<?php
do_action('__favicon');
?>
<link rel="pingback" href="<?php
bloginfo('pingback_url');
?>
" />
<!-- Icons font support for IE6-7 -->
<!--[if lt IE 8]>
<script src="<?php
echo TC_BASE_URL;
?>
inc/css/fonts/lte-ie7.js"></script>
<![endif]-->
<?php
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_head();
?>
</head>
<?php
}
开发者ID:BackupTheBerlios,项目名称:vishwa-svn,代码行数:58,代码来源:class-main-header.php
示例19: pl_standard_head
/**
* Get standard HTML head for user in header.php
* This function is needed if header.php is used in child themes
*/
function pl_standard_head($content)
{
?>
<!DOCTYPE html>
<html class="no-js" <?php
language_attributes();
do_action('the_html_tag');
?>
>
<head>
<meta http-equiv="Content-Type" content="<?php
bloginfo('html_type');
?>
; charset=<?php
bloginfo('charset');
?>
" />
<?php
printf(apply_filters('pl_xfn', '<link rel="profile" href="http://gmpg.org/xfn/11" />' . "\n "));
printf(apply_filters('pl_mobile_viewport', '<meta name="viewport" content="width=device-width, initial-scale=1">' . "\n"));
?>
<?php
wp_head();
?>
</head>
<body <?php
body_class(pl_scheme_class('site_scheme'));
?>
><?php
pl_hook('pagelines_before_site');
?>
<div id="site" class="site-wrap" ><?php
pl_hook('pagelines_before_page');
?>
<div class="site-wrap-pad"><?php
pl_hook('pagelines_site_wrap');
?>
<div id="page" class="page-wrap"><?php
pl_hook('pagelines_page');
?>
<div class="page-wrap-pad"><?php
pl_hook('pagelines_before_main');
?>
<?php
echo $content;
?>
<?php
}
开发者ID:voomco,项目名称:WordPress,代码行数:54,代码来源:functions.php
示例20: ajax_render_shortcode
public function ajax_render_shortcode()
{
if (isset($_GET['shortcode'])) {
$shortcode = urldecode($_GET['shortcode']);
echo '<html><head>';
wp_head();
echo '</head><body><div class="wrapper">';
echo do_shortcode($shortcode);
echo '</div></body>';
#wp_footer();
echo '</html>';
}
exit;
}
开发者ID:j-kenneth,项目名称:Expeero,代码行数:14,代码来源:TdShortcodesTinyMCEIntegrator.php
注:本文中的wp_head函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论