ls
foreach ( (array) $term_items as $id => $items )
if ( isset($terms_by_id[$id]) )
$terms_by_id[$id]->count = count($items);
}
//
// Default callbacks
//
/**
* _update_post_term_count() - Will update term count based on posts
*
* Private function for the default callback for post_tag and category taxonomies.
*
* @package WordPress
* @subpackage Taxonomy
* @access private
* @since 2.3
* @uses $wpdb
*
* @param array $terms List of Term IDs
*/
function _update_post_term_count( $terms ) {
global $wpdb;
foreach ( $terms as $term ) {
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type = 'post' AND term_taxonomy_id = %d", $term ) );
$wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
}
}
/**
* get_term_link() - Generates a permalink for a taxonomy term archive
*
* @param object|int|string $term
* @param string $taxonomy
* @return string HTML link to taxonomy term archive
*/
function get_term_link( $term, $taxonomy ) {
global $wp_rewrite;
// use legacy functions for core taxonomies until they are fully plugged in
if ( $taxonomy == 'category' )
return get_category_link($term);
if ( $taxonomy == 'post_tag' )
return get_tag_link($term);
$termlink = $wp_rewrite->get_extra_permastruct($taxonomy);
if ( !is_object($term) ) {
if ( is_int($term) ) {
$term = &get_term($term, $taxonomy);
} else {
$term = &get_term_by('slug', $term, $taxonomy);
}
}
if ( is_wp_error( $term ) )
return $term;
$slug = $term->slug;
if ( empty($termlink) ) {
$file = get_option('home') . '/';
$t = get_taxonomy($taxonomy);
if ( $t->query_var )
$termlink = "$file?$t->query_var=$slug";
else
$termlink = "$file?taxonomy=$taxonomy&term=$slug";
} else {
$termlink = str_replace("%$taxonomy%", $slug, $termlink);
$termlink = get_option('home') . user_trailingslashit($termlink, 'category');
}
return apply_filters('term_link', $termlink, $term, $taxonomy);
}
function the_taxonomies($args = array()) {
$defaults = array(
'post' => 0,
'before' => '',
'sep' => ' ',
'after' => '',
);
$r = wp_parse_args( $args, $defaults );
extract( $r, EXTR_SKIP );
echo $before . join($sep, get_the_taxonomies($post)) . $after;
}
function get_the_taxonomies($post = 0) {
if ( is_int($post) )
$post =& get_post($post);
elseif ( !is_object($post) )
$post =& $GLOBALS['post'];
$taxonomies = array();
if ( !$post )
return $taxonomies;
$template = apply_filters('taxonomy_template', '%s: %l.');
foreach ( get_object_taxonomies($post) as $taxonomy ) {
$t = (array) get_taxonomy($taxonomy);
if ( empty($t['label']) )
$t['label'] = $taxonomy;
if ( empty($t['args']) )
$t['args'] = array();
if ( empty($t['template']) )
$t['template'] = $template;
$terms = get_object_term_cache($post->ID, $taxonomy);
if ( empty($terms) )
$terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
$links = array();
foreach ( $terms as $term )
$links[] = "$term->name";
if ( $links )
$taxonomies[$taxonomy] = wp_sprintf($t['template'], $t['label'], $links, $terms);
}
return $taxonomies;
}
function get_post_taxonomies($post = 0) {
$post =& get_post($post);
return get_object_taxonomies($post);
}
?>
found for %request_words%', 'All in One SEO Plugin 404 Title Format', 'yes');
add_option("aiosp_post_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes');
add_option("aiosp_page_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes');
add_option("aiosp_home_meta_tags", '', 'All in One SEO Plugin Additional Home Meta Tags', 'yes');
add_option("aiosp_do_log", null, 'All in One SEO Plugin write log file', 'yes');
$aiosp = new All_in_One_SEO_Pack();
add_action('wp_head', array($aiosp, 'wp_head'));
add_action('template_redirect', array($aiosp, 'template_redirect'));
add_action('init', array($aiosp, 'init'));
if (substr($aiosp->wp_version, 0, 3) == '2.5') {
add_action('edit_form_advanced', array($aiosp, 'add_meta_tags_textinput'));
add_action('edit_page_form', array($aiosp, 'add_meta_tags_textinput'));
} else {
add_action('dbx_post_advanced', array($aiosp, 'add_meta_tags_textinput'));
add_action('dbx_page_advanced', array($aiosp, 'add_meta_tags_textinput'));
}
add_action('edit_post', array($aiosp, 'post_meta_tags'));
add_action('publish_post', array($aiosp, 'post_meta_tags'));
add_action('save_post', array($aiosp, 'post_meta_tags'));
add_action('edit_page_form', array($aiosp, 'post_meta_tags'));
add_action('admin_menu', array($aiosp, 'admin_menu'));
?>
Warning: Invalid argument supplied for foreach() in /home/matrix/public_html/entrepreneurborn/business-builder/wp-includes/query.php on line 683
Fatal error: Call to undefined function update_object_term_cache() in /home/matrix/public_html/entrepreneurborn/business-builder/wp-includes/post.php on line 2745