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


PHP print_meta函數代碼示例

本文整理匯總了PHP中print_meta函數的典型用法代碼示例。如果您正苦於以下問題:PHP print_meta函數的具體用法?PHP print_meta怎麽用?PHP print_meta使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了print_meta函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: add_slider_option_element

        public function add_slider_option_element()
        {
            $slider_meta_box = $this->slider_meta_box;
            global $post;
            echo '<div id="cp-overlay-wrapper">';
            ?>
 <div class="gallery-option-meta" id="gallery-option-meta"> <?php 
            //set_nonce();
            foreach ($slider_meta_box as $meta_box) {
                //echo '<pre>';print_r($meta_box);die;
                if ($meta_box['type'] == 'sliderpicker') {
                    $xml_string = get_post_meta($post->ID, $meta_box['xml'], true);
                    if (!empty($xml_string)) {
                        $xml_val = new DOMDocument();
                        $xml_val->loadXML($xml_string);
                        $meta_box['value'] = $xml_val->documentElement;
                    }
                    self::print_slider_picker($meta_box);
                } else {
                    $meta_box['value'] = get_post_meta($post->ID, $meta_box['name'], true);
                    print_meta($meta_box);
                }
            }
            ?>
 </div> <?php 
            echo '</div>';
        }
開發者ID:pcco,項目名稱:portal-redesign,代碼行數:27,代碼來源:cp_slider.php

示例2: add_post_option_element

function add_post_option_element()
{
    global $post, $post_meta_boxes;
    // init array
    $post_meta_boxes['Choose Left Sidebar']['options'] = get_sidebar_name();
    $post_meta_boxes['Choose Right Sidebar']['options'] = $post_meta_boxes['Choose Left Sidebar']['options'];
    echo '<div id="gdl-overlay-wrapper">';
    ?>
 <div class="post-option-meta" id="post-option-meta"> <?php 
    set_nonce();
    foreach ($post_meta_boxes as $meta_box) {
        if ($meta_box['type'] == 'imagepicker') {
            $xml_string = get_post_meta($post->ID, $meta_box['xml'], true);
            if (!empty($xml_string)) {
                $xml_val = new DOMDocument();
                $xml_val->loadXML($xml_string);
                $meta_box['value'] = $xml_val->documentElement;
            }
        } else {
            if ($meta_box['type'] == 'open' || $meta_box['type'] == 'close') {
            } else {
                $meta_box['value'] = get_post_meta($post->ID, $meta_box['name'], true);
            }
        }
        print_meta($meta_box);
        if ($meta_box['type'] != 'open' && $meta_box['type'] != 'close') {
            echo "<div class='clear'></div>";
            echo empty($meta_box['hr']) ? '<hr class="separator mt20">' : '';
        }
    }
    ?>
 </div> <?php 
    echo '</div>';
}
開發者ID:hongviet119,項目名稱:dlvv,代碼行數:34,代碼來源:post-option.php

示例3: add_gallery_option_element

function add_gallery_option_element()
{
    global $post, $gallery_meta_box;
    echo '<div id="gdl-overlay-wrapper">';
    ?>
 <div class="gallery-option-meta" id="gallery-option-meta"> <?php 
    set_nonce();
    foreach ($gallery_meta_box as $meta_box) {
        if ($meta_box['type'] == 'gallerypicker') {
            $xml_string = get_post_meta($post->ID, $meta_box['xml'], true);
            if (!empty($xml_string)) {
                $xml_val = new DOMDocument();
                $xml_val->loadXML($xml_string);
                $meta_box['value'] = $xml_val->documentElement;
            }
            print_gallery_picker($meta_box);
        } else {
            $meta_box['value'] = get_post_meta($post->ID, $meta_box['name'], true);
            print_meta($meta_box);
        }
    }
    ?>
 </div> <?php 
    echo '</div>';
}
開發者ID:TheMysticalSock,項目名稱:westmichigansymphony,代碼行數:25,代碼來源:gallery-option.php

示例4: add_testimonial_option_element

function add_testimonial_option_element()
{
    global $post, $testimonial_meta_boxes;
    echo '<div id="gdl-overlay-wrapper">';
    ?>
 <div class="testimonial-option-meta" id="testimonial-option-meta"> <?php 
    set_nonce();
    foreach ($testimonial_meta_boxes as $meta_box) {
        $meta_box['value'] = get_post_meta($post->ID, $meta_box['name'], true);
        print_meta($meta_box);
    }
    ?>
 </div> <?php 
    echo '</div>';
}
開發者ID:uglmee,項目名稱:kikiku.com,代碼行數:15,代碼來源:testimonial-option.php

示例5: add_price_table_option_element

function add_price_table_option_element()
{
    global $post, $price_table_meta_boxes;
    echo '<div id="gdl-overlay-wrapper">';
    ?>
 <div class="testimonial-option-meta" id="testimonial-option-meta"> <?php 
    set_nonce();
    foreach ($price_table_meta_boxes as $meta_box) {
        $meta_box['value'] = get_post_meta($post->ID, $meta_box['name'], true);
        print_meta($meta_box);
        if (empty($meta_box['hr'])) {
            echo '<hr class="separator mt20" />';
        }
    }
    ?>
 </div> <?php 
    echo '</div>';
}
開發者ID:hongviet119,項目名稱:dlvv,代碼行數:18,代碼來源:price-table-option.php

示例6: print_header

function print_header($no_body = 0)
{
    global $doc_name;
    global $css_file;
    print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\n";
    print " \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n";
    print "<html>\n";
    print "<head>\n";
    print "<title>{$doc_name}</title>\n";
    print_meta();
    if ($css_file) {
        print "<link rel=stylesheet type=\"text/css\" href=\"{$css_file}\">";
    } else {
        $style_body = "marginwidth=\"0px\" marginheight=\"0px\" leftmargin=\"0px\" topmargin=\"0px\" " . style_body();
    }
    print "</head>\n";
    if ($no_body == 0) {
        print "<body {$style_body}>\n";
    }
}
開發者ID:BackupTheBerlios,項目名稱:eyedoc,代碼行數:20,代碼來源:layout.inc.php

示例7: add_package_option_element

function add_package_option_element()
{
    global $post, $package_meta_boxes;
    // init array
    $package_meta_boxes['Choose Left Sidebar']['options'] = get_sidebar_name();
    $package_meta_boxes['Choose Right Sidebar']['options'] = $package_meta_boxes['Choose Left Sidebar']['options'];
    echo '<div id="gdl-overlay-wrapper">';
    ?>
 <div class="testimonial-option-meta" id="testimonial-option-meta"> <?php 
    set_nonce();
    foreach ($package_meta_boxes as $meta_box) {
        $meta_box['value'] = get_post_meta($post->ID, $meta_box['name'], true);
        print_meta($meta_box);
        if (empty($meta_box['hr'])) {
            echo '<hr class="separator mt20" />';
        }
    }
    ?>
 </div> <?php 
    echo '</div>';
}
開發者ID:shimion,項目名稱:preview1,代碼行數:21,代碼來源:package-option.php

示例8: print_page_elements

function print_page_elements($args, $xml_val, $item_type)
{
    extract($args);
    $head_type = $item_type;
    if (empty($xml_val)) {
        $head_size = '';
        $head_name = array('item' => $item, 'size' => $size, 'itemname' => '', 'sizename' => '');
    } else {
        $head_size = find_xml_value($xml_val, 'size');
        $head_name = array('item' => $item, 'size' => $size, 'itemname' => $item . '[]', 'sizename' => $size . '[]');
    }
    print_page_item_identical($head_name, $head_size, $head_type);
    ?>
			
			<div class="page-element-edit-box" id="page-element-edit-box">
			
			<?php 
    foreach ($name[$item_type] as $input_key => $input_value) {
        if ($input_key == 'slider-item') {
            $slider_value = find_xml_node($xml_val, 'slider-item');
            print_image_picker(array('name' => $input_value, 'value' => $slider_value));
        } else {
            if ($input_key == 'tab-item') {
                print_box_tab($input_value, find_xml_node($xml_val, 'tab-item'));
            } else {
                $input_value['value'] = find_xml_value($xml_val, $input_key);
                $input_value['name'] = $input_value['name'] . '[]';
                print_meta($input_value);
            }
        }
        if ($input_key != 'open' && $input_key != 'close') {
            echo empty($input_value['hr']) ? '<hr class="separator mt20">' : '';
        }
    }
    ?>
			
			</div>
		</div>
		
		<?php 
}
開發者ID:uglmee,項目名稱:kikiku.com,代碼行數:41,代碼來源:page-option.php

示例9: add_portfolio_option_element

function add_portfolio_option_element()
{
    global $post, $portfolio_meta_boxes;
    // init array
    $portfolio_meta_boxes['Choose Left Sidebar']['options'] = get_sidebar_name();
    $portfolio_meta_boxes['Choose Right Sidebar']['options'] = $portfolio_meta_boxes['Choose Left Sidebar']['options'];
    if (get_option(THEME_SHORT_NAME . '_use_portfolio_as') == 'portfolio style') {
        unset($portfolio_meta_boxes['Author Infomation']);
        unset($portfolio_meta_boxes['Portfolio Header']);
        unset($portfolio_meta_boxes['Social Sharing']);
    } else {
        unset($portfolio_meta_boxes['Clients Name']);
        unset($portfolio_meta_boxes['Skill Value']);
        unset($portfolio_meta_boxes['Website Url']);
    }
    echo '<div id="gdl-overlay-wrapper">';
    ?>
 <div class="post-option-meta" id="post-option-meta"> <?php 
    set_nonce();
    foreach ($portfolio_meta_boxes as $meta_box) {
        if ($meta_box['type'] == 'imagepicker') {
            $xml_string = get_post_meta($post->ID, $meta_box['xml'], true);
            if (!empty($xml_string)) {
                $xml_val = new DOMDocument();
                $xml_val->loadXML($xml_string);
                $meta_box['value'] = $xml_val->documentElement;
            }
        } else {
            if ($meta_box['type'] == 'open' || $meta_box['type'] == 'close') {
            } else {
                $meta_box['value'] = get_post_meta($post->ID, $meta_box['name'], true);
            }
        }
        print_meta($meta_box);
        if ($meta_box['type'] != 'open' && $meta_box['type'] != 'close') {
            echo "<div class='clear'></div>";
            echo empty($meta_box['hr']) ? '<hr class="separator mt20">' : '';
        }
    }
    ?>
 </div> <?php 
    echo '</div>';
}
開發者ID:VipinMundayad,項目名稱:ChinUpd8,代碼行數:43,代碼來源:portfolio-option.php


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