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


PHP wxr_term_name函数代码示例

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


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

示例1: wxr_nav_menu_terms

/**
 * Ouput all navigation menu terms
 *
 * @since 3.1.0
 */
function wxr_nav_menu_terms()
{
    $nav_menus = wp_get_nav_menus();
    if (empty($nav_menus) || !is_array($nav_menus)) {
        return;
    }
    foreach ($nav_menus as $menu) {
        echo "\t<wp:term><wp:term_id>{$menu->term_id}</wp:term_id><wp:term_taxonomy>nav_menu</wp:term_taxonomy><wp:term_slug>{$menu->slug}</wp:term_slug>";
        wxr_term_name($menu);
        echo "</wp:term>\n";
    }
}
开发者ID:enlacee,项目名称:anb.platicom.com.pe,代码行数:17,代码来源:lpr-export-functions.php

示例2: export_wp


//.........这里部分代码省略.........
</wp:category>
<?php 
            }
            foreach ($tags as $t) {
                ?>
	<wp:tag><wp:term_id><?php 
                echo $t->term_id;
                ?>
</wp:term_id><wp:tag_slug><?php 
                echo $t->slug;
                ?>
</wp:tag_slug><?php 
                wxr_tag_name($t);
                wxr_tag_description($t);
                ?>
</wp:tag>
<?php 
            }
            foreach ($terms as $t) {
                ?>
	<wp:term><wp:term_id><?php 
                echo $t->term_id;
                ?>
</wp:term_id><wp:term_taxonomy><?php 
                echo $t->taxonomy;
                ?>
</wp:term_taxonomy><wp:term_slug><?php 
                echo $t->slug;
                ?>
</wp:term_slug><wp:term_parent><?php 
                echo $t->parent ? $terms[$t->parent]->slug : '';
                ?>
</wp:term_parent><?php 
                wxr_term_name($t);
                wxr_term_description($t);
                ?>
</wp:term>
<?php 
            }
            if ('all' == $args['post_type']) {
                wxr_nav_menu_terms();
            }
            ?>

	<?php 
            do_action('rss2_head');
            ?>
	<?php 
            $this->flush_export($full_path, false);
            ?>

<?php 
            if ($post_ids) {
                global $wp_query, $post;
                $wp_query->in_the_loop = true;
                // Fake being in the loop.
                // fetch 20 posts at a time rather than loading the entire table into memory
                while ($next_posts = array_splice($post_ids, 0, 20)) {
                    $where = 'WHERE ID IN (' . join(',', $next_posts) . ')';
                    $posts = $wpdb->get_results("SELECT * FROM {$wpdb->posts} {$where}");
                    // Begin Loop
                    foreach ($posts as $post) {
                        $progress->tick();
                        setup_postdata($post);
                        $is_sticky = is_sticky($post->ID) ? 1 : 0;
                        ?>
开发者ID:rmccue,项目名称:wp-cli,代码行数:67,代码来源:export.php

示例3: wxr_nav_menu_terms

 /**
  * Ouput all navigation menu terms
  *
  * @since 3.1.0
  */
 function wxr_nav_menu_terms()
 {
     $nav_menus = wp_get_nav_menus();
     if (empty($nav_menus) || !is_array($nav_menus)) {
         return;
     }
     foreach ($nav_menus as $menu) {
         echo "\t<wp:term>";
         echo '<wp:term_id>' . intval($menu->term_id) . '</wp:term_id>';
         echo '<wp:term_taxonomy>nav_menu</wp:term_taxonomy>';
         echo '<wp:term_slug>' . wxr_cdata($menu->slug) . '</wp:term_slug>';
         wxr_term_name($menu);
         echo "</wp:term>\n";
     }
 }
开发者ID:AndyMarkle,项目名称:rocket,代码行数:20,代码来源:export.php

示例4: export_wp


//.........这里部分代码省略.........
     *
     * @since unknown
     *
     * @param object $t Tag Object
     */
    function wxr_tag_name($t)
    {
        if (empty($t->name)) {
            return;
        }
        echo '<wp:tag_name>' . wxr_cdata($t->name) . '</wp:tag_name>';
    }
    /**
     * {@internal Missing Short Description}}
     *
     * @since unknown
     *
     * @param object $t Tag Object
     */
    function wxr_tag_description($t)
    {
        if (empty($t->description)) {
            return;
        }
        echo '<wp:tag_description>' . wxr_cdata($t->description) . '</wp:tag_description>';
    }
    /**
     * {@internal Missing Short Description}}
     *
     * @since unknown
     *
     * @param object $t Term Object
     */
    function wxr_term_name($t)
    {
        if (empty($t->name)) {
            return;
        }
        echo '<wp:term_name>' . wxr_cdata($t->name) . '</wp:term_name>';
    }
    /**
     * {@internal Missing Short Description}}
     *
     * @since unknown
     *
     * @param object $t Term Object
     */
    function wxr_term_description($t)
    {
        if (empty($t->description)) {
            return;
        }
        echo '<wp:term_description>' . wxr_cdata($t->description) . '</wp:term_description>';
    }
    /**
     * {@internal Missing Short Description}}
     *
     * @since unknown
     */
    function wxr_post_taxonomy()
    {
        $categories = get_the_category();
        $tags = get_the_tags();
        $the_list = '';
        $filter = 'rss';
        if (!empty($categories)) {
开发者ID:gigikiri,项目名称:bcnAutoWallpaperSite,代码行数:67,代码来源:export.php

示例5: export_wp


//.........这里部分代码省略.........
     *
     * @since unknown
     *
     * @param object $t Tag Object
     */
    function wxr_tag_name($t)
    {
        if (empty($t->name)) {
            return;
        }
        echo '<wp:tag_name>' . wxr_cdata($t->name) . '</wp:tag_name>';
    }
    /**
     * {@internal Missing Short Description}}
     *
     * @since unknown
     *
     * @param object $t Tag Object
     */
    function wxr_tag_description($t)
    {
        if (empty($t->description)) {
            return;
        }
        echo '<wp:tag_description>' . wxr_cdata($t->description) . '</wp:tag_description>';
    }
    /**
     * {@internal Missing Short Description}}
     *
     * @since unknown
     *
     * @param object $t Term Object
     */
    function wxr_term_name($t)
    {
        if (empty($t->name)) {
            return;
        }
        echo '<wp:term_name>' . wxr_cdata($t->name) . '</wp:term_name>';
    }
    /**
     * {@internal Missing Short Description}}
     *
     * @since unknown
     *
     * @param object $t Term Object
     */
    function wxr_term_description($t)
    {
        if (empty($t->description)) {
            return;
        }
        echo '<wp:term_description>' . wxr_cdata($t->description) . '</wp:term_description>';
    }
    /**
     * {@internal Missing Short Description}}
     *
     * @since unknown
     */
    function wxr_post_taxonomy()
    {
        $categories = get_the_category();
        $tags = get_the_tags();
        $the_list = '';
        $filter = 'rss';
        if (!empty($categories)) {
开发者ID:nagyist,项目名称:laura-wordpress,代码行数:67,代码来源:export.php

示例6: me_wxr_nav_menu_item_terms_and_posts

 function me_wxr_nav_menu_item_terms_and_posts(&$post_ids)
 {
     $posts_to_add = array();
     foreach ($post_ids as $post_id) {
         if (($type = get_post_meta($post_id, '_menu_item_type', true)) == 'taxonomy') {
             $term = get_term(get_post_meta($post_id, '_menu_item_object_id', true), $tax = get_post_meta($post_id, '_menu_item_object', true));
             echo "\t<wp:term><wp:term_id>{$term->term_id}</wp:term_id><wp:term_taxonomy>{$tax}</wp:term_taxonomy><wp:term_slug>{$term->slug}</wp:term_slug>";
             wxr_term_name($term);
             echo "</wp:term>\n";
         } elseif ($type == 'post_type' && in_array(get_post_meta($post_id, '_menu_item_object', true), array('post', 'page'))) {
             $posts_to_add[] = get_post_meta($post_id, '_menu_item_object_id', true);
         }
     }
     $post_ids = array_merge($posts_to_add, $post_ids);
 }
开发者ID:lenguyenitc,项目名称:donations,代码行数:15,代码来源:menu-exporter.php


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