• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_list_bookmarks函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: widget

 /**
  * Outputs the content for the current Links widget instance.
  *
  * @since 2.8.0
  * @access public
  *
  * @param array $args     Display arguments including 'before_title', 'after_title',
  *                        'before_widget', and 'after_widget'.
  * @param array $instance Settings for the current Links widget instance.
  */
 public function widget($args, $instance)
 {
     $show_description = isset($instance['description']) ? $instance['description'] : false;
     $show_name = isset($instance['name']) ? $instance['name'] : false;
     $show_rating = isset($instance['rating']) ? $instance['rating'] : false;
     $show_images = isset($instance['images']) ? $instance['images'] : true;
     $category = isset($instance['category']) ? $instance['category'] : false;
     $orderby = isset($instance['orderby']) ? $instance['orderby'] : 'name';
     $order = $orderby == 'rating' ? 'DESC' : 'ASC';
     $limit = isset($instance['limit']) ? $instance['limit'] : -1;
     $before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $args['before_widget']);
     $widget_links_args = array('title_before' => $args['before_title'], 'title_after' => $args['after_title'], 'category_before' => $before_widget, 'category_after' => $args['after_widget'], 'show_images' => $show_images, 'show_description' => $show_description, 'show_name' => $show_name, 'show_rating' => $show_rating, 'category' => $category, 'class' => 'linkcat widget', 'orderby' => $orderby, 'order' => $order, 'limit' => $limit);
     /**
      * Filters the arguments for the Links widget.
      *
      * @since 2.6.0
      * @since 4.4.0 The `$instance` parameter was added.
      *
      * @see wp_list_bookmarks()
      *
      * @param array $widget_links_args An array of arguments to retrieve the links list.
      * @param array $instance          The settings for the particular instance of the widget.
      */
     wp_list_bookmarks(apply_filters('widget_links_args', $widget_links_args, $instance));
 }
开发者ID:Garth619,项目名称:Femi9,代码行数:35,代码来源:class-wp-widget-links.php


示例2: master_array

 /**
  *
  * @TODO document
  *
  */
 function master_array()
 {
     $left = sprintf('<div class="widget"><div class="widget-pad"><h3 class="widget-title">%s</h3><p>%s</p>%s<br class="clear"/><p>%s</p></div></div>', __('Looking for something?', 'pagelines'), __('Use the form below to search the site:', 'pagelines'), pagelines_search_form(false), __("Still not finding what you're looking for? Drop us a note so we can take care of it!", 'pagelines'));
     $middle = sprintf('<div class="widget"><div class="widget-pad"><h3 class="widget-title">%s</h3><p>%s</p><ul>%s</ul></div></div>', __('Visit our friends!', 'pagelines'), __('A few highly recommended friends...', 'pagelines'), wp_list_bookmarks('title_li=&categorize=0&echo=0'));
     $right = sprintf('<div class="widget"><div class="widget-pad"><h3 class="widget-title">%s</h3><p>%s</p><ul>%s</ul></div></div>', __('Archives', 'pagelines'), __('All entries, chronologically...', 'pagelines'), wp_get_archives('type=monthly&limit=12&echo=0'));
     $this->master = array('left' => array('name' => 'MoreFoot Left', 'description' => __('Left sidebar in morefoot section.', 'pagelines'), 'default' => $left), 'middle' => array('name' => 'MoreFoot Middle', 'description' => __('Middle sidebar in morefoot section.', 'pagelines'), 'default' => $middle), 'right' => array('name' => 'MoreFoot Right', 'description' => __('Right sidebar in morefoot section.', 'pagelines'), 'default' => $right));
 }
开发者ID:climo,项目名称:PageLines-Framework,代码行数:12,代码来源:section.php


示例3: render

 function render($args, $instance)
 {
     global $gantry, $post;
     ob_start();
     $show_description = $instance['description'];
     $show_name = $instance['name'];
     $show_rating = $instance['rating'];
     $show_images = $instance['images'];
     $catid = get_term_by('slug', $instance['category'], 'link_category');
     $menu_class = $instance['menu_class'];
     if ($menu_class != '') {
         $menu_class = $menu_class . ' ';
     } else {
         $menu_class = '';
     }
     $links = array();
     $links = wp_list_bookmarks(apply_filters('widget_links_args', array('title_before' => $args['before_title'], 'title_after' => $args['after_title'], 'category_before' => '<div class="' . $instance['category_class'] . '">', 'category_after' => '</div>', 'show_images' => $show_images, 'show_description' => $show_description, 'show_name' => $show_name, 'show_rating' => $show_rating, 'category' => $catid->term_id, 'class' => 'linkcat widget', 'category_orderby' => $instance['category_orderby'], 'orderby' => $instance['links_orderby'], 'categorize' => $instance['categorize'], 'title_li' => '', 'limit' => $instance['limit'], 'link_before' => '<span>', 'link_after' => '</span>')));
     $links = ob_get_clean();
     $lines = explode("\n", $links);
     $out = '';
     foreach ($lines as $line) {
         $line = trim($line);
         if (substr($line, 0, 11) == "<ul class='") {
             $line = str_replace("<ul class='", "<ul class='" . $menu_class, $line);
         }
         $out .= $line . "\n";
     }
     if (!$instance['categorize']) {
         echo '<ul class="' . trim($menu_class) . '">';
     }
     echo $out;
     if (!$instance['categorize']) {
         echo '</ul>';
     }
 }
开发者ID:rotoballer,项目名称:emily,代码行数:35,代码来源:links.php


示例4: widget

 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $instance = wp_parse_args((array) $instance, $this->defaults);
     if (Footer_Putter_Utils::hide_widget($instance['visibility'])) {
         return;
     }
     //check visibility requirements
     $title = apply_filters('widget_title', $instance['title']);
     $category = isset($instance['category']) ? $instance['category'] : false;
     $orderby = isset($instance['orderby']) ? $instance['orderby'] : 'name';
     $order = $orderby == 'rating' ? 'DESC' : 'ASC';
     $limit = isset($instance['limit']) && $instance['limit'] ? $instance['limit'] : -1;
     $nofollow = isset($instance['nofollow']) && $instance['nofollow'];
     $links = wp_list_bookmarks(apply_filters('widget_links_args', array('echo' => 0, 'title_before' => $before_title, 'title_after' => $after_title, 'title_li' => '', 'categorize' => false, 'before' => '', 'after' => '', 'category_before' => '', 'category_after' => '', 'show_images' => true, 'show_description' => false, 'show_name' => false, 'show_rating' => false, 'category' => $category, 'class' => 'trademark widget', 'orderby' => $orderby, 'order' => $order, 'limit' => $limit)));
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     if ($nofollow) {
         echo $this->nofollow_links($links);
     } else {
         echo $links;
     }
     echo $after_widget;
 }
开发者ID:umesh-timalsina,项目名称:Ketaketi-Paathshaala,代码行数:26,代码来源:class-trademarks-widgets.php


示例5: get_friend_links

function get_friend_links($args)
{
    extract($args, EXTR_SKIP);
    $themePath = get_bloginfo('template_url');
    $imageLink = '<h2>Links<span style="display:none">';
    $before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $before_widget);
    wp_list_bookmarks(apply_filters('widget_links_args', array('title_before' => $imageLink, 'title_after' => '</span></h2>', 'category_before' => $before_widget, 'category_after' => $after_widget, 'show_images' => true, 'class' => 'linkcat widget')));
}
开发者ID:boltogriz,项目名称:blog-cook,代码行数:8,代码来源:functions.php


示例6: widget_wkc_advanced_blogroll

 function widget_wkc_advanced_blogroll($args)
 {
     extract($args);
     $options = get_option('widget_wkc_advanced_blogroll');
     if (function_exists('wp_list_bookmarks')) {
         $param = array('title_before' => $before_title, 'title_after' => $after_title, 'category_before' => $before_widget, 'category_after' => $after_widget, 'orderby' => $options['orderby'], 'category' => $options['category'], 'limit' => $options['limit'], 'show_images' => true, 'class' => 'linkcat widget', 'echo' => 0);
         echo wp_list_bookmarks($param);
     }
 }
开发者ID:liangwei1988,项目名称:wordpress,代码行数:9,代码来源:widget-advanced-blogroll.php


示例7: avia_dummy_widget

function avia_dummy_widget($number)
{
    switch ($number) {
        case 1:
            $title = apply_filters('widget_title', __('Interesting links', 'avia_framework'));
            ?>
				<section class='widget'>
				<h3 class='widgettitle'><?php 
            echo $title;
            ?>
</h3>
				<span class='minitext'><?php 
            _e('Here are some interesting links for you! Enjoy your stay :)', 'avia_framework');
            ?>
</span>
				</section>
			<?php 
            break;
        case 4:
            $title = apply_filters('widget_title', __('Archive', 'avia_framework'));
            echo "<section class='widget widget_archive'>";
            echo "<h3 class='widgettitle'>" . $title . "</h3>";
            echo "<ul>";
            wp_get_archives('type=monthly');
            echo "</ul>";
            echo "<span class='seperator extralight-border'></span></section>";
            break;
        case 3:
            $title = apply_filters('widget_title', __('Categories', 'avia_framework'));
            echo "<section class='widget widget_categories'>";
            echo "<h3 class='widgettitle'>" . $title . "</h3>";
            echo "<ul>";
            wp_list_categories('sort_column=name&optioncount=0&hierarchical=0&title_li=');
            echo "</ul>";
            echo "<span class='seperator extralight-border'></span></section>";
            break;
        case 2:
            $title = apply_filters('widget_title', __('Pages', 'avia_framework'));
            echo "<section class='widget widget_pages'>";
            echo "<h3 class='widgettitle'>" . $title . "</h3>";
            echo "<ul>";
            wp_list_pages('title_li=&depth=-1');
            echo "</ul>";
            echo "<span class='seperator extralight-border'></span></section>";
            break;
        case 5:
            $title = apply_filters('widget_title', __('Bookmarks', 'avia_framework'));
            echo "<section class='widget widget_archive'>";
            echo "<h3 class='widgettitle'>" . $title . "</h3>";
            echo "<ul>";
            wp_list_bookmarks('title_li=&categorize=0');
            echo "</ul>";
            echo "<span class='seperator extralight-border'></span></section>";
            break;
    }
}
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:56,代码来源:register-widget-area.php


示例8: links_sidebar_module

function links_sidebar_module($args)
{
    extract($args);
    echo $before_module . $before_title . $title . $after_title;
    ?>
	<ul>
		<?php 
    wp_list_bookmarks('title_before=<h4>&title_after=</h4>');
    ?>
	</ul>
	<?php 
    echo $after_module;
}
开发者ID:64kbytes,项目名称:stayinba,代码行数:13,代码来源:links.php


示例9: heidelicious_links

function heidelicious_links($atts)
{
    $out = '<div class="bookmarks">';
    extract(shortcode_atts(array('limit' => '-1', 'category' => '', 'show_description' => true, 'orderby' => 'name'), $atts));
    if ($limit != '-1') {
        $orderby = 'rand';
    }
    $cat = explode(",", $category);
    foreach ($cat as $id => $category) {
        $out .= wp_list_bookmarks(array('limit' => $limit, 'show_images' => false, 'show_description' => $show_description, 'show_name' => true, 'category_name' => $category, 'orderby' => $orderby, 'order' => 'ASC', 'title_li' => 'Related Links', 'echo' => false));
    }
    $out .= '</div>';
    return $out;
}
开发者ID:salzheld,项目名称:heidelicious,代码行数:14,代码来源:functions.php


示例10: widget

 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $show_description = isset($instance['description']) ? $instance['description'] : false;
     $show_name = isset($instance['name']) ? $instance['name'] : false;
     $show_rating = isset($instance['rating']) ? $instance['rating'] : false;
     $show_images = isset($instance['images']) ? $instance['images'] : true;
     $category = isset($instance['category']) ? $instance['category'] : false;
     $orderby = isset($instance['orderby']) ? $instance['orderby'] : 'name';
     $order = $orderby == 'rating' ? 'DESC' : 'ASC';
     $limit = isset($instance['limit']) ? $instance['limit'] : -1;
     $before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $before_widget);
     wp_list_bookmarks(apply_filters('widget_links_args', array('title_before' => $before_title, 'title_after' => $after_title, 'category_before' => $before_widget, 'category_after' => $after_widget, 'show_images' => $show_images, 'show_description' => $show_description, 'show_name' => $show_name, 'show_rating' => $show_rating, 'category' => $category, 'class' => 'linkcat widget', 'orderby' => $orderby, 'order' => $order, 'limit' => $limit)));
 }
开发者ID:MenZil-Team,项目名称:gulzar,代码行数:14,代码来源:links.php


示例11: widget

 /**
  * Outputs the widget based on the arguments input through the widget controls.
  * @since 0.6.0
  */
 function widget($args, $instance)
 {
     extract($args);
     /* Set up the $before_widget ID for multiple widgets created by the bookmarks widget. */
     if ($instance['categorize']) {
         $before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $before_widget);
     }
     /* Add a class to $before_widget if one is set. */
     if ($instance['class']) {
         $before_widget = str_replace('class="', 'class="' . esc_attr($instance['class']) . ' ', $before_widget);
     }
     /* Set up the arguments for wp_list_bookmarks(). */
     $args = array('title_li' => apply_filters('widget_title', $instance['title_li'], $instance, $this->id_base), 'category' => !empty($instance['category']) ? join(', ', $instance['category']) : '', 'exclude_category' => !empty($instance['exclude_category']) ? join(', ', $instance['exclude_category']) : '', 'category_order' => $instance['category_order'], 'category_orderby' => $instance['category_orderby'], 'include' => !empty($instance['include']) ? join(', ', $instance['include']) : '', 'exclude' => !empty($instance['exclude']) ? join(', ', $instance['exclude']) : '', 'order' => $instance['order'], 'orderby' => $instance['orderby'], 'limit' => $instance['limit'] ? intval($instance['limit']) : -1, 'between' => $instance['between'], 'link_before' => $instance['link_before'], 'link_after' => $instance['link_after'], 'search' => $instance['search'], 'categorize' => !empty($instance['categorize']) ? true : false, 'show_description' => !empty($instance['show_description']) ? true : false, 'hide_invisible' => !empty($instance['hide_invisible']) ? true : false, 'show_rating' => !empty($instance['show_rating']) ? true : false, 'show_updated' => !empty($instance['show_updated']) ? true : false, 'show_images' => !empty($instance['show_images']) ? true : false, 'show_name' => !empty($instance['show_name']) ? true : false, 'show_private' => !empty($instance['show_private']) ? true : false, 'title_before' => $before_title, 'title_after' => $after_title, 'category_before' => $before_widget, 'category_after' => $after_widget, 'category_name' => false, 'echo' => false);
     /* Output the bookmarks widget. */
     echo str_replace(array("\r", "\n", "\t"), '', wp_list_bookmarks($args));
 }
开发者ID:rdbartlett,项目名称:kellyspencer.co.nz,代码行数:20,代码来源:widget-bookmarks.php


示例12: widget_rounded_links

function widget_rounded_links()
{
    $a = get_bloginfo('template_directory');
    ?>
	<!-- //start sideitem //--><br /><div class="sideitem"><div class="sideitemtop"><img src="<?php 
    echo $a;
    ?>
/img/stl.gif" alt="" width="15" height="15" class="corner" style="display: none" /></div>
    	<?php 
    wp_list_bookmarks(array('title_before' => '<h2>', 'title_after' => '</h2>'));
    ?>
	<div class="sideitembottom"><img src="<?php 
    echo $a;
    ?>
/img/sbl.gif" alt="" width="15" height="15" class="corner" style="display: none" /></div></div><!-- //end sideitem //-->
<?php 
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:17,代码来源:functions.php


示例13: widget

 /**
  * Outputs the widget based on the arguments input through the widget controls.
  *
  * @since 0.6.0
  */
 function widget($sidebar, $instance)
 {
     extract($sidebar);
     /* Set up the $before_widget ID for multiple widgets created by the bookmarks widget. */
     if (!empty($instance['categorize'])) {
         $before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $before_widget);
     }
     /* Add a class to $before_widget if one is set. */
     if (!empty($instance['class'])) {
         $before_widget = str_replace('class="', 'class="' . esc_attr($instance['class']) . ' ', $before_widget);
     }
     /* Set the $args for wp_list_bookmarks() to the $instance array. */
     $args = $instance;
     /* wp_list_bookmarks() hasn't been updated in WP to use wp_parse_id_list(), so we have to pass strings for includes/excludes. */
     if (!empty($args['category']) && is_array($args['category'])) {
         $args['category'] = join(', ', $args['category']);
     }
     if (!empty($args['exclude_category']) && is_array($args['exclude_category'])) {
         $args['exclude_category'] = join(', ', $args['exclude_category']);
     }
     if (!empty($args['include']) && is_array($args['include'])) {
         $args['include'] = join(',', $args['include']);
     }
     if (!empty($args['exclude']) && is_array($args['exclude'])) {
         $args['exclude'] = join(',', $args['exclude']);
     }
     /* If no limit is given, set it to -1. */
     $args['limit'] = empty($args['limit']) ? -1 : $args['limit'];
     /* Some arguments must be set to the sidebar arguments to be output correctly. */
     $args['title_li'] = apply_filters('widget_title', empty($args['title_li']) ? __('Bookmarks', 'hybrid-core') : $args['title_li'], $instance, $this->id_base);
     $args['title_before'] = $before_title;
     $args['title_after'] = $after_title;
     $args['category_before'] = $before_widget;
     $args['category_after'] = $after_widget;
     $args['category_name'] = '';
     $args['echo'] = false;
     /* Output the bookmarks widget. */
     $bookmarks = str_replace(array("\r", "\n", "\t"), '', wp_list_bookmarks($args));
     /* If no title is given and the bookmarks aren't categorized, add a wrapper <ul>. */
     if (empty($args['title_li']) && false === $args['categorize']) {
         $bookmarks = '<ul class="xoxo bookmarks">' . $bookmarks . '</ul>';
     }
     /* Output the bookmarks. */
     echo $bookmarks;
 }
开发者ID:RA2WP,项目名称:RA2WP,代码行数:50,代码来源:widget-bookmarks.php


示例14: bf_nav

/**
 * bf_nav() - Buffet Framework filter function
 * 
 * Displays the main navigation on the theme, after the header.
 * You can override the default navigation using the <b>bf_nav</b> filter.
 * 
 * 
 * @since	0.5.2
 * @hook	filter	bf_nav
 * @return	string	HTML code
 */
function bf_nav()
{
    $output = '<div class="menu clearfix"><ul id="nav" class="nav clearfix">';
    $output .= '<li><a href="' . get_bloginfo('url') . '" title="' . get_bloginfo('name') . '">' . bf_get_option('home_link') . '</a></li>';
    if (!bf_get_option('topnav_linkcat')) {
        $output .= wp_list_categories('hierarchical=false&orderby=id&hide_empty=1&title_li=&exclude=1&echo=');
    } else {
        $output .= wp_list_bookmarks('category=' . bf_get_option('topnav_linkcat') . '&show_private=1&hide_invisible=0&title_li=&categorize=0&orderby=id&echo=');
    }
    $output .= '</ul><!-- .nav -->';
    $output .= '<ul class="rss-links clearfix">';
    $output .= '<li><a href="' . get_bloginfo('rss2_url') . '" rel="alternate" type="application/rss+xml" title="' . sprintf(__('%s Posts RSS Feed', 'arras'), wp_specialchars(get_bloginfo('name'), 1)) . '">';
    $output .= __('Posts', 'buffet') . '</a></li>';
    $output .= '<li><a href="' . get_bloginfo('comments_rss2_url') . '" rel="alternate" type="application/rss+xml" title="' . sprintf(__('%s Comments RSS Feed', 'arras'), wp_specialchars(get_bloginfo('name'), 1)) . '">';
    $output .= __('Comments', 'buffet') . '</a></li>';
    $output .= '</ul><!-- .rss-links --></div><!-- .menu -->';
    echo apply_filters('bf_nav', $output);
}
开发者ID:jagtesh,项目名称:op_theme,代码行数:29,代码来源:filters.php


示例15: widget

 function widget($args, $instance)
 {
     extract($args);
     $category = $instance['category'];
     $category_name = $instance['category_name'];
     $category_order = $instance['category_order'];
     $category_orderby = $instance['category_orderby'];
     $exclude_category = $instance['exclude_category'];
     $limit = (int) $instance['limit'];
     $include = $instance['include'];
     $exclude = $instance['exclude'];
     $orderby = $instance['orderby'];
     $order = $instance['order'];
     $between = $instance['between'];
     $class = $instance['class'];
     $link_before = $instance['link_before'];
     $link_after = $instance['link_after'];
     $categorize = isset($instance['categorize']) ? $instance['categorize'] : false;
     $show_description = isset($instance['show_description']) ? $instance['show_description'] : false;
     $hide_invisible = isset($instance['hide_invisible']) ? $instance['hide_invisible'] : false;
     $show_rating = isset($instance['show_rating']) ? $instance['show_rating'] : false;
     $show_updated = isset($instance['show_updated']) ? $instance['show_updated'] : false;
     $show_images = isset($instance['show_images']) ? $instance['show_images'] : false;
     $show_name = isset($instance['show_name']) ? $instance['show_name'] : false;
     $show_private = isset($instance['show_private']) ? $instance['show_private'] : false;
     if ($categorize) {
         $before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $before_widget);
     }
     if (!$limit) {
         $limit = -1;
     }
     if ($category_name) {
         $category = intval($category_name);
     }
     $bookmarks = array('orderby' => $orderby, 'order' => $order, 'limit' => $limit, 'include' => $include, 'exclude' => $exclude, 'hide_invisible' => $hide_invisible, 'show_rating' => $show_rating, 'show_updated' => $show_updated, 'show_description' => $show_description, 'show_images' => $show_images, 'show_name' => $show_name, 'between' => ' ' . $between, 'categorize' => $categorize, 'category' => $category, 'exclude_category' => $exclude_category, 'show_private' => $show_private, 'category_orderby' => $category_orderby, 'category_order' => $category_order, 'title_li' => $title, 'title_before' => $before_title, 'title_after' => $after_title, 'category_before' => $before_widget, 'category_after' => $after_widget, 'link_before' => $link_before, 'link_after' => $link_after, 'class' => $class, 'category_name' => false, 'echo' => 0);
     if (!$categorize) {
         echo $before_widget . $before_title . __('Bookmarks', 'rolopress') . $after_title . "\n\t\t\t" . '<ul class="xoxo bookmarks">';
     }
     echo "\n\t\t" . str_replace(array("\r", "\n", "\t"), '', wp_list_bookmarks($bookmarks));
     if (!$categorize) {
         echo "\n\t\t\t" . '</ul><!-- .xoxo .bookmarks -->' . $after_widget;
     }
 }
开发者ID:sudar,项目名称:rolopress-core,代码行数:43,代码来源:bookmarks.php


示例16: widget

	/**
	 * Outputs the widget based on the arguments input through the widget controls.
	 * @since 0.6
	 */
	function widget( $args, $instance ) {
		extract( $args );

		$args = array();

		$args['title_li'] = apply_filters( 'widget_title',  $instance['title_li'], $instance, $this->id_base );
		$args['category'] = ( is_array( $instance['category'] ) ? join( ', ', $instance['category'] ) : $instance['category'] );
		$args['exclude_category'] = ( is_array( $instance['exclude_category'] ) ? join( ', ', $instance['exclude_category'] ) : $instance['exclude_category'] );
		$args['category_order'] = $instance['category_order'];
		$args['category_orderby'] = $instance['category_orderby'];
		$args['include'] = ( is_array( $instance['include'] ) ? join( ', ', $instance['include'] ) : $instance['include'] );
		$args['exclude'] = ( is_array( $instance['exclude'] ) ? join( ', ', $instance['exclude'] ) : $instance['exclude'] );
		$args['order'] = $instance['order'];
		$args['orderby'] = $instance['orderby'];
		$args['limit'] = ( ( $instance['limit'] ) ? intval( $instance['limit'] ) : -1 );
		$args['between'] = $instance['between'];
		$args['link_before'] = $instance['link_before'];
		$args['link_after'] = $instance['link_after'];
		$args['search'] = $instance['search'];
		$args['categorize'] = isset( $instance['categorize'] ) ? $instance['categorize'] : false;
		$args['show_description'] = isset( $instance['show_description'] ) ? $instance['show_description'] : false;
		$args['hide_invisible'] = isset( $instance['hide_invisible'] ) ? $instance['hide_invisible'] : false;
		$args['show_rating'] = isset( $instance['show_rating'] ) ? $instance['show_rating'] : false;
		$args['show_updated'] = isset( $instance['show_updated'] ) ? $instance['show_updated'] : false;
		$args['show_images'] = isset( $instance['show_images'] ) ? $instance['show_images'] : false;
		$args['show_name'] = isset( $instance['show_name'] ) ? $instance['show_name'] : false;
		$args['show_private'] = isset( $instance['show_private'] ) ? $instance['show_private'] : false;

		if ( $args['categorize'] )
			$before_widget = preg_replace( '/id="[^"]*"/','id="%id"', $before_widget );
		if ( $instance['class'] )
			$before_widget = str_replace( 'class="', 'class="' . esc_attr( $instance['class'] ) . ' ', $before_widget );

		$args['title_before'] = $before_title;
		$args['title_after'] = $after_title;
		$args['category_before'] = $before_widget;
		$args['category_after'] = $after_widget;
		$args['category_name'] = false;
		$args['echo'] = false;

		echo str_replace( array( "\r", "\n", "\t" ), '', wp_list_bookmarks( $args ) );
	}
开发者ID:nerdfiles,项目名称:tbotw.org,代码行数:46,代码来源:widget-bookmarks.php


示例17: widget

 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $show_description = false;
     $show_name = isset($instance['name']) ? $instance['name'] : false;
     $show_rating = false;
     $show_images = false;
     $categorize = false;
     $term_id = term_exists('Rotary', 'link_category');
     $category = isset($term_id) ? $term_id : false;
     $orderby = isset($instance['orderby']) ? $instance['orderby'] : 'name';
     $order = $orderby == 'rating' ? 'DESC' : 'ASC';
     $limit = isset($instance['limit']) ? $instance['limit'] : -1;
     $before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $before_widget);
     if (wp_list_bookmarks()) {
         $bookmarks = wp_list_bookmarks(apply_filters('widget_links_args', array('title_before' => $before_title, 'title_after' => $after_title, 'category_before' => $before_widget, 'category_after' => $after_widget, 'show_images' => $show_images, 'show_description' => $show_description, 'show_name' => false, 'show_rating' => $show_rating, 'category' => $category, 'class' => 'linkcat widget', 'orderby' => $orderby, 'order' => $order, 'echo' => false, 'limit' => $limit)));
         $bookmarks = str_replace('Rotary', 'Links', $bookmarks);
         echo $bookmarks;
     }
 }
开发者ID:koolkatwebdesigns,项目名称:rotary,代码行数:20,代码来源:theme-widgets.php


示例18: widget

 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $show_description = isset($instance['description']) ? $instance['description'] : false;
     $show_name = isset($instance['name']) ? $instance['name'] : false;
     $show_rating = isset($instance['rating']) ? $instance['rating'] : false;
     $show_images = isset($instance['images']) ? $instance['images'] : true;
     $category = isset($instance['category']) ? $instance['category'] : false;
     $before_widget = '<div id="linkcat-' . $args['widget_id'] . '" class="widget-container widget_links">';
     $after_widget = '</div>';
     $before_title = '<h3>';
     $after_title = '</h3>';
     if (is_admin() && !$category) {
         // Display All Links widget as such in the widgets screen
         echo $before_title . __('All Links', 'tfuse') . $after_title . $after_widget;
         return;
     }
     $before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $before_widget);
     wp_list_bookmarks(apply_filters('widget_links_args', array('title_before' => $before_title, 'title_after' => $after_title, 'category_before' => $before_widget, 'category_after' => $after_widget, 'show_images' => $show_images, 'show_description' => $show_description, 'show_name' => $show_name, 'show_rating' => $show_rating, 'category' => $category, 'class' => 'linkcat widget')));
 }
开发者ID:shimion,项目名称:stlucks,代码行数:20,代码来源:TF_Widget_Links.php


示例19: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $category = $instance['category'];
        $order = $instance['order'];
        $show_number = $instance['show_number'];
        $show_desc = $instance['show_desc'] == "yes" ? true : false;
        ?>
				
		<div class="widget-grey-bg">
		
			<?php 
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
				
				<div class="pi-links-widget">
					<ul class="clearfix">
						
						<?php 
        wp_list_bookmarks(array('categorize' => false, 'title_li' => false, 'orderby' => $order, 'limit' => $show_number, 'category' => $category, 'show_description' => $show_desc, 'between' => '<br />', 'category_before' => '<li id=%id class=%class clearfix>'));
        ?>
						
					</ul>
				</div>
	
		<?php 
        echo $after_widget;
        ?>
			
		
		</div>	
		
	<?php 
    }
开发者ID:Hevix,项目名称:hevix,代码行数:38,代码来源:widget-links.php


示例20: wp_get_links

/**
 * Gets the links associated with category.
 *
 * @see get_links() for argument information that can be used in $args
 * @since 1.0.1
 * @deprecated 2.1
 * @deprecated Use wp_list_bookmarks()
 * @see wp_list_bookmarks()
 *
 * @param string $args a query string
 * @return null|string
 */
function wp_get_links($args = '')
{
    _deprecated_function(__FUNCTION__, '2.1', 'wp_list_bookmarks()');
    if (strpos($args, '=') === false) {
        $cat_id = $args;
        $args = add_query_arg('category', $cat_id, $args);
    }
    $defaults = array('after' => '<br />', 'before' => '', 'between' => ' ', 'categorize' => 0, 'category' => '', 'echo' => true, 'limit' => -1, 'orderby' => 'name', 'show_description' => true, 'show_images' => true, 'show_rating' => false, 'show_updated' => true, 'title_li' => '');
    $r = wp_parse_args($args, $defaults);
    return wp_list_bookmarks($r);
}
开发者ID:rkglug,项目名称:WordPress,代码行数:23,代码来源:deprecated.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_list_categories函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_list_authors函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap