$smiley ) if ( in_array( $smiley, $remove_smileys ) ) unset( $wpsmiliestrans[$key] ); } /** * 保存主题版本 * * @since Unknown * @deprecated Beginning 4.0.2 Use Bing_check_db_version() * * `add_action( 'init', 'Bing_save_theme_version', 16 );` */ function Bing_save_theme_version() { _deprecated_function( __FUNCTION__, '4.0.2', 'Bing_check_db_version()' ); return Bing_check_db_version(); } /** * 文章访问计数 * * @since Unknown * @since 4.0.1 统计所有公开文章类型和文章状态的文章。 * * @deprecated Beginning 4.0.4 Use Bing_Views_Stats::stats() * * `add_action( 'template_redirect', 'Bing_post_statistics_views' );` */ function Bing_post_statistics_views() { _deprecated_function( __FUNCTION__, '4.0.4', 'Bing_Views_Stats::stats()' ); Bing_Views_Stats::init(); Bing_Views_Stats::$object->stats(); } /** * 获取计数 * * @since Unknown * @deprecated Beginning 4.0.4 Use Bing_Views_Stats::get() */ function Bing_post_views( $post = null ) { _deprecated_function( __FUNCTION__, '4.0.4', 'Bing_Views_Stats::get()' ); $views = Bing_Views_Stats::get( $post ); return number_format_i18n( $views ); } /** * 面包屑导航 * * @since Unknown * @deprecated Beginning 4.0.4 Use Bing_Breadcrumbs::output() */ function Bing_breadcrumbs( $separator = '/', $before = '', $home = '' ) { _deprecated_function( __FUNCTION__, '4.0.4', 'Bing_Breadcrumbs::output()' ); $breadcrumbs = new Bing_Breadcrumbs( true ); $code = $breadcrumbs->get_code(); // 转换首页图标 $home = empty( $home ) ? __( '首页', 'Bing' ) : $home; $home = '' . $home . ''; // 替换首页图标 $code = preg_replace( '/
  • (.*?)<\/li>/', $home . '
  • ', $code ); // 替换分隔符 $code = substr_replace( $code, '', strrpos( $code, '' ), 5 ); $code = str_replace( '', $separator, $code ); // 替换前置字符串 $before = sprintf( $before, ' itemscope itemtype="http://schema.org/WebPage"' ); $code = preg_replace( '/]*>/', $before, $code ); // 替换后置字符串和多余部分 $code = str_replace( '', $after, $code ); $code = str_replace( '
  • ', '', $code ); echo $code; } /** * 生成分类法层级目录 * * @since Unknown * @deprecated Beginning 4.0.4 * * @see Bing_breadcrumbs() */ function Bing_taxonomy_parents( $ID, $taxonomy = 'category', $separator = '/' ) { _deprecated_function( __FUNCTION__, '4.0.4' ); $parent = get_term( $ID, $taxonomy ); $visited = array(); $result = ''; if ( $parent->parent != 0 && $parent->parent != $parent->term_id && !in_array( $parent->parent, $visited ) ) { $visited[] = $parent->parent; $result .= Bing_taxonomy_parents( $parent->parent, $taxonomy, $separator ); } $result .= sprintf( '%s%s', esc_url( get_term_link( $parent->term_id, $taxonomy ) ), $parent->name, $separator ); return $result; } /** * 获取新版本更新内容 * * @since Unknown * @deprecated Beginning 4.1.0 */ function Bing_update_content() { _deprecated_function( __FUNCTION__, '4.1.0' ); return false; } // End of page.