ID ) ? rand() : $post->ID ); $o = '

' . esc_html__( 'This post is password protected. To view it please enter your password below:' ,'activello' ) . '

'; return $o; } // Add Bootstrap classes for table add_filter( 'the_content', 'activello_add_custom_table_class' ); function activello_add_custom_table_class( $content ) { return str_replace( '', '
', $content ); } if ( ! function_exists( 'activello_header_menu' ) ) : /** * Header menu (should you choose to use one) */ function activello_header_menu() { // display the WordPress Custom Menu if available wp_nav_menu( array( 'menu' => 'primary', 'theme_location' => 'primary', 'container' => 'div', 'container_class' => 'collapse navbar-collapse navbar-ex1-collapse', 'menu_class' => 'nav navbar-nav', 'fallback_cb' => 'Activello_Wp_Bootstrap_Navwalker::fallback', 'walker' => new Activello_Wp_Bootstrap_Navwalker(), )); } endif; if ( ! function_exists( 'activello_featured_slider' ) ) : /** * Featured image slider, displayed on front page for static page and blog */ function activello_featured_slider() { if ( ( is_home() || is_front_page() ) && get_theme_mod( 'activello_featured_hide' ) == 1 ) { wp_enqueue_style( 'flexslider-css' ); wp_enqueue_script( 'flexslider-js' ); echo '
'; echo ''; echo '
'; }// End if(). } endif; /** * function to show the footer info, copyright information */ function activello_footer_info() { global $activello_footer_info; printf( esc_html__( 'Theme by %1$s Powered by %2$s', 'activello' ) , 'Colorlib', 'WordPress' ); } /** * Add Bootstrap thumbnail styling to images with captions * Use
and
* * @link http://justintadlock.com/archives/2011/07/01/captions-in-wordpress */ function activello_caption( $output, $attr, $content ) { if ( is_feed() ) { return $output; } $defaults = array( 'id' => '', 'align' => 'alignnone', 'width' => '', 'caption' => '', ); $attr = shortcode_atts( $defaults, $attr ); // If the width is less than 1 or there is no caption, return the content wrapped between the [caption] tags if ( $attr['width'] < 1 || empty( $attr['caption'] ) ) { return $content; } // Set up the attributes for the caption
$attributes = ( ! empty( $attr['id'] ) ? ' id="' . esc_attr( $attr['id'] ) . '"' : '' ); $attributes .= ' class="thumbnail wp-caption ' . esc_attr( $attr['align'] ) . '"'; $attributes .= ' style="width: ' . ( esc_attr( $attr['width'] ) + 10) . 'px"'; $output = ''; $output .= do_shortcode( $content ); $output .= '
' . $attr['caption'] . '
'; $output .= '
'; return $output; } add_filter( 'img_caption_shortcode', 'activello_caption', 10, 3 ); /** * Skype URI support for social media icons */ function activello_allow_skype_protocol( $protocols ) { $protocols[] = 'skype'; return $protocols; } add_filter( 'kses_allowed_protocols' , 'activello_allow_skype_protocol' ); /* * This display blog description from wp customizer setting. */ function activello_cats() { $cats = array(); $cats[0] = 'All'; foreach ( get_categories() as $categories => $category ) { $cats[ $category->term_id ] = $category->name; } return $cats; } /** * Custom comment template */ function activello_cb_comment( $comment, $args, $depth ) { if ( 'div' == $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-">
%s says:', 'activello' ), get_comment_author_link() ); ?> $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'], ); comment_reply_link( array_merge( $args, $comments_reply_args ) ); ?>
comment_approved ) : ?>
'; if ( get_theme_mod( 'accent_color' ) ) { echo 'a:hover, a:focus,article.post .post-categories a:hover, .entry-title a:hover, .entry-meta a:hover, .entry-footer a:hover, .read-more a:hover, .social-icons a:hover, .flex-caption .post-categories a:hover, .flex-caption .read-more a:hover, .flex-caption h2:hover, .comment-meta.commentmetadata a:hover, .post-inner-content .cat-item a:hover,.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus, .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus, .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, blockquote:before, .navbar-default .navbar-nav > .open > a:focus, .cat-title a, .single .entry-content a, .site-info a:hover {color:' . esc_html( get_theme_mod( 'accent_color' ) ) . '}'; echo 'article.post .post-categories:after, .post-inner-content .cat-item:after, #secondary .widget-title:after, .dropdown-menu>.active>a, .dropdown-menu>.active>a:hover, .dropdown-menu>.active>a:focus {background:' . esc_html( get_theme_mod( 'accent_color' ) ) . '}'; echo '.btn-default:hover, .label-default[href]:hover, .label-default[href]:focus, .btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, #image-navigation .nav-previous a:hover, #image-navigation .nav-next a:hover, .woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .input-group-btn:last-child>.btn:hover, .scroll-to-top:hover, button, html input[type=button]:hover, input[type=reset]:hover, .comment-list li .comment-body:after, .page-links a:hover span, .page-links span, input[type=submit]:hover, .comment-form #submit:hover, .tagcloud a:hover, .single .entry-content a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .dropdown-menu> li> a:hover, .dropdown-menu> li> a:focus, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus{background-color:' . esc_html( get_theme_mod( 'accent_color' ) ) . '; }'; } if ( get_theme_mod( 'social_color' ) ) { echo '#social a, .header-search-icon { color:' . esc_html( get_theme_mod( 'social_color' ) ) . '}'; } if ( get_theme_mod( 'social_hover_color' ) ) { echo '#social a:hover, .header-search-icon:hover { color:' . esc_html( get_theme_mod( 'social_hover_color' ) ) . '}'; } if ( get_theme_mod( 'custom_css' ) ) { echo html_entity_decode( esc_html( get_theme_mod( 'custom_css', 'no entry' ) ) ); } echo ''; } } // End if(). add_action( 'wp_head', 'get_activello_theme_setting', 10 ); /** * Adds the URL to the top level navigation menu item */ function activello_add_top_level_menu_url( $atts, $item, $args ) { if ( ! wp_is_mobile() && isset( $args->has_children ) && $args->has_children ) { $atts['href'] = ! empty( $item->url ) ? $item->url : ''; } return $atts; } add_filter( 'nav_menu_link_attributes', 'activello_add_top_level_menu_url', 99, 3 ); /** * Makes the top level navigation menu item clickable */ function activello_make_top_level_menu_clickable() { if ( ! wp_is_mobile() ) { ?>