本文整理汇总了PHP中is_events_archive函数的典型用法代码示例。如果您正苦于以下问题:PHP is_events_archive函数的具体用法?PHP is_events_archive怎么用?PHP is_events_archive使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_events_archive函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sidebar_options
/**
* Get sidebar settings based on the page type
*
* @return array
*/
public function sidebar_options()
{
if (is_home()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('blog_archive_sidebar'), 'sidebar_2' => Avada()->settings->get('blog_archive_sidebar_2'), 'position' => Avada()->settings->get('blog_sidebar_position'));
} elseif (function_exists('is_bbpress') && is_bbpress()) {
$sidebars = array('global' => Avada()->settings->get('bbpress_global_sidebar'), 'sidebar_1' => Avada()->settings->get('ppbress_sidebar'), 'sidebar_2' => Avada()->settings->get('ppbress_sidebar_2'), 'position' => Avada()->settings->get('bbpress_sidebar_position'));
if (bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_user_home() || bbp_is_search()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('ppbress_sidebar'), 'sidebar_2' => Avada()->settings->get('ppbress_sidebar_2'), 'position' => Avada()->settings->get('bbpress_sidebar_position'));
}
} elseif (function_exists('is_buddypress') && is_buddypress()) {
$sidebars = array('global' => Avada()->settings->get('bbpress_global_sidebar'), 'sidebar_1' => Avada()->settings->get('ppbress_sidebar'), 'sidebar_2' => Avada()->settings->get('ppbress_sidebar_2'), 'position' => Avada()->settings->get('bbpress_sidebar_position'));
} elseif (class_exists('WooCommerce') && (is_product() || is_shop())) {
$sidebars = array('global' => Avada()->settings->get('woo_global_sidebar'), 'sidebar_1' => Avada()->settings->get('woo_sidebar'), 'sidebar_2' => Avada()->settings->get('woo_sidebar_2'), 'position' => Avada()->settings->get('woo_sidebar_position'));
} elseif (class_exists('WooCommerce') && (is_product_category() || is_product_tag())) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('woocommerce_archive_sidebar'), 'sidebar_2' => Avada()->settings->get('woocommerce_archive_sidebar_2'), 'position' => Avada()->settings->get('woo_sidebar_position'));
} elseif (is_page()) {
$sidebars = array('global' => Avada()->settings->get('pages_global_sidebar'), 'sidebar_1' => Avada()->settings->get('pages_sidebar'), 'sidebar_2' => Avada()->settings->get('pages_sidebar_2'), 'position' => Avada()->settings->get('default_sidebar_pos'));
} elseif (is_single()) {
$sidebars = array('global' => Avada()->settings->get('posts_global_sidebar'), 'sidebar_1' => Avada()->settings->get('posts_sidebar'), 'sidebar_2' => Avada()->settings->get('posts_sidebar_2'), 'position' => Avada()->settings->get('blog_sidebar_position'));
if (is_singular('avada_portfolio')) {
$sidebars = array('global' => Avada()->settings->get('portfolio_global_sidebar'), 'sidebar_1' => Avada()->settings->get('portfolio_sidebar'), 'sidebar_2' => Avada()->settings->get('portfolio_sidebar_2'), 'position' => Avada()->settings->get('portfolio_sidebar_position'));
} else {
if (is_singular('tribe_events') || is_singular('tribe_organizer') || is_singular('tribe_venue')) {
$sidebars = array('global' => Avada()->settings->get('ec_global_sidebar'), 'sidebar_1' => Avada()->settings->get('ec_sidebar'), 'sidebar_2' => Avada()->settings->get('ec_sidebar_2'), 'position' => Avada()->settings->get('ec_sidebar_pos'));
}
}
if (is_singular('tribe_organizer') || is_singular('tribe_venue')) {
$sidebars['global'] = 1;
}
} elseif (is_archive()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('blog_archive_sidebar'), 'sidebar_2' => Avada()->settings->get('blog_archive_sidebar_2'), 'position' => Avada()->settings->get('blog_sidebar_position'));
if (is_post_type_archive('avada_portfolio') || is_tax('portfolio_category') || is_tax('portfolio_skills') || is_tax('portfolio_tags')) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('portfolio_archive_sidebar'), 'sidebar_2' => Avada()->settings->get('portfolio_archive_sidebar_2'), 'position' => Avada()->settings->get('portfolio_sidebar_position'));
}
} elseif (is_search()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('search_sidebar'), 'sidebar_2' => Avada()->settings->get('search_sidebar_2'), 'position' => Avada()->settings->get('search_sidebar_position'));
} else {
$sidebars = array('global' => Avada()->settings->get('pages_global_sidebar'), 'sidebar_1' => Avada()->settings->get('pages_sidebar'), 'sidebar_2' => Avada()->settings->get('pages_sidebar_2'), 'position' => Avada()->settings->get('default_sidebar_pos'));
}
if (class_exists('Tribe__Events__Main') && is_events_archive()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('ec_sidebar'), 'sidebar_2' => Avada()->settings->get('ec_sidebar_2'), 'position' => Avada()->settings->get('ec_sidebar_pos'));
}
// Remove sidebars from the certain woocommerce pages
if (class_exists('WooCommerce')) {
if (is_cart() || is_checkout() || is_account_page() || get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))) {
$sidebars = array();
}
}
return $sidebars;
}
示例2: avada_current_page_title_bar
function avada_current_page_title_bar($post_id)
{
global $smof_data;
ob_start();
if ($smof_data['breadcrumb']) {
if ($smof_data['page_title_bar_bs'] == 'Breadcrumbs') {
if (class_exists('Woocommerce') && is_woocommerce() || (is_tax('product_cat') || is_tax('product_tag'))) {
woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'delimiter' => ''));
} else {
if (class_exists('bbPress') && is_bbpress()) {
bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => ' ', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => __('Home', 'Avada')));
} else {
themefusion_breadcrumb();
}
}
} else {
get_search_form();
}
}
$secondary_content = ob_get_contents();
ob_get_clean();
$title = '';
$subtitle = '';
if (get_post_meta($post_id, 'pyre_page_title_custom_text', true) != '') {
$title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
}
if (get_post_meta($post_id, 'pyre_page_title_custom_subheader', true) != '') {
$subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
}
if (!$title) {
$title = get_the_title();
if (is_home()) {
$title = $smof_data['blog_title'];
}
if (is_search()) {
$title = __('Rezultati pretrage za:', 'Avada') . get_search_query();
}
if (is_404()) {
$title = __('Error 404 Page', 'Avada');
}
if (class_exists('TribeEvents') && tribe_is_event() && !is_single() || class_exists('TribeEvents') && is_events_archive() && is_404()) {
$title = tribe_get_events_title();
}
if (is_archive() && !is_bbpress()) {
if (is_day()) {
$title = __('Dnevna arhiva:', 'Avada') . '<span> ' . get_the_date() . '</span>';
} else {
if (is_month()) {
$title = __('Mjesečna arhiva:', 'Avada') . '<span> ' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>';
} elseif (is_year()) {
$title = __('Godišnja arhiva:', 'Avada') . '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>';
} elseif (is_author()) {
$curauth = get_user_by('id', get_query_var('author'));
$title = $curauth->nickname;
} else {
$title = single_cat_title('', false);
}
}
}
if (class_exists('Woocommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
if (!is_product()) {
$title = woocommerce_page_title(false);
}
}
}
if (!$subtitle) {
if (is_home()) {
$subtitle = $smof_data['blog_subtitle'];
}
}
if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
if (get_post_meta($post_id, 'pyre_page_title', true) == 'yes' || $smof_data['page_title_bar'] && get_post_meta($post_id, 'pyre_page_title', true) != 'no') {
if (get_post_meta($post_id, 'pyre_page_title_text', true) == 'no') {
$title = '';
$subtitle = '';
}
if (is_home() && is_front_page() && !$smof_data['blog_show_page_title_bar']) {
// do nothing
} else {
avada_page_title_bar($title, $subtitle, $secondary_content);
}
}
} else {
if (is_home() && !$smof_data['blog_show_page_title_bar']) {
// do nothing
} else {
if ($smof_data['page_title_bar']) {
avada_page_title_bar($title, $subtitle, $secondary_content);
}
}
}
}
示例3: avada_get_page_title_bar_contents
function avada_get_page_title_bar_contents($post_id, $get_secondary_content = TRUE)
{
if ($get_secondary_content) {
ob_start();
if (fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id) != 'none') {
if ('Breadcrumbs' == Avada()->settings->get('page_title_bar_bs') && in_array(get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true), array('breadcrumbs', 'default', '')) || 'breadcrumbs' == get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true)) {
fusion_breadcrumbs();
} elseif ('Search Box' == Avada()->settings->get('page_title_bar_bs') && in_array(get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true), array('searchbar', 'default', '')) || 'searchbar' == get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true)) {
get_search_form();
}
}
$secondary_content = ob_get_contents();
ob_get_clean();
} else {
$secondary_content = '';
}
$title = '';
$subtitle = '';
if ('' != get_post_meta($post_id, 'pyre_page_title_custom_text', true)) {
$title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
}
if ('' != get_post_meta($post_id, 'pyre_page_title_custom_subheader', true)) {
$subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
}
if ('' == get_post_meta($post_id, 'pyre_page_title_text', true) || 'default' == get_post_meta($post_id, 'pyre_page_title_text', true)) {
$page_title_text = Avada()->settings->get('page_title_bar_text');
} else {
$page_title_text = get_post_meta($post_id, 'pyre_page_title_text', true);
}
if (!$title) {
$title = get_the_title();
if (is_home()) {
$title = Avada()->settings->get('blog_title');
}
if (is_search()) {
$title = sprintf(__('Search results for: %s', 'Avada'), get_search_query());
}
if (is_404()) {
$title = __('Error 404 Page', 'Avada');
}
if (class_exists('Tribe__Events__Main') && (tribe_is_event() && !is_single() && !is_home() || is_events_archive() || is_events_archive() && is_404())) {
$title = tribe_get_events_title();
}
if (is_archive() && !is_bbpress() && !is_search()) {
if (is_day()) {
$title = sprintf(__('Daily Archives: %s', 'Avada'), '<span>' . get_the_date() . '</span>');
} else {
if (is_month()) {
$title = sprintf(__('Monthly Archives: %s', 'Avada'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>');
} elseif (is_year()) {
$title = sprintf(__('Yearly Archives: %s', 'Avada'), '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>');
} elseif (is_author()) {
$curauth = get_user_by('id', get_query_var('author'));
$title = $curauth->nickname;
} elseif (is_post_type_archive()) {
$title = post_type_archive_title('', false);
$sermon_settings = get_option('wpfc_options');
if (is_array($sermon_settings)) {
$title = $sermon_settings['archive_title'];
}
} else {
$title = single_cat_title('', false);
}
}
}
if (class_exists('WooCommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
if (!is_product()) {
$title = woocommerce_page_title(false);
}
}
}
if (!$subtitle && is_home()) {
$subtitle = Avada()->settings->get('blog_subtitle');
}
if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
if ('no' == $page_title_text && ('yes' == get_post_meta($post_id, 'pyre_page_title', true) || 'yes_without_bar' == get_post_meta($post_id, 'pyre_page_title', true) || 'hide' != Avada()->settings->get('page_title_bar') && 'no' != get_post_meta($post_id, 'pyre_page_title', true))) {
$title = '';
$subtitle = '';
}
} else {
if ('hide' != Avada()->settings->get('page_title_bar') && 'no' == $page_title_text) {
$title = '';
$subtitle = '';
}
}
return array($title, $subtitle, $secondary_content);
}
示例4: array
if (is_array($sidebar_1) && $sidebar_1[0] && is_array($sidebar_2) && $sidebar_2[0]) {
$body_classes[] = 'double-sidebars';
}
}
}
if (is_bbpress() && (bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_user_home() || bbp_is_search())) {
$sidebar_1 = $smof_data['ppbress_sidebar'];
$sidebar_2 = $smof_data['ppbress_sidebar_2'];
if ($sidebar_1 != 'None') {
$body_classes[] = 'has-sidebar';
}
if ($sidebar_1 != 'None' && $sidebar_2 != 'None') {
$body_classes[] = 'double-sidebars';
}
}
if (class_exists('TribeEvents') && is_events_archive()) {
if ($smof_data['pages_sidebar'] != 'None') {
$sidebar_1 = array($smof_data['pages_sidebar']);
} else {
$sidebar_1 = '';
}
if ($smof_data['pages_sidebar_2'] != 'None') {
$sidebar_2 = array($smof_data['pages_sidebar_2']);
} else {
$sidebar_2 = '';
}
if (is_array($sidebar_1) && $sidebar_1[0] && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('Woocommerce') || class_exists('Woocommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) {
$body_classes[] = 'has-sidebar';
}
if (is_array($sidebar_1) && $sidebar_1[0] && is_array($sidebar_2) && $sidebar_2[0] && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('Woocommerce') || class_exists('Woocommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) {
$body_classes[] = 'double-sidebars';
示例5: prepare_breadcrumb_html
/**
* Prepare the full output of the breadcrumb path
*
* @return void
*/
private function prepare_breadcrumb_html()
{
// Add the path prefix
$this->html_markup = $this->get_breadcrumb_prefix();
// Add the "Home" link
$this->html_markup .= $this->get_breadcrumb_home();
// Woocommerce path prefix (e.g "Shop" )
if (class_exists('Woocommerce') && (is_woocommerce() && is_archive() && !is_shop() || is_cart() || is_checkout() || is_account_page())) {
$this->html_markup .= $this->get_woocommerce_shop_page();
}
// bbPress path prefix (e.g "Forums" )
if (class_exists('bbPress') && is_bbpress() && (bbp_is_topic_archive() || bbp_is_single_user() || bbp_is_search())) {
$this->html_markup .= $this->get_bbpress_main_archive_page();
}
// Single Posts and Pages (of all post types)
if (is_singular()) {
// If the post type of the current post has an archive link, display the archive breadcrumb
if (isset($this->post->post_type) && get_post_type_archive_link($this->post->post_type) && $this->show_post_type_archive) {
$this->html_markup .= $this->get_post_type_archive();
}
// If the post doesn't have parents
if (isset($this->post->post_parent) && $this->post->post_parent == 0) {
$this->html_markup .= $this->get_post_terms();
// If there are parents; mostly for pages
} else {
$this->html_markup .= $this->get_post_ancestors();
}
$this->html_markup .= $this->get_breadcrumb_leaf_markup();
} else {
// Custom post types archives
if (is_post_type_archive()) {
$this->html_markup .= $this->get_post_type_archive(FALSE);
// Search on custom post type (e.g. Woocommerce)
if (is_search()) {
$this->html_markup .= $this->get_breadcrumb_leaf_markup('search');
}
// Taxonomy Archives
} elseif (is_tax() || is_tag() || is_category()) {
// If we have a tag archive, add the tag prefix
if (is_tag()) {
$this->html_markup .= $this->tag_archive_prefix;
}
$this->html_markup .= $this->get_taxonomies();
$this->html_markup .= $this->get_breadcrumb_leaf_markup('term');
// Date Archives
} elseif (is_date()) {
global $wp_locale;
// Set variables
$year = esc_html(get_query_var('year'));
if (is_month() || is_day()) {
$month = get_query_var('monthnum');
$month_name = $wp_locale->get_month($month);
}
// Year Archive, only is a leaf
if (is_year()) {
$this->html_markup .= $this->get_breadcrumb_leaf_markup('year');
// Month Archive, needs year link and month leaf
} elseif (is_month()) {
$this->html_markup .= $this->get_single_breadcrumb_markup($year, get_year_link($year));
$this->html_markup .= $this->get_breadcrumb_leaf_markup('month');
// Day Archive, needs year and month link and day leaf
} elseif (is_day()) {
$this->html_markup .= $this->get_single_breadcrumb_markup($year, get_year_link($year));
$this->html_markup .= $this->get_single_breadcrumb_markup($month_name, get_month_link($year, $month));
$this->html_markup .= $this->get_breadcrumb_leaf_markup('day');
}
// Author Archives
} elseif (is_author()) {
$this->html_markup .= $this->get_breadcrumb_leaf_markup('author');
// Search Page
} elseif (is_search()) {
$this->html_markup .= $this->get_breadcrumb_leaf_markup('search');
// 404 Page
} elseif (is_404()) {
// Special treatment for Events Calendar to avoid 404 messages on list view
if (class_exists('TribeEvents') && tribe_is_event() || is_events_archive()) {
$this->html_markup .= $this->get_breadcrumb_leaf_markup('events');
// Default case
} else {
$this->html_markup .= $this->get_breadcrumb_leaf_markup('404');
}
// bbPress
} elseif (class_exists('bbPress')) {
// Search Page
if (bbp_is_search()) {
$this->html_markup .= $this->get_breadcrumb_leaf_markup('bbpress_search');
// User page
} elseif (bbp_is_single_user()) {
$this->html_markup .= $this->get_breadcrumb_leaf_markup('bbpress_user');
}
}
}
}
示例6: body_classes
//.........这里部分代码省略.........
$classes[] = 'layout-boxed-mode';
} else {
$classes[] = 'layout-wide-mode';
}
if (is_array($sidebar_1) && !empty($sidebar_1) && ($sidebar_1[0] || '0' == $sidebar_1[0]) && !is_buddypress() && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('WooCommerce') || class_exists('WooCommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) {
$classes[] = 'has-sidebar';
}
if (is_array($sidebar_1) && $sidebar_1[0] && is_array($sidebar_2) && $sidebar_2[0] && !is_buddypress() && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('WooCommerce') || class_exists('WooCommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) {
$classes[] = 'double-sidebars';
}
if (is_page_template('side-navigation.php') && is_array($sidebar_2) && $sidebar_2[0]) {
$classes[] = 'double-sidebars';
}
if (is_home()) {
if ('None' != $sidebar_1) {
$classes[] = 'has-sidebar';
}
if ('None' != $sidebar_1 && 'None' != $sidebar_2) {
$classes[] = 'double-sidebars';
}
}
if (is_archive() && (!is_buddypress() && !is_bbpress() && (class_exists('WooCommerce') && !is_shop()) || !class_exists('WooCommerce')) && !is_tax('portfolio_category') && !is_tax('portfolio_skills') && !is_tax('portfolio_tags') && !is_tax('product_cat') && !is_tax('product_tag')) {
if ('None' != $sidebar_1) {
$classes[] = 'has-sidebar';
}
if ('None' != $sidebar_1 && 'None' != $sidebar_2) {
$classes[] = 'double-sidebars';
}
}
if (is_tax('portfolio_category') || is_tax('portfolio_skills') || is_tax('portfolio_tags')) {
if ('None' != $sidebar_1) {
$classes[] = 'has-sidebar';
}
if ('None' != $sidebar_1 && 'None' != $sidebar_2) {
$classes[] = 'double-sidebars';
}
}
if (is_tax('product_cat') || is_tax('product_tag')) {
if ('None' != $sidebar_1) {
$classes[] = 'has-sidebar';
}
if ('None' != $sidebar_1 && 'None' != $sidebar_2) {
$classes[] = 'double-sidebars';
}
}
if (is_search()) {
if ('None' != $sidebar_1) {
$classes[] = 'has-sidebar';
}
if ('None' != $sidebar_1 && 'None' != $sidebar_2) {
$classes[] = 'double-sidebars';
}
}
if ((is_bbpress() || is_buddypress()) && !bbp_is_forum_archive() && !bbp_is_topic_archive() && !bbp_is_user_home() && !bbp_is_search()) {
if (Avada()->settings->get('bbpress_global_sidebar')) {
if ('None' != $sidebar_1) {
$classes[] = 'has-sidebar';
}
if ('None' != $sidebar_1 && 'None' != $sidebar_2) {
$classes[] = 'double-sidebars';
}
} else {
if (is_array($sidebar_1) && $sidebar_1[0]) {
$classes[] = 'has-sidebar';
}
if (is_array($sidebar_1) && $sidebar_1[0] && is_array($sidebar_2) && $sidebar_2[0]) {
$classes[] = 'double-sidebars';
}
}
}
if ((is_bbpress() || is_buddypress()) && (bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_user_home() || bbp_is_search())) {
if ('None' != $sidebar_1) {
$classes[] = 'has-sidebar';
}
if ('None' != $sidebar_1 && 'None' != $sidebar_2) {
$classes[] = 'double-sidebars';
}
}
if (class_exists('Tribe__Events__Main') && is_events_archive()) {
if (is_array($sidebar_1) && $sidebar_1[0] && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('WooCommerce') || class_exists('WooCommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) {
$classes[] = 'has-sidebar';
}
if (is_array($sidebar_1) && $sidebar_1[0] && is_array($sidebar_2) && $sidebar_2[0] && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('WooCommerce') || class_exists('WooCommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) {
$classes[] = 'double-sidebars';
}
}
if ('no' != get_post_meta($c_pageID, 'pyre_display_header', true)) {
if ('Left' == Avada()->settings->get('header_position') || 'Right' == Avada()->settings->get('header_position')) {
$classes[] = 'side-header';
}
if ('Left' == Avada()->settings->get('header_position')) {
$classes[] = 'side-header-left';
} elseif ('Right' == Avada()->settings->get('header_position')) {
$classes[] = 'side-header-right';
}
$classes[] = 'menu-text-align-' . strtolower(Avada()->settings->get('menu_text_align'));
}
$classes[] = 'mobile-menu-design-' . Avada()->settings->get('mobile_menu_design');
return $classes;
}
示例7: elseif
$sidebar_css = 'float:right;';
} elseif (get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'default' || !metadata_exists('post', $post->ID, 'pyre_sidebar_position')) {
if ($smof_data['default_sidebar_pos'] == 'Left') {
$content_css = 'float:right;';
$sidebar_css = 'float:left;';
$sidebar_left = 1;
} elseif ($smof_data['default_sidebar_pos'] == 'Right') {
$content_css = 'float:left;';
$sidebar_css = 'float:right;';
$sidebar_left = 2;
}
}
if (get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'right') {
$sidebar_left = 2;
}
if ($smof_data['pages_global_sidebar'] || class_exists('TribeEvents') && is_events_archive()) {
if ($smof_data['pages_sidebar'] != 'None') {
$sidebar_1 = $smof_data['pages_sidebar'];
if ($smof_data['default_sidebar_pos'] == 'Right') {
$content_css = 'float:left;';
$sidebar_css = 'float:right;';
$sidebar_left = 2;
} else {
$content_css = 'float:right;';
$sidebar_css = 'float:left;';
$sidebar_left = 1;
}
}
if ($smof_data['pages_sidebar_2'] != 'None') {
$sidebar_2 = $smof_data['pages_sidebar_2'];
}
示例8: enqueue_scripts
//.........这里部分代码省略.........
wp_deregister_script('jquery.mousewheel');
wp_register_script('jquery.mousewheel', get_template_directory_uri() . '/assets/js/jquery.mousewheel.js', array(), $theme_info->get('Version'), true);
wp_enqueue_script('jquery.mousewheel');
if (Avada()->settings->get('status_lightbox')) {
wp_deregister_script('ilightbox.packed');
wp_register_script('ilightbox.packed', get_template_directory_uri() . '/assets/js/ilightbox.js', array(), $theme_info->get('Version'), true);
wp_enqueue_script('ilightbox.packed');
}
wp_deregister_script('avada-lightbox');
wp_register_script('avada-lightbox', get_template_directory_uri() . '/assets/js/avada-lightbox.js', array(), $theme_info->get('Version'), true);
wp_enqueue_script('avada-lightbox');
wp_deregister_script('avada-header');
wp_register_script('avada-header', get_template_directory_uri() . '/assets/js/avada-header.js', array(), $theme_info->get('Version'), true);
wp_enqueue_script('avada-header');
wp_deregister_script('avada-select');
wp_register_script('avada-select', get_template_directory_uri() . '/assets/js/avada-select.js', array(), $theme_info->get('Version'), true);
wp_enqueue_script('avada-select');
wp_deregister_script('avada-parallax');
wp_register_script('avada-parallax', get_template_directory_uri() . '/assets/js/avada-parallax.js', array(), $theme_info->get('Version'), true);
wp_enqueue_script('avada-parallax');
wp_deregister_script('avada-video-bg');
wp_register_script('avada-video-bg', get_template_directory_uri() . '/assets/js/avada-video-bg.js', array(), $theme_info->get('Version'), true);
wp_enqueue_script('avada-video-bg');
if (class_exists('WooCommerce')) {
wp_dequeue_script('avada-woocommerce');
wp_register_script('avada-woocommerce', get_template_directory_uri() . '/assets/js/avada-woocommerce.js', array('jquery'), $theme_info->get('Version'), true);
wp_enqueue_script('avada-woocommerce');
}
if (function_exists('is_bbpress') && is_bbpress()) {
wp_dequeue_script('avada-bbpress');
wp_register_script('avada-bbpress', get_template_directory_uri() . '/assets/js/avada-bbpress.js', array('jquery'), $theme_info->get('Version'), true);
wp_enqueue_script('avada-bbpress');
}
if (class_exists('Tribe__Events__Main') && (tribe_is_event() || is_events_archive())) {
wp_dequeue_script('avada-events');
wp_register_script('avada-events', get_template_directory_uri() . '/assets/js/avada-events.js', array('jquery'), $theme_info->get('Version'), true);
wp_enqueue_script('avada-events');
}
if (Avada()->settings->get('smooth_scrolling')) {
wp_dequeue_script('jquery.nicescroll');
wp_register_script('jquery.nicescroll', get_template_directory_uri() . '/assets/js/jquery.nicescroll.js', array('jquery'), $theme_info->get('Version'), true);
wp_enqueue_script('jquery.nicescroll');
wp_dequeue_script('avada-nicescroll');
wp_register_script('avada-nicescroll', get_template_directory_uri() . '/assets/js/avada-nicescroll.js', array('jquery'), $theme_info->get('Version'), true);
wp_enqueue_script('avada-nicescroll');
}
} else {
$main_js = get_template_directory_uri() . '/assets/js/main.min.js';
}
wp_deregister_script('avada');
wp_register_script('avada', $main_js, array(), $theme_info->get('Version'), true);
wp_enqueue_script('avada');
wp_localize_script('avada', 'toTopscreenReaderText', array('label' => esc_attr__('Go to Top', 'Avada')));
$smoothHeight = 'auto' == get_post_meta($this->page_id(), 'pyre_fimg_width', true) && 'half' == get_post_meta($this->page_id(), 'pyre_width', true) ? 'true' : 'false';
if (get_post_meta('auto' == $this->page_id(), 'pyre_fimg_width', true) && 'half' == get_post_meta($this->page_id(), 'pyre_width', true)) {
$flex_smoothHeight = 'true';
} else {
$flex_smoothHeight = Avada()->settings->get('slideshow_smooth_height') ? 'true' : 'false';
}
$db_vars = Avada()->settings->get_all();
$db_vars['slideshow_autoplay'] = !Avada()->settings->get('slideshow_autoplay') ? false : true;
$db_vars['slideshow_speed'] = !Avada()->settings->get('slideshow_speed') ? 7000 : Avada()->settings->get('slideshow_speed');
$current_page_template = get_page_template_slug($this->page_id());
$portfolio_image_size = avada_get_portfolio_image_size($this->page_id());
$isotope_type = $portfolio_image_size == 'full' ? 'masonry' : 'fitRows';
if (is_archive()) {
示例9: elseif
$sidebar_css = 'float:right;';
} elseif (get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'default' || !metadata_exists('post', $post->ID, 'pyre_sidebar_position')) {
if (Avada()->settings->get('default_sidebar_pos') == 'Left') {
$content_css = 'float:right;';
$sidebar_css = 'float:left;';
$sidebar_left = 1;
} elseif (Avada()->settings->get('default_sidebar_pos') == 'Right') {
$content_css = 'float:left;';
$sidebar_css = 'float:right;';
$sidebar_left = 2;
}
}
if (get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'right') {
$sidebar_left = 2;
}
if (Avada()->settings->get('pages_global_sidebar') || class_exists('Tribe__Events__Main') && is_events_archive()) {
if (Avada()->settings->get('pages_sidebar') != 'None') {
$sidebar_1 = Avada()->settings->get('pages_sidebar');
if (Avada()->settings->get('default_sidebar_pos') == 'Right') {
$content_css = 'float:left;';
$sidebar_css = 'float:right;';
$sidebar_left = 2;
} else {
$content_css = 'float:right;';
$sidebar_css = 'float:left;';
$sidebar_left = 1;
}
}
if (Avada()->settings->get('pages_sidebar_2') != 'None') {
$sidebar_2 = Avada()->settings->get('pages_sidebar_2');
}
示例10: avada_get_page_title_bar_contents
function avada_get_page_title_bar_contents($post_id, $get_secondary_content = TRUE)
{
global $smof_data;
if ($get_secondary_content) {
ob_start();
if (fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id) != 'none') {
if ($smof_data['page_title_bar_bs'] == 'Breadcrumbs' && get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'breadcrumbs' || $smof_data['page_title_bar_bs'] != 'Breadcrumbs' && get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'breadcrumbs' || $smof_data['page_title_bar_bs'] == 'Breadcrumbs' && (get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'default' || get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == '')) {
fusion_breadcrumbs();
} else {
if ($smof_data['page_title_bar_bs'] == 'Search Box' && get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'searchbar' || $smof_data['page_title_bar_bs'] != 'Search Box' && get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'searchbar' || $smof_data['page_title_bar_bs'] == 'Search Box' && (get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'default' || get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == '')) {
get_search_form();
}
}
}
$secondary_content = ob_get_contents();
ob_get_clean();
} else {
$secondary_content = '';
}
$title = '';
$subtitle = '';
if (get_post_meta($post_id, 'pyre_page_title_custom_text', true) != '') {
$title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
}
if (get_post_meta($post_id, 'pyre_page_title_custom_subheader', true) != '') {
$subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
}
if (get_post_meta($post_id, 'pyre_page_title_text', true) == '' || get_post_meta($post_id, 'pyre_page_title_text', true) == 'default') {
$page_title_text = $smof_data['page_title_bar_text'];
} else {
$page_title_text = get_post_meta($post_id, 'pyre_page_title_text', true);
}
if (!$title) {
$title = get_the_title();
if (is_home()) {
$title = $smof_data['blog_title'];
}
if (is_search()) {
$title = __('Search results for:', 'Avada') . ' ' . get_search_query();
}
if (is_404()) {
$title = __('Error 404 Page', 'Avada');
}
if (class_exists('TribeEvents') && tribe_is_event() && !is_single() && !is_home() || class_exists('TribeEvents') && is_events_archive() || class_exists('TribeEvents') && is_events_archive() && is_404()) {
$title = tribe_get_events_title();
}
if (is_archive() && !is_bbpress() && !is_search()) {
if (is_day()) {
$title = __('Daily Archives:', 'Avada') . '<span> ' . get_the_date() . '</span>';
} else {
if (is_month()) {
$title = __('Monthly Archives:', 'Avada') . '<span> ' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>';
} elseif (is_year()) {
$title = __('Yearly Archives:', 'Avada') . '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>';
} elseif (is_author()) {
$curauth = get_user_by('id', get_query_var('author'));
$title = $curauth->nickname;
} elseif (is_post_type_archive()) {
$title = post_type_archive_title('', false);
$sermon_settings = get_option('wpfc_options');
if (is_array($sermon_settings)) {
$title = $sermon_settings['archive_title'];
}
} else {
$title = single_cat_title('', false);
}
}
}
if (class_exists('Woocommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
if (!is_product()) {
$title = woocommerce_page_title(false);
}
}
}
if (!$subtitle) {
if (is_home()) {
$subtitle = $smof_data['blog_subtitle'];
}
}
if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
if (get_post_meta($post_id, 'pyre_page_title', true) == 'yes' || get_post_meta($post_id, 'pyre_page_title', true) == 'yes_without_bar' || $smof_data['page_title_bar'] != 'hide' && get_post_meta($post_id, 'pyre_page_title', true) != 'no') {
if ($page_title_text == 'no') {
$title = '';
$subtitle = '';
}
}
} else {
if ($smof_data['page_title_bar'] != 'hide') {
if ($page_title_text == 'no') {
$title = '';
$subtitle = '';
}
}
}
return array($title, $subtitle, $secondary_content);
}