name ); if ( ! empty( $parsed_args['feed_image'] ) || ! empty( $parsed_args['feed'] ) ) { $link .= ' '; if ( empty( $parsed_args['feed_image'] ) ) { $link .= '('; } $link .= ''; } else { $link .= $name; } $link .= ''; if ( empty( $parsed_args['feed_image'] ) ) { $link .= ')'; } } if ( $parsed_args['optioncount'] ) { $link .= ' (' . $posts . ')'; } $return .= $link; $return .= ( 'list' === $parsed_args['style'] ) ? '' : ', '; } $return = rtrim( $return, ', ' ); if ( $parsed_args['echo'] ) { echo $return; } else { return $return; } } /** * Determines whether this site has more than one author. * * Checks to see if more than one author has published posts. * * For more information on this and similar theme functions, check out * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ * Conditional Tags} article in the Theme Developer Handbook. * * @since 3.2.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @return bool Whether or not we have more than one author */ function is_multi_author() { global $wpdb; $is_multi_author = get_transient( 'is_multi_author' ); if ( false === $is_multi_author ) { $rows = (array) $wpdb->get_col( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2" ); $is_multi_author = 1 < count( $rows ) ? 1 : 0; set_transient( 'is_multi_author', $is_multi_author ); } /** * Filters whether the site has more than one author with published posts. * * @since 3.2.0 * * @param bool $is_multi_author Whether $is_multi_author should evaluate as true. */ return apply_filters( 'is_multi_author', (bool) $is_multi_author ); } /** * Helper function to clear the cache for number of authors. * * @since 3.2.0 * @access private */ function __clear_multi_author_cache() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore delete_transient( 'is_multi_author' ); } mmended to be used for sensitive pages. * * Typical usage is as a {@see 'wp_robots'} callback: * * add_filter( 'wp_robots', 'wp_robots_sensitive_page' ); * * @since 5.7.0 * * @param array $robots Associative array of robots directives. * @return array Filtered robots directives. */ function wp_robots_sensitive_page( array $robots ) { $robots['noindex'] = true; $robots['noarchive'] = true; return $robots; } /** * Adds `max-image-preview:large` to the robots meta tag. * * This directive tells web robots that large image previews are allowed to be * displayed, e.g. in search engines, unless the blog is marked as not being public. * * Typical usage is as a {@see 'wp_robots'} callback: * * add_filter( 'wp_robots', 'wp_robots_max_image_preview_large' ); * * @since 5.7.0 * * @param array $robots Associative array of robots directives. * @return array Filtered robots directives. */ function wp_robots_max_image_preview_large( array $robots ) { if ( get_option( 'blog_public' ) ) { $robots['max-image-preview'] = 'large'; } return $robots; }