當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wpgrade::corepartial方法代碼示例

本文整理匯總了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);
}
開發者ID:qhuit,項目名稱:Tournesol,代碼行數:8,代碼來源:inline-custom-style.php

示例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';
    }
}
開發者ID:pwzCypher,項目名稱:wp-push,代碼行數:21,代碼來源:callbacks.php

示例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);
}
開發者ID:pwzCypher,項目名稱:wp-push,代碼行數:13,代碼來源:cleanup-read-more.php

示例4: update_notifier

/**
 * The notifier page
 */
function update_notifier()
{
    include wpgrade::corepartial('update-notifier' . EXT);
}
開發者ID:pwzCypher,項目名稱:wp-push,代碼行數:7,代碼來源:main.php

示例5: wpgrade_callbacks_html5_shim

/**
 * ...
 */
function wpgrade_callbacks_html5_shim()
{
    global $is_IE;
    if ($is_IE) {
        include wpgrade::corepartial('ie-shim' . EXT);
    }
}
開發者ID:pwzCypher,項目名稱:wp-push,代碼行數:10,代碼來源:hooks.php

示例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);
 }
開發者ID:pwzCypher,項目名稱:wp-push,代碼行數:11,代碼來源:wpgrade.php


注:本文中的wpgrade::corepartial方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。