当前位置: 首页>>代码示例>>PHP>>正文


PHP global_get_post_id函数代码示例

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


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

示例1: mk_preloader_script

function mk_preloader_script()
{
    global $mk_options;
    $single_preloader = '';
    $preloader_check = 'disabled';
    if (global_get_post_id()) {
        $single_preloader = get_post_meta(global_get_post_id(), 'page_preloader', true);
    }
    if ($single_preloader == 'true') {
        $preloader_check = 'enabled';
    } else {
        if ($mk_options['preloader'] == 'true') {
            $preloader_check = 'enabled';
        }
    }
    if ($preloader_check == 'enabled') {
        wp_enqueue_script('queryloasder2', THEME_JS . '/min/jquery.queryloader2.js', array('jquery'), false, false);
    }
}
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:19,代码来源:enqueue-front-scripts.php

示例2: mk_preloader_body_overlay

 function mk_preloader_body_overlay()
 {
     global $mk_options;
     $post_id = global_get_post_id();
     if ($post_id) {
         $single_preloader = get_post_meta($post_id, 'page_preloader', true);
     }
     $preloader_check = $single_preloader = '';
     if ($single_preloader == 'true') {
         $preloader_check = 'enabled';
     } else {
         if ($mk_options['preloader'] == 'true') {
             $preloader_check = 'enabled';
         }
     }
     if ($preloader_check == 'enabled') {
         echo '<div class="mk-body-loader-overlay"><div style="background-image:url(' . THEME_IMAGES . '/empty.png)"></div></div>';
     }
 }
开发者ID:nikintharan,项目名称:campaign,代码行数:19,代码来源:global.php

示例3: mk_dynamic_js_vars

 function mk_dynamic_js_vars()
 {
     global $mk_options;
     $post_id = global_get_post_id();
     echo '<script type="text/javascript">' . "\n";
     echo 'var abb = {};' . "\n";
     echo 'var php = {};' . "\n";
     echo 'var mk_header_parallax, mk_banner_parallax, mk_page_parallax, mk_footer_parallax, mk_body_parallax;' . "\n";
     echo 'var mk_images_dir = "' . THEME_IMAGES . '",' . "\n";
     echo 'mk_theme_js_path = "' . THEME_JS . '",' . "\n";
     echo 'mk_theme_dir = "' . THEME_DIR_URI . '",' . "\n";
     echo 'mk_captcha_placeholder = "' . __('Enter Captcha', 'mk_framework') . '",' . "\n";
     echo 'mk_captcha_invalid_txt = "' . __('Invalid. Try again.', 'mk_framework') . '",' . "\n";
     echo 'mk_captcha_correct_txt = "' . __('Captcha correct.', 'mk_framework') . '",' . "\n";
     echo 'mk_responsive_nav_width = ' . $mk_options['responsive_nav_width'] . ',' . "\n";
     echo 'mk_check_rtl = ' . (is_rtl() ? "false" : "true") . ',' . "\n";
     echo 'mk_grid_width = ' . $mk_options['grid_width'] . ',' . "\n";
     echo 'mk_ajax_search_option = "' . $mk_options['header_search_location'] . '",' . "\n";
     echo 'mk_preloader_txt_color = "' . ($mk_options['preloader_txt_color'] ? $mk_options['preloader_txt_color'] : '#444') . '",' . "\n";
     echo 'mk_preloader_bg_color = "' . ($mk_options['preloader_bg_color'] ? $mk_options['preloader_bg_color'] : '#fff') . '",' . "\n";
     echo 'mk_accent_color = "' . $mk_options['skin_color'] . '",' . "\n";
     echo 'mk_go_to_top =  "' . ($mk_options['go_to_top'] ? $mk_options['go_to_top'] : 'false') . '",' . "\n";
     $mk_preloader_bar_color = isset($mk_options['preloader_bar_color']) && !empty($mk_options['preloader_bar_color']) ? $mk_options['preloader_bar_color'] : $mk_options['skin_color'];
     echo 'mk_preloader_bar_color = "' . $mk_preloader_bar_color . '",' . "\n";
     echo 'mk_preloader_logo = "' . $mk_options['preloader_logo'] . '";' . "\n";
     if ($post_id) {
         echo 'var mk_header_parallax = ' . (get_post_meta($post_id, 'header_parallax', true) ? get_post_meta($post_id, 'header_parallax', true) : "false") . ',' . "\n";
         echo 'mk_banner_parallax = ' . (get_post_meta($post_id, 'banner_parallax', true) ? get_post_meta($post_id, 'banner_parallax', true) : "false") . ',' . "\n";
         echo 'mk_page_parallax = ' . (get_post_meta($post_id, 'page_parallax', true) ? get_post_meta($post_id, 'page_parallax', true) : "false") . ',' . "\n";
         echo 'mk_footer_parallax = ' . (get_post_meta($post_id, 'footer_parallax', true) ? get_post_meta($post_id, 'footer_parallax', true) : "false") . ',' . "\n";
         echo 'mk_body_parallax = ' . (get_post_meta($post_id, 'body_parallax', true) ? get_post_meta($post_id, 'body_parallax', true) : "false") . ',' . "\n";
         echo 'mk_no_more_posts = "' . __('No More Posts', 'mk_framework') . '";' . "\n";
     }
     echo 'function is_touch_device() {
           return ("ontouchstart" in document.documentElement);
       }' . "\n";
     echo '</script>' . "\n";
 }
开发者ID:nikintharan,项目名称:campaign,代码行数:38,代码来源:head.php

示例4: wp_head

         </script>
    <?php 
wp_head();
?>
    </head>
<?php 
$mk_body_class[] = $mk_header_class = $show_header_old = $show_header = $transparent_header = $transparent_header_skin = $trans_header_class = $page_is_transparent = $header_sticky_style_css = '';
$header_style = !empty($mk_options['theme_header_style']) ? $mk_options['theme_header_style'] : 1;
$toolbar_toggle = !empty($mk_options['theme_toolbar_toggle']) ? $mk_options['theme_toolbar_toggle'] : 'true';
$header_align = !empty($mk_options['theme_header_align']) ? $mk_options['theme_header_align'] : 'left';
$header_grid_start = $mk_options['header_grid'] == 'true' ? '<div class="mk-grid header-grid">' : '';
$header_grid_end = $mk_options['header_grid'] == 'true' ? '</div>' : '';
$header_width_class = $mk_options['header_grid'] == 'true' ? 'boxed-header' : 'full-header';
$sticky_header_style = isset($mk_options['header_sticky_style']) ? $mk_options['header_sticky_style'] : 'fixed';
$sticky_header_offset = isset($mk_options['sticky_header_offset']) ? $mk_options['sticky_header_offset'] : 'header';
$post_id = global_get_post_id();
if ($post_id) {
    $enable = get_post_meta($post_id, '_enable_local_backgrounds', true);
    if ($enable == 'true') {
        $header_style_meta = get_post_meta($post_id, 'theme_header_style', true);
        $header_align_meta = get_post_meta($post_id, 'theme_header_align', true);
        $toolbar_toggle_meta = get_post_meta($post_id, 'theme_toolbar_toggle', true);
        $transparent_header_meta = get_post_meta($post_id, '_transparent_header', true);
        $transparent_header_skin_meta = get_post_meta($post_id, '_transparent_header_skin', true);
        $sticky_header_offset_meta = get_post_meta($post_id, '_sticky_header_offset', true);
        $trans_header_remove_bg_meta = get_post_meta($post_id, '_trans_header_remove_bg', true);
        $header_style = isset($header_style_meta) && !empty($header_style_meta) ? $header_style_meta : $header_style;
        $header_align = isset($header_align_meta) && !empty($header_align_meta) ? $header_align_meta : $header_align;
        $toolbar_toggle = isset($toolbar_toggle_meta) && !empty($toolbar_toggle_meta) ? $toolbar_toggle_meta : $toolbar_toggle;
        $transparent_header = isset($transparent_header_meta) && !empty($transparent_header_meta) ? $transparent_header_meta : 'false';
        $transparent_header_skin = isset($transparent_header_skin_meta) && !empty($transparent_header_skin_meta) ? $transparent_header_skin_meta : 'light';
开发者ID:kevalbaxi,项目名称:dosomething-blog,代码行数:31,代码来源:header.old.php

示例5: mk_side_dashboard

 function mk_side_dashboard()
 {
     global $mk_options;
     $header_style = !empty($mk_options['theme_header_style']) ? $mk_options['theme_header_style'] : 1;
     $header_style3_structure = !empty($mk_options['header_style3_structure']) ? $mk_options['header_style3_structure'] : 'header_dashboard_style';
     /*Full Screen Navigation Settings*/
     $full_screen_logo = !empty($mk_options['fullscreen_nav_logo']) ? $mk_options['fullscreen_nav_logo'] : 'dark';
     $dark_logo = $mk_options['logo'];
     $light_logo = isset($mk_options['light_header_logo']) ? $mk_options['light_header_logo'] : '';
     $mobile_logo = isset($mk_options['responsive_logo']) ? $mk_options['responsive_logo'] : '';
     $is_repsonive_logo = !empty($mobile_logo) ? 'logo-is-responsive' : '';
     $post_id = global_get_post_id();
     if ($post_id) {
         $enable = get_post_meta($post_id, '_enable_local_backgrounds', true);
         $header_style_meta = get_post_meta($post_id, 'theme_header_style', true);
         $header_style = isset($header_style_meta) && !empty($header_style_meta) && $enable == 'true' ? $header_style_meta : $header_style;
     }
     if ($header_style == 3) {
         if ($header_style3_structure == 'header_dashboard_style') {
             $output = '';
             $output .= '<div class="mk-side-dashboard">';
             //$output .= '<span class="mk-sidedasboard-close"><i class="mk-theme-icon-cancel"></i></span>';
             /* Top Widgets */
             $output .= '<div class="side-dash-top-widgets">';
             ob_start();
             dynamic_sidebar('Side Dashboard - Above Navigation');
             $output .= ob_get_contents();
             ob_end_clean();
             $output .= '</div>';
             /************/
             $output .= wp_nav_menu(array('theme_location' => 'side-dashboard-menu', 'container' => 'nav', 'container_id' => 'mk-sidedash-navigation', 'container_class' => 'side_dashboard_menu', 'menu_class' => 'sidedash-navigation-ul', 'echo' => false, 'fallback_cb' => '', 'walker' => new header_icon_walker()));
             /* Bottom Widets */
             $output .= '<div class="side-dash-bottom-widgets">';
             ob_start();
             dynamic_sidebar('Side Dashboard - Below Navigation');
             $output .= ob_get_contents();
             ob_end_clean();
             $output .= '</div>';
             /************/
             $output .= '</div>';
             echo $output;
         } else {
             if ($header_style3_structure == 'header_fullscreen_style') {
                 $output = '';
                 $output .= '<div class="mk-fullscreen-nav ' . $is_repsonive_logo . '">';
                 $output .= '<a href="#" class="mk-fullscreen-nav-close"><i class="mk-moon-close-2"></i></a>';
                 $output .= '<div class="mk-fullscreen-nav-wrapper">';
                 if ($full_screen_logo == 'dark') {
                     $output .= '<img class="mk-fullscreen-nav-logo dark-logo" alt="' . get_bloginfo('name') . '" src="' . $dark_logo . '" />';
                     $output .= '<img class="mk-fullscreen-nav-logo responsive-logo" alt="' . get_bloginfo('name') . '" src="' . $mobile_logo . '" />';
                 } else {
                     if ($full_screen_logo == 'light') {
                         $output .= '<img class="mk-fullscreen-nav-logo light-logo" alt="' . get_bloginfo('name') . '" src="' . $light_logo . '" />';
                         $output .= '<img class="mk-fullscreen-nav-logo responsive-logo" alt="' . get_bloginfo('name') . '" src="' . $mobile_logo . '" />';
                     }
                 }
                 $output .= wp_nav_menu(array('theme_location' => 'fullscreen-menu', 'container' => 'nav', 'container_id' => 'fullscreen-navigation', 'container_class' => 'fullscreen-menu', 'menu_class' => 'fullscreen-navigation-ul', 'echo' => false, 'fallback_cb' => '', 'walker' => new header_icon_walker()));
                 $output .= '</div> </div>';
                 echo $output;
             }
         }
     }
 }
开发者ID:namleduc,项目名称:thqc,代码行数:63,代码来源:header.php

示例6: mk_theme_breadcrumbs

 function mk_theme_breadcrumbs()
 {
     global $mk_options, $post;
     $post_id = global_get_post_id();
     if ($post_id) {
         $local_skining = get_post_meta($post_id, '_enable_local_backgrounds', true);
         $breadcrumb_skin = get_post_meta($post_id, '_breadcrumb_skin', true);
         if ($local_skining == 'true' && !empty($breadcrumb_skin)) {
             $breadcrumb_skin_class = $breadcrumb_skin;
         } else {
             $breadcrumb_skin_class = $mk_options['breadcrumb_skin'];
         }
     } else {
         $breadcrumb_skin_class = $mk_options['breadcrumb_skin'];
     }
     $delimiter = ' &#47; ';
     echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">';
     if (!is_front_page()) {
         echo '<a href="';
         echo home_url();
         echo '">' . __('Home', 'mk_framework');
         echo "</a>" . $delimiter;
     }
     if (function_exists('is_woocommerce') && is_woocommerce() && is_archive()) {
         $shop_page_id = wc_get_page_id('shop');
         $shop_page = get_post($shop_page_id);
         $permalinks = get_option('woocommerce_permalinks');
         if ($shop_page_id && $shop_page && get_option('page_on_front') !== $shop_page_id) {
             echo '<a href="' . get_permalink($shop_page) . '">' . $shop_page->post_title . '</a> ';
         }
     }
     if (is_category() && !is_singular('portfolio')) {
         $category = get_the_category();
         $ID = $category[0]->cat_ID;
         echo is_wp_error($cat_parents = get_category_parents($ID, TRUE, '', FALSE)) ? '' : '<span>' . $cat_parents . '</span>';
     } else {
         if (is_singular('news')) {
             echo '<span>' . get_the_title() . '</span>';
         } else {
             if (is_single() && !is_attachment()) {
                 if (get_post_type() == 'product') {
                     if ($terms = wc_get_product_terms($post->ID, 'product_cat', array('orderby' => 'parent', 'order' => 'DESC'))) {
                         $main_term = $terms[0];
                         $ancestors = get_ancestors($main_term->term_id, 'product_cat');
                         $ancestors = array_reverse($ancestors);
                         foreach ($ancestors as $ancestor) {
                             $ancestor = get_term($ancestor, 'product_cat');
                             if (!is_wp_error($ancestor) && $ancestor) {
                                 echo '<a href="' . get_term_link($ancestor->slug, 'product_cat') . '">' . $ancestor->name . '</a>' . $delimiter;
                             }
                         }
                         echo '<a href="' . get_term_link($main_term->slug, 'product_cat') . '">' . $main_term->name . '</a>' . $delimiter;
                     }
                     echo get_the_title();
                 } elseif (is_singular('portfolio')) {
                     $portfolio_category = get_the_term_list($post->ID, 'portfolio_category', '', ' / ');
                     if (!empty($portfolio_category)) {
                         echo $portfolio_category . $delimiter;
                     }
                     echo '<span>' . get_the_title() . '</span>';
                 } elseif (get_post_type() != 'post') {
                     if (function_exists('is_bbpress') && is_bbpress()) {
                     } else {
                         $post_type = get_post_type_object(get_post_type());
                         $slug = $post_type->rewrite;
                         echo '<a href="' . get_post_type_archive_link(get_post_type()) . '">' . $post_type->labels->singular_name . '</a>' . $delimiter;
                         echo get_the_title();
                     }
                 } else {
                     $cat = current(get_the_category());
                     echo get_category_parents($cat, true, $delimiter);
                     echo get_the_title();
                 }
             } elseif (is_page() && !$post->post_parent) {
                 echo get_the_title();
             } elseif (is_page() && $post->post_parent) {
                 $parent_id = $post->post_parent;
                 $breadcrumbs = array();
                 while ($parent_id) {
                     $page = get_page($parent_id);
                     $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
                     $parent_id = $page->post_parent;
                 }
                 $breadcrumbs = array_reverse($breadcrumbs);
                 foreach ($breadcrumbs as $crumb) {
                     echo $crumb . '' . $delimiter;
                 }
                 echo get_the_title();
             } elseif (is_attachment()) {
                 $parent = get_post($post->post_parent);
                 $cat = get_the_category($parent->ID);
                 $cat = $cat[0];
                 /* admin@innodron.com patch:
                 			   Fix for Catchable fatal error: Object of class WP_Error could not be converted to string
                 			   ref: https://wordpress.org/support/topic/catchable-fatal-error-object-of-class-wp_error-could-not-be-converted-to-string-11
                 			*/
                 echo is_wp_error($cat_parents = get_category_parents($cat, TRUE, '' . $delimiter . '')) ? '' : $cat_parents;
                 /* end admin@innodron.com patch */
                 echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a>' . $delimiter;
                 echo get_the_title();
//.........这里部分代码省略.........
开发者ID:nikintharan,项目名称:campaign,代码行数:101,代码来源:general.php

示例7: mk_dynamic_css


//.........这里部分代码省略.........
    $header_bg .= $mk_options['header_attachment'] ? 'background-attachment:' . $mk_options['header_attachment'] . ';' : '';
    /**
     * Header Banner background
     */
    $banner_bg .= $mk_options['banner_color'] ? 'background-color:' . $mk_options['banner_color'] . ';' : '';
    $banner_bg .= $mk_options['banner_image'] ? 'background-image:url(' . $mk_options['banner_image'] . ');' : ' ';
    $banner_bg .= $mk_options['banner_repeat'] ? 'background-repeat:' . $mk_options['banner_repeat'] . ';' : '';
    $banner_bg .= $mk_options['banner_position'] ? 'background-position:' . $mk_options['banner_position'] . ';' : '';
    $banner_bg .= $mk_options['banner_attachment'] ? 'background-attachment:' . $mk_options['banner_attachment'] . ';' : '';
    /**
     * Page background
     */
    $page_bg .= $mk_options['page_color'] ? 'background-color:' . $mk_options['page_color'] . ';' : '';
    $page_bg .= $mk_options['page_image'] ? 'background-image:url(' . $mk_options['page_image'] . ');' : ' ';
    $page_bg .= $mk_options['page_repeat'] ? 'background-repeat:' . $mk_options['page_repeat'] . ';' : '';
    $page_bg .= $mk_options['page_position'] ? 'background-position:' . $mk_options['page_position'] . ';' : '';
    $page_bg .= $mk_options['page_attachment'] ? 'background-attachment:' . $mk_options['page_attachment'] . ';' : '';
    /**
     * Footer background
     */
    $footer_bg = $mk_options['footer_color'] ? 'background-color:' . $mk_options['footer_color'] . ';' : '';
    $footer_bg .= $mk_options['footer_image'] ? 'background-image:url(' . $mk_options['footer_image'] . ');' : ' ';
    $footer_bg .= $mk_options['footer_repeat'] ? 'background-repeat:' . $mk_options['footer_repeat'] . ';' : '';
    $footer_bg .= $mk_options['footer_position'] ? 'background-position:' . $mk_options['footer_position'] . ';' : '';
    $footer_bg .= $mk_options['footer_attachment'] ? 'background-attachment:' . $mk_options['footer_attachment'] . ';' : '';
    $page_title_color = $mk_options['page_title_color'];
    $page_subtitle_color = $mk_options['page_subtitle_color'];
    $banner_border_color = $mk_options['banner_border_color'];
    $boxed_layout_shadow_size = $mk_options['boxed_layout_shadow_size'];
    $boxed_layout_shadow_intensity = $mk_options['boxed_layout_shadow_intensity'];
    $page_title_padding = 15;
    $trans_header_border_color = '';
    $page_color = $mk_options['page_color'];
    if (global_get_post_id()) {
        $post_id = global_get_post_id();
        $enable = get_post_meta($post_id, '_enable_local_backgrounds', true);
        if ($enable == 'true') {
            $body_bg = get_post_meta($post_id, 'body_color', true) ? 'background-color: ' . get_post_meta($post_id, 'body_color', true) . ';' : 'background-color: ' . $mk_options['body_color'] . ';';
            $body_bg .= get_post_meta($post_id, 'body_image', true) ? 'background-image:url(' . get_post_meta($post_id, 'body_image', true) . ');' : '';
            $body_bg .= get_post_meta($post_id, 'body_repeat', true) ? 'background-repeat:' . get_post_meta($post_id, 'body_repeat', true) . ';' : '';
            $body_bg .= get_post_meta($post_id, 'body_position', true) ? 'background-position:' . get_post_meta($post_id, 'body_position', true) . ';' : '';
            $body_bg .= get_post_meta($post_id, 'body_attachment', true) ? 'background-attachment:' . get_post_meta($post_id, 'body_attachment', true) . ';' : '';
            $header_bg = get_post_meta($post_id, 'header_color', true) ? 'background-color: ' . get_post_meta($post_id, 'header_color', true) . ';' : 'background-color: ' . $mk_options['header_color'] . ';';
            $header_bg .= get_post_meta($post_id, 'header_image', true) ? 'background-image:url(' . get_post_meta($post_id, 'header_image', true) . ');' : '';
            $header_bg .= get_post_meta($post_id, 'header_repeat', true) ? 'background-repeat:' . get_post_meta($post_id, 'header_repeat', true) . ';' : '';
            $header_bg .= get_post_meta($post_id, 'header_position', true) ? 'background-position:' . get_post_meta($post_id, 'header_position', true) . ';' : '';
            $header_bg .= get_post_meta($post_id, 'header_attachment', true) ? 'background-attachment:' . get_post_meta($post_id, 'header_attachment', true) . ';' : '';
            $banner_bg = get_post_meta($post_id, 'banner_color', true) ? 'background-color: ' . get_post_meta($post_id, 'banner_color', true) . ';' : 'background-color: ' . $mk_options['banner_color'] . ';';
            $banner_bg .= get_post_meta($post_id, 'banner_image', true) ? 'background-image:url(' . get_post_meta($post_id, 'banner_image', true) . ');' : '';
            $banner_bg .= get_post_meta($post_id, 'banner_repeat', true) ? 'background-repeat:' . get_post_meta($post_id, 'banner_repeat', true) . ';' : '';
            $banner_bg .= get_post_meta($post_id, 'banner_position', true) ? 'background-position:' . get_post_meta($post_id, 'banner_position', true) . ';' : '';
            $banner_bg .= get_post_meta($post_id, 'banner_attachment', true) ? 'background-attachment:' . get_post_meta($post_id, 'banner_attachment', true) . ';' : '';
            $page_bg = get_post_meta($post_id, 'page_color', true) ? 'background-color: ' . get_post_meta($post_id, 'page_color', true) . ';' : 'background-color: ' . $mk_options['page_color'] . ';';
            $page_bg .= get_post_meta($post_id, 'page_image', true) ? 'background-image:url(' . get_post_meta($post_id, 'page_image', true) . ');' : '';
            $page_bg .= get_post_meta($post_id, 'page_repeat', true) ? 'background-repeat:' . get_post_meta($post_id, 'page_repeat', true) . ';' : '';
            $page_bg .= get_post_meta($post_id, 'page_position', true) ? 'background-position:' . get_post_meta($post_id, 'page_position', true) . ';' : '';
            $page_bg .= get_post_meta($post_id, 'page_attachment', true) ? 'background-attachment:' . get_post_meta($post_id, 'page_attachment', true) . ';' : '';
            $footer_bg = get_post_meta($post_id, 'footer_color', true) ? 'background-color: ' . get_post_meta($post_id, 'footer_color', true) . ';' : 'background-color: ' . $mk_options['footer_color'] . ';';
            $footer_bg .= get_post_meta($post_id, 'footer_image', true) ? 'background-image:url(' . get_post_meta($post_id, 'footer_image', true) . ');' : '';
            $footer_bg .= get_post_meta($post_id, 'footer_repeat', true) ? 'background-repeat:' . get_post_meta($post_id, 'footer_repeat', true) . ';' : '';
            $footer_bg .= get_post_meta($post_id, 'footer_position', true) ? 'background-position:' . get_post_meta($post_id, 'footer_position', true) . ';' : '';
            $footer_bg .= get_post_meta($post_id, 'footer_attachment', true) ? 'background-attachment:' . get_post_meta($post_id, 'footer_attachment', true) . ';' : '';
            $page_title_color = get_post_meta($post_id, '_page_title_color', true) ? get_post_meta($post_id, '_page_title_color', true) : '';
            $page_subtitle_color = get_post_meta($post_id, '_page_subtitle_color', true) ? get_post_meta($post_id, '_page_subtitle_color', true) : '';
            $banner_border_color = get_post_meta($post_id, '_banner_border_color', true) ? get_post_meta($post_id, '_banner_border_color', true) : '';
            $trans_header_border_color = get_post_meta($post_id, '_trans_header_border_bottom', true) ? get_post_meta($post_id, '_trans_header_border_bottom', true) : '';
开发者ID:kevalbaxi,项目名称:dosomething-blog,代码行数:67,代码来源:dynamic-styles.php

示例8: apply_filters

if (empty($woocommerce_loop['columns'])) {
    $woocommerce_loop['columns'] = apply_filters('loop_shop_columns', 4);
}
// Ensure visibility
if (!$product->is_visible()) {
    return;
}
// Increase loop count
$woocommerce_loop['loop']++;
$grid_width = $mk_options['grid_width'];
$content_width = $mk_options['content_width'];
$height = $mk_options['woo_loop_img_height'];
$quality = $mk_options['woo_image_quality'];
// Sets the shop loop columns from theme options.
if (is_shop()) {
    $layout = get_post_meta(global_get_post_id(), '_layout', true);
    if ($layout == 'full') {
        $classes[] = 'four-column';
        $width = round($grid_width / 4) - 28;
        $column_width = round($grid_width / 4);
    } else {
        $classes[] = 'three-column';
        $width = round($content_width / 100 * $grid_width / 3) - 31;
        $column_width = round($grid_width / 3);
    }
} else {
    switch ($woocommerce_loop['columns']) {
        case 4:
            $classes[] = 'four-column';
            $width = round($grid_width / 4) - 28;
            $column_width = round($grid_width / 4);
开发者ID:kevalbaxi,项目名称:dosomething-blog,代码行数:31,代码来源:content-product.php

示例9: mk_woocommerce_output_content_wrapper_end

function mk_woocommerce_output_content_wrapper_end()
{
    global $mk_options;
    if (is_singular('product')) {
        $page_layout = $mk_options['woocommerce_single_layout'];
    } else {
        if (global_get_post_id()) {
            $page_layout = get_post_meta(global_get_post_id(), '_layout', true);
        } else {
            if (mk_is_woo_archive()) {
                $page_layout = get_post_meta(mk_is_woo_archive(), '_layout', true);
            }
        }
    }
    if (isset($_REQUEST['layout']) && !empty($_REQUEST['layout'])) {
        $page_layout = $_REQUEST['layout'];
    }
    $page_layout = isset($page_layout) && !empty($page_layout) ? $page_layout : 'full';
    ?>
		</div>
	<?php 
    if ($page_layout != 'full') {
        get_sidebar();
    }
    ?>
	
		<div class="clearboth"></div>	
		</div>
	</div>
</div>
<?php 
}
开发者ID:namleduc,项目名称:thqc,代码行数:32,代码来源:mk-woocommerce.php

示例10: jupiter_geodir_page_title

/**
 * Add page title and subtitle.
 *
 * @since 1.0.0
 * @package GeoDirectory
 * @param string $title Page title.
 * @param string $subtitle Page subtitle.
 */
function jupiter_geodir_page_title($title = '', $subtitle = '')
{
    global $mk_options;
    $post_id = global_get_post_id();
    $shadow_css = '';
    if ($mk_options['page_title_shadow'] == 'true') {
        $shadow_css = 'mk-drop-shadow';
    }
    $align = !empty($align) ? $align : 'left';
    //$title = 'xxxx';
    echo '<section id="mk-page-introduce" class="intro-' . $align . '">';
    echo '<div class="mk-grid">';
    if (!empty($title)) {
        echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>';
    }
    if (!empty($subtitle)) {
        echo '<div class="page-introduce-subtitle">';
        echo $subtitle;
        echo '</div>';
    }
    if ($mk_options['disable_breadcrumb'] == 'true') {
        if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') {
            /**
             * Calls the theme breadcrumbs for Jupiter theme.
             *
             * @since 1.4.0
             */
            do_action('theme_breadcrumbs', $post_id);
        }
    }
    echo '<div class="clearboth"></div></div></section>';
}
开发者ID:jefferose,项目名称:geodirectory,代码行数:40,代码来源:Jupiter.php

示例11: mk_side_dashboard

 function mk_side_dashboard()
 {
     global $mk_options;
     $header_style = !empty($mk_options['theme_header_style']) ? $mk_options['theme_header_style'] : 1;
     $post_id = global_get_post_id();
     if ($post_id) {
         $enable = get_post_meta($post_id, '_enable_local_backgrounds', true);
         $header_style_meta = get_post_meta($post_id, 'theme_header_style', true);
         $header_style = isset($header_style_meta) && !empty($header_style_meta) && $enable == 'true' ? $header_style_meta : $header_style;
     }
     if ($header_style == 3) {
         $output = '';
         $output .= '<div class="mk-side-dashboard">';
         //$output .= '<span class="mk-sidedasboard-close"><i class="mk-theme-icon-cancel"></i></span>';
         /* Top Widgets */
         $output .= '<div class="side-dash-top-widgets">';
         ob_start();
         dynamic_sidebar('Side Dashboard - Above Navigation');
         $output .= ob_get_contents();
         ob_end_clean();
         $output .= '</div>';
         /************/
         $output .= wp_nav_menu(array('theme_location' => 'side-dashboard-menu', 'container' => 'nav', 'container_id' => 'mk-sidedash-navigation', 'container_class' => 'side_dashboard_menu', 'menu_class' => 'sidedash-navigation-ul', 'echo' => false, 'fallback_cb' => '', 'walker' => new header_icon_walker()));
         /* Bottom Widets */
         $output .= '<div class="side-dash-bottom-widgets">';
         ob_start();
         dynamic_sidebar('Side Dashboard - Below Navigation');
         $output .= ob_get_contents();
         ob_end_clean();
         $output .= '</div>';
         /************/
         $output .= '</div>';
         echo $output;
     }
 }
开发者ID:kevalbaxi,项目名称:dosomething-blog,代码行数:35,代码来源:header.php


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