1 && get_option( 'page_comments' ) ) :
?>
/i', $page_markup, $matches);
$divclass = $matches[1];
$replace = array('
', '
');
$new_markup = str_replace($replace, '', $page_markup);
$new_markup = preg_replace('/^/i', '', $new_markup);
return $new_markup;
}
/*******************************arise MetaBox *********************************************************/
global $arise_layout_options;
$arise_layout_options = array(
'default-sidebar'=> array(
'id' => 'arise_sidebarlayout',
'value' => 'default',
'label' => __( 'Default Layout Set in', 'arise' ).' '.''.__( 'Customizer', 'arise' ).'',
'thumbnail' => ' '
),
'no-sidebar' => array(
'id' => 'arise_sidebarlayout',
'value' => 'no-sidebar',
'label' => __( 'No sidebar Layout', 'arise' )
),
'full-width' => array(
'id' => 'arise_sidebarlayout',
'value' => 'full-width',
'label' => __( 'Full Width Layout', 'arise' )
),
'left-sidebar' => array(
'id' => 'arise_sidebarlayout',
'value' => 'left-sidebar',
'label' => __( 'Left sidebar Layout', 'arise' )
),
'right-sidebar' => array(
'id' => 'arise_sidebarlayout',
'value' => 'right-sidebar',
'label' => __( 'Right sidebar Layout', 'arise' )
)
);
/*************************** Add Custom Box **********************************/
function arise_add_custom_box() {
add_meta_box(
'siderbar-layout',
__( 'Select layout for this specific Page only', 'arise' ),
'arise_layout_options',
'page', 'side', 'default'
);
add_meta_box(
'siderbar-layout',
__( 'Select layout for this specific Post only', 'arise' ),
'arise_layout_options',
'post','side', 'default'
);
}
add_action( 'add_meta_boxes', 'arise_add_custom_box' );
function arise_layout_options() {
global $arise_layout_options;
// Use nonce for verification
wp_nonce_field( basename( __FILE__ ), 'arise_custom_meta_box_nonce' ); // for security purpose ?>
/>
$arise_transition_effect,
'transition_delay' => $arise_transition_delay,
'transition_duration' => $arise_transition_duration,
)
);
}
/**************************** Display Header Title ***********************************/
function arise_header_title() {
$format = get_post_format();
if( is_archive() ) {
if ( is_category() ) :
$arise_header_title = single_cat_title( '', FALSE );
elseif ( is_tag() ) :
$arise_header_title = single_tag_title( '', FALSE );
elseif ( is_author() ) :
the_post();
$arise_header_title = sprintf( __( 'Author: %s', 'arise' ), '' . get_the_author() . '' );
rewind_posts();
elseif ( is_day() ) :
$arise_header_title = sprintf( __( 'Day: %s', 'arise' ), '' . get_the_date() . '' );
elseif ( is_month() ) :
$arise_header_title = sprintf( __( 'Month: %s', 'arise' ), '' . get_the_date( 'F Y' ) . '' );
elseif ( is_year() ) :
$arise_header_title = sprintf( __( 'Year: %s', 'arise' ), '' . get_the_date( 'Y' ) . '' );
elseif ( $format == 'audio' ) :
$arise_header_title = __( 'Audios', 'arise' );
elseif ( $format =='aside' ) :
$arise_header_title = __( 'Asides', 'arise');
elseif ( $format =='image' ) :
$arise_header_title = __( 'Images', 'arise' );
elseif ( $format =='gallery' ) :
$arise_header_title = __( 'Galleries', 'arise' );
elseif ( $format =='video' ) :
$arise_header_title = __( 'Videos', 'arise' );
elseif ( $format =='status' ) :
$arise_header_title = __( 'Status', 'arise' );
elseif ( $format =='quote' ) :
$arise_header_title = __( 'Quotes', 'arise' );
elseif ( $format =='link' ) :
$arise_header_title = __( 'links', 'arise' );
elseif ( $format =='chat' ) :
$arise_header_title = __( 'Chats', 'arise' );
elseif ( class_exists('WooCommerce') && (is_shop() || is_product_category()) ):
$arise_header_title = woocommerce_page_title( false );
elseif ( class_exists('bbPress') && is_bbpress()) :
$arise_header_title = get_the_title();
else :
$arise_header_title = __( 'Archives', 'arise' );
endif;
} elseif (is_home()){
$arise_header_title = get_the_title( get_option( 'page_for_posts' ) );
} elseif (is_404()) {
$arise_header_title = __('Page NOT Found', 'arise');
} elseif (is_search()) {
$arise_header_title = __('Search Results', 'arise');
} elseif (is_page_template()) {
$arise_header_title = get_the_title();
} else {
$arise_header_title = get_the_title();
}
return $arise_header_title;
}
/********************* Header Image ************************************/
function arise_header_image_display(){
$arise_settings = arise_get_theme_options();
$arise_header_image = get_header_image();
$arise_header_image_options = $arise_settings['arise_custom_header_options'];
if($arise_header_image_options == 'homepage'){
if(is_front_page() || (is_home() && is_front_page())) :
if (!empty($arise_header_image)):
if(($arise_settings['arise_header_primary_text']!='') || ($arise_settings['arise_header_secondary_text']!='') || ($arise_settings['arise_Header_description']!='')){ ?>
'',
'default-image' => '',
'height' => apply_filters( 'arise_header_image_height', 400 ),
'width' => apply_filters( 'arise_header_image_width', 2500 ),
'random-default' => false,
'max-width' => 2500,
'flex-height' => true,
'flex-width' => true,
'random-default' => false,
'header-text' => false,
'uploads' => true,
'wp-head-callback' => '',
'admin-preview-callback' => 'arise_admin_header_image',
);
add_theme_support( 'custom-header', $args );
}
add_action( 'after_setup_theme', 'arise_custom_header_setup' );