本文整理汇总了PHP中wpgrade::corepartial方法的典型用法代码示例。如果您正苦于以下问题:PHP wpgrade::corepartial方法的具体用法?PHP wpgrade::corepartial怎么用?PHP wpgrade::corepartial使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpgrade
的用法示例。
在下文中一共展示了wpgrade::corepartial方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wpgrade_callback_inlined_custom_style
function wpgrade_callback_inlined_custom_style()
{
ob_start();
include wpgrade::corepartial('inline-custom-css' . EXT);
$custom_css = ob_get_clean();
$style = 'wpgrade-main-style';
wp_add_inline_style($style, $custom_css);
}
示例2: wpgrade_write_custom_css
function wpgrade_write_custom_css($options)
{
if (wpgrade::option('inject_custom_css') !== 'file') {
return;
}
$error = false;
global $wp_filesystem;
// Initialise the Wordpress filesystem, no more using file_put_contents function
if (empty($wp_filesystem)) {
require_once ABSPATH . '/wp-admin/includes/file.php';
WP_Filesystem();
}
$css_dir = get_template_directory() . '/assets/css/';
ob_start();
include wpgrade::corepartial('inline-custom-css' . EXT);
$css = ob_get_clean();
$wp_filesystem->put_contents($css_dir . 'custom.css', $css, FS_CHMOD_FILE);
if ($error == true) {
echo 'There is been an error around';
}
}
示例3: wpgrade_callback_cleanup_readmore_content
/**
* Invoked by wpgrade_callback_themesetup
* The function is executed on the_content_more_link
*
* @param string content
*
* @return string
*/
function wpgrade_callback_cleanup_readmore_content($more_link, $more_link_text)
{
global $post;
return include wpgrade::corepartial('read-more-content' . EXT);
}
示例4: update_notifier
/**
* The notifier page
*/
function update_notifier()
{
include wpgrade::corepartial('update-notifier' . EXT);
}
示例5: wpgrade_callbacks_html5_shim
/**
* ...
*/
function wpgrade_callbacks_html5_shim()
{
global $is_IE;
if ($is_IE) {
include wpgrade::corepartial('ie-shim' . EXT);
}
}
示例6: video_selfhosted
/**
* ...
*/
static function video_selfhosted($postID)
{
$video_m4v = get_post_meta($postID, wpgrade::prefix() . 'video_m4v', true);
$video_webm = get_post_meta($postID, wpgrade::prefix() . 'video_webm', true);
$video_ogv = get_post_meta($postID, wpgrade::prefix() . 'video_ogv', true);
$video_poster = get_post_meta($postID, wpgrade::prefix() . 'video_poster', true);
include wpgrade::corepartial('video-selfhosted' . EXT);
}