本文整理汇总了PHP中is_multi_author函数的典型用法代码示例。如果您正苦于以下问题:PHP is_multi_author函数的具体用法?PHP is_multi_author怎么用?PHP is_multi_author使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_multi_author函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: flatbook_body_classes
/**
* Adds custom classes to the array of body classes.
*/
function flatbook_body_classes($classes)
{
if (is_multi_author()) {
$classes[] = 'group-blog';
}
return $classes;
}
示例2: identity_body_classes
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array
*/
function identity_body_classes($classes)
{
// Adds a class depending on whether sidebar is active and the selection in the customizer.
$sidebar = get_theme_mod('identity_sidebar', 'right-sidebar');
if (!is_active_sidebar('sidebar-1') || $sidebar == 'no-sidebar') {
$classes[] = 'no-sidebar';
} elseif (is_active_sidebar('sidebar-1') && $sidebar == 'right-sidebar') {
$classes[] = 'right-sidebar';
} elseif (is_active_sidebar('sidebar-1') && $sidebar == 'left-sidebar') {
$classes[] = 'left-sidebar';
}
// Adds a class when the footer widget area is active and what is selected in the customizer.
$footer = get_theme_mod('identity_footer_widgets', 'three-widgets');
if (!is_active_sidebar('sidebar-2') || $footer == 'no-widgets') {
$classes[] = 'no-footer-widgets';
} elseif (is_active_sidebar('sidebar-2') && $footer == 'two-widgets') {
$classes[] = 'two-footer-widgets';
} elseif (is_active_sidebar('sidebar-2') && $footer == 'three-widgets') {
$classes[] = 'three-footer-widgets';
} elseif (is_active_sidebar('sidebar-2') && $footer == 'four-widgets') {
$classes[] = 'four-footer-widgets';
}
// Adds a class when the full width page template is being used.
if (is_page_template('page-templates/full-width.php')) {
$classes[] = 'full-width';
}
// Adds a class of group-blog to blogs with more than 1 published author.
if (is_multi_author()) {
$classes[] = 'group-blog';
}
return $classes;
}
示例3: body_classes
public function body_classes($classes)
{
if (is_multi_author()) {
$classes[] = 'groupBlog';
}
return $classes;
}
示例4: directory_theme_entry_meta
function directory_theme_entry_meta()
{
if (is_sticky() && is_home() && !is_paged()) {
printf('<span class="sticky-post">%s</span>', __('Featured', 'directory-starter'));
}
$format = get_post_format();
if (current_theme_supports('post-formats', $format)) {
printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'directory-starter')), esc_url(get_post_format_link($format)), get_post_format_string($format));
}
if (in_array(get_post_type(), array('post', 'attachment'))) {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
$time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date());
printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'directory-starter'), esc_url(get_permalink()), $time_string);
}
if ('post' == get_post_type()) {
if (is_singular() || is_multi_author()) {
printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'directory-starter'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
}
$categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'directory-starter'));
if ($categories_list) {
printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'directory-starter'), $categories_list);
}
$tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'directory-starter'));
if ($tags_list) {
printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'directory-starter'), $tags_list);
}
}
if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
echo '<span class="comments-link">';
comments_popup_link(__('Leave a comment', 'directory-starter'), __('1 Comment', 'directory-starter'), __('% Comments', 'directory-starter'));
echo '</span>';
}
}
示例5: shapely_body_classes
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
*
* @return array
*/
function shapely_body_classes($classes)
{
// Adds a class of group-blog to blogs with more than 1 published author.
if (is_multi_author()) {
$classes[] = 'group-blog';
}
// Adds a class of hfeed to non-singular pages.
if (!is_singular()) {
$classes[] = 'hfeed';
}
if (get_theme_mod('shapely_sidebar_position') == "pull-right") {
$classes[] = 'has-sidebar-left';
} else {
if (get_theme_mod('shapely_sidebar_position') == "no-sidebar") {
$classes[] = 'has-no-sidebar';
} else {
if (get_theme_mod('shapely_sidebar_position') == "full-width") {
$classes[] = 'has-full-width';
} else {
$classes[] = 'has-sidebar-right';
}
}
}
return $classes;
}
示例6: onehost_body_classes
/**
* Adds custom classes to the array of body classes.
*
* @since 1.0
* @param array $classes Classes for the body element.
* @return array
*/
function onehost_body_classes($classes)
{
// Adds a class of group-blog to blogs with more than 1 published author.
if (is_multi_author()) {
$classes[] = 'group-blog';
}
// Add a class of layout
$classes[] = onehost_get_layout();
// Add a class when choose no animation
if (onehost_theme_option('no_animation')) {
$classes[] = 'no-animation';
}
// Add a class when choose no animation
$classes[] = onehost_theme_option('site_style') . '-version';
// Add a class for color scheme
if (onehost_theme_option('custom_color_scheme') && onehost_theme_option('custom_color_1')) {
$classes[] = 'custom-color-scheme';
} else {
$classes[] = onehost_theme_option('color_scheme');
}
if (onehost_get_meta('hide_singular_title')) {
$classes[] = 'hide-singular-title';
}
return $classes;
}
示例7: boardwalk_body_classes
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array
*/
function boardwalk_body_classes($classes)
{
// Adds a class of group-blog to blogs with more than 1 published author.
if (is_multi_author()) {
$classes[] = 'group-blog';
}
if (get_next_posts_link()) {
$classes[] = 'next-link';
}
if (get_previous_posts_link()) {
$classes[] = 'previous-link';
}
if (1 == get_theme_mod('boardwalk_filter_featured_images')) {
$classes[] = 'filter-on';
}
if (1 == get_theme_mod('boardwalk_entry_title')) {
$classes[] = 'title-with-content';
}
if (1 == get_theme_mod('boardwalk_unfixed_header')) {
$classes[] = 'unfixed-header';
}
if (is_active_sidebar('sidebar-1') || has_nav_menu('primary')) {
$classes[] = 'has-sidebar';
}
return $classes;
}
示例8: xsbf_body_classes
function xsbf_body_classes($classes)
{
// Adds a class of group-blog to blogs with more than 1 published author
if (is_multi_author()) {
$classes[] = 'group-blog';
}
// Adds classes for various sizes of featured images. Our theme overrides the
// custom header with a large featured image.
if (has_post_thumbnail()) {
$classes[] = 'featured-image';
global $post, $content_width;
$featured_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
$image_width = $featured_image[1];
if ($content_width and $image_width >= $content_width) {
if (is_home()) {
$classes[] = 'has-cover-image';
} else {
$classes[] = 'has-section-image';
}
//endif is_home
}
//endif $content_width
// If custom header and not overridden, then add class for that
} elseif (get_header_image()) {
$classes[] = 'has-header-image';
}
//endif has_post_thumbnail
return $classes;
}
示例9: listable_body_classes
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
*
* @return array
*/
function listable_body_classes($classes)
{
// Adds a class of group-blog to blogs with more than 1 published author.
if (is_multi_author()) {
$classes[] = 'group-blog';
}
global $post;
if (has_nav_menu('secondary')) {
$classes[] = 'has--secondary-menu';
}
if (isset($post->post_content) && has_shortcode($post->post_content, 'jobs') || is_search() || is_tax(array('job_listing_category', 'job_listing_tag', 'job_listing_region'))) {
$classes[] = 'page-listings';
}
if (isset($post->post_content) && has_shortcode($post->post_content, 'job_dashboard')) {
$classes[] = 'page-job-dashboard';
}
if (isset($post->post_content) && has_shortcode($post->post_content, 'my_bookmarks')) {
$classes[] = 'page-my-bookmarks';
}
if (isset($post->post_content) && has_shortcode($post->post_content, 'woocommerce_my_account')) {
$classes[] = 'page-login';
}
if (isset($post->post_content) && has_shortcode($post->post_content, 'submit_job_form')) {
$classes[] = 'page-add-listing';
}
if (listable_using_facetwp()) {
$classes[] = 'is--using-facetwp';
}
if (isset($post->post_content) && has_shortcode($post->post_content, 'jobs_by_tag')) {
$classes[] = 'jobs-by-tags-page';
}
return $classes;
}
示例10: vantage_body_classes
/**
* Adds custom classes to the array of body classes.
*
* @since vantage 1.0
*/
function vantage_body_classes($classes)
{
// Adds a class of group-blog to blogs with more than 1 published author
if (is_multi_author()) {
$classes[] = 'group-blog';
}
if (siteorigin_setting('layout_responsive')) {
$classes[] = 'responsive';
}
$classes[] = 'layout-' . siteorigin_setting('layout_bound');
$classes[] = 'no-js';
$is_full_width_template = is_page_template('templates/template-full.php') || is_page_template('templates/template-full-notitle.php');
if (!$is_full_width_template) {
$wc_shop_sidebar = vantage_is_woocommerce_active() && is_shop() && is_active_sidebar('shop');
if (!is_active_sidebar('sidebar-1') && !$wc_shop_sidebar) {
$classes[] = 'no-sidebar';
} else {
$classes[] = 'has-sidebar';
}
}
if (wp_is_mobile()) {
$classes[] = 'so-vantage-mobile-device';
}
$mega_menu_active = function_exists('max_mega_menu_is_enabled') && max_mega_menu_is_enabled('primary');
if (siteorigin_setting('navigation_menu_search') && !$mega_menu_active) {
$classes[] = 'has-menu-search';
}
if (siteorigin_setting('layout_force_panels_full')) {
$classes[] = 'panels-style-force-full';
}
return $classes;
}
示例11: swell_body_classes
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array
*/
function swell_body_classes($classes)
{
// Adds a class of group-blog to blogs with more than 1 published author.
if (is_multi_author()) {
$classes[] = 'group-blog';
}
// Add Browser to Body Class
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if ($is_lynx) {
$classes[] = 'lynx';
} elseif ($is_gecko) {
$classes[] = 'gecko';
} elseif ($is_opera) {
$classes[] = 'opera';
} elseif ($is_NS4) {
$classes[] = 'ns4';
} elseif ($is_safari) {
$classes[] = 'safari';
} elseif ($is_chrome) {
$classes[] = 'chrome';
} elseif ($is_IE) {
$classes[] = 'ie';
} else {
$classes[] = 'unknown';
}
if ($is_iphone) {
$classes[] = 'iphone';
}
if (has_home_video()) {
$classes[] = 'has-video';
}
return $classes;
}
示例12: _filter_theme_body_classes
/**
* Extend the default WordPress body classes.
*
* Adds body classes to denote:
* 1. Single or multiple authors.
* 2. Presence of header image.
* 3. Index views.
* 4. Full-width content layout.
* 5. Presence of footer widgets.
* 6. Single views.
* 7. Featured content layout.
*
* @param array $classes A list of existing body class values.
*
* @return array The filtered body class list.
* @internal
*/
function _filter_theme_body_classes($classes)
{
if (is_multi_author()) {
$classes[] = 'group-blog';
}
if (get_header_image()) {
$classes[] = 'header-image';
} else {
$classes[] = 'masthead-fixed';
}
if (is_archive() || is_search() || is_home()) {
$classes[] = 'list-view';
}
if (function_exists('fw_ext_sidebars_get_current_position')) {
$current_position = fw_ext_sidebars_get_current_position();
if (in_array($current_position, array('full', 'left')) || empty($current_position) || is_page_template('page-templates/full-width.php') || is_page_template('page-templates/contributors.php') || is_attachment()) {
$classes[] = 'full-width';
}
} else {
$classes[] = 'full-width';
}
if (is_active_sidebar('sidebar-1')) {
$classes[] = 'footer-widgets';
}
if (is_singular() && !is_front_page()) {
$classes[] = 'singular';
}
if (is_front_page() && 'slider' == get_theme_mod('featured_content_layout')) {
$classes[] = 'slider';
} elseif (is_front_page()) {
$classes[] = 'grid';
}
return $classes;
}
示例13: tm_polygon_body_classes
/**
* Adds custom classes to the array of body classes.
* ================================================
*
* @param array $classes Classes for the body element.
*
* @return array
*/
function tm_polygon_body_classes($classes)
{
// Adds a class of group-blog to blogs with more than 1 published author.
if (is_multi_author()) {
$classes[] = 'group-blog';
}
global $tm_polygon_custom_class;
if ($tm_polygon_custom_class) {
$classes[] = $tm_polygon_custom_class;
}
if (Kirki::get_option('tm-polygon', 'site_general_boxed') == 1) {
$classes[] = 'boxed';
}
$classes[] = Kirki::get_option('tm-polygon', 'header_type');
global $tm_polygon_page_layout_private;
if ($tm_polygon_page_layout_private != 'default' && class_exists('cmb2_bootstrap_205')) {
$tm_polygon_layout = get_post_meta(get_the_ID(), "tm_polygon_page_layout_private", true);
} else {
$tm_polygon_layout = Kirki::get_option('tm-polygon', 'page_layout');
}
$classes[] = $tm_polygon_layout;
if (defined('TM_CORE_VERSION')) {
$classes[] = 'core_' . str_replace(".", "", TM_CORE_VERSION);
}
return $classes;
}
示例14: memberlite_body_classes
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array
*/
function memberlite_body_classes($classes)
{
global $post, $memberlite_defaults;
//sidebar classes
$classes[] = get_theme_mod('sidebar_location', $memberlite_defaults['sidebar_location']);
$classes[] = get_theme_mod('sidebar_location_blog', $memberlite_defaults['sidebar_location_blog']);
if (is_page_template('templates/sidebar-content.php')) {
$classes[] = 'sidebar-content';
}
if (is_page_template('templates/content-sidebar.php')) {
$classes[] = 'content-sidebar';
}
//color scheme class
$classes[] = 'scheme_' . get_theme_mod('memberlite_color_scheme', $memberlite_defaults['memberlite_color_scheme']);
//other classes
if (is_multi_author()) {
$classes[] = 'group-blog';
}
if (is_page_template('templates/landing.php')) {
$classes[] = 'landing';
}
if (is_page_template('templates/interstitial.php')) {
$classes[] = 'interstitial';
}
return $classes;
}
示例15: brvry_body_classes
function brvry_body_classes($classes)
{
// Adds a class of group-blog to blogs with more than 1 published author.
if (is_multi_author()) {
$classes[] = 'group-blog';
}
global $post;
if (isset($post)) {
$classes[] = $post->post_type . '-' . $post->post_name;
}
// Site name body class
$site_name = get_bloginfo('name');
//Lower case everything
$string = strtolower($site_name);
//Make alphanumeric (removes all other characters)
$string = preg_replace("/[^a-z0-9_\\s-]/", "", $string);
//Clean up multiple dashes or whitespaces
$string = preg_replace("/[\\s-]+/", " ", $string);
//Convert whitespaces and underscore to dash
$string = preg_replace("/[\\s_]/", "-", $string);
$sitename = 'site-' . $string;
if (isset($sitename)) {
$classes[] = $sitename;
}
return $classes;
}