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

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

'; return $o; } // Add Bootstrap classes for table add_filter( 'the_content', 'apazit_add_custom_table_class' ); function apazit_add_custom_table_class( $content ) { return preg_replace( '/(]*)class="([^"]*)")?/', '$1 $3 class="$4 table table-hover" ', $content); } if ( ! function_exists( 'apazit_social_icons' ) ) : /** * Display social links in footer and widgets * * @package apazit */ function apazit_social_icons(){ if ( has_nav_menu( 'social-menu' ) ) { wp_nav_menu( array( 'theme_location' => 'social-menu', 'container' => 'nav', 'container_id' => 'menu-social', 'container_class' => 'social-icons', 'menu_id' => 'menu-social-items', 'menu_class' => 'social-menu', 'depth' => 1, 'fallback_cb' => '', 'link_before' => '', 'link_after' => '' ) ); } } endif; if ( ! function_exists( 'apazit_header_menu' ) ) : /** * Header menu (should you choose to use one) */ function apazit_header_menu() { // display the WordPress Custom Menu if available wp_nav_menu(array( 'menu' => 'primary', 'theme_location' => 'primary', 'depth' => 2, 'container' => 'div', 'container_class' => 'collapse navbar-collapse navbar-ex1-collapse', 'menu_class' => 'nav navbar-nav', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new wp_bootstrap_navwalker() )); } /* end header menu */ endif; if ( ! function_exists( 'apazit_footer_links' ) ) : /** * Footer menu (should you choose to use one) */ function apazit_footer_links() { // display the WordPress Custom Menu if available wp_nav_menu(array( 'container' => '', // remove nav container 'container_class' => 'footer-links clearfix', // class of container (should you choose to use it) 'menu' => esc_html__( 'Footer Links', 'apazit' ), // nav name 'menu_class' => 'nav footer-nav clearfix', // adding custom nav class 'theme_location' => 'footer-links', // where it's located in the theme 'before' => '', // before the menu 'after' => '', // after the menu 'link_before' => '', // before each link 'link_after' => '', // after each link 'depth' => 0, // limit the depth of the nav 'fallback_cb' => 'apazit_footer_links_fallback' // fallback function )); } /* end apazit footer link */ endif; if ( ! function_exists( 'apazit_call_for_action' ) ) : /** * Call for action text and button displayed above content */ function apazit_call_for_action() { if ( is_front_page() && of_get_option( 'w2f_cfa_text' )!=''){ echo '
'; echo '
'; echo '
'; echo ''. of_get_option( 'w2f_cfa_text' ).''; echo '
'; echo ''; echo '
'; echo '
'; } } endif; if ( ! function_exists( 'apazit_featured_slider' ) ) : /** * Featured image slider, displayed on front page for static page and blog */ function apazit_featured_slider() { if ( is_front_page() && of_get_option( 'apazit_slider_checkbox' ) == 1 ) { echo '
'; echo ''; echo '
'; } } endif; /** * function to show the footer info, copyright information */ function apazit_footer_info() { global $apazit_footer_info; printf( esc_html__( 'Theme by %1$s Powered by %2$s', 'apazit' ) , 'theme77', 'WordPress'); } if ( ! function_exists( 'get_apazit_theme_options' ) ) { /** * Get information from Theme Options and add it into wp_head */ function get_apazit_theme_options(){ echo ''; } } add_action( 'wp_head', 'get_apazit_theme_options', 10 ); // Theme Options sidebar add_action( 'optionsframework_after', 'apazit_options_display_sidebar' ); function apazit_options_display_sidebar() { ?>

support questions and bug reports is via','apazit') ?> .

and
* * @link http://justintadlock.com/archives/2011/07/01/captions-in-wordpress */ function apazit_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', 'apazit_caption', 10, 3); /** * Skype URI support for social media icons */ function apazit_allow_skype_protocol( $protocols ){ $protocols[] = 'skype'; return $protocols; } add_filter( 'kses_allowed_protocols' , 'apazit_allow_skype_protocol' ); /** * Fallback option for the old Social Icons. */ function apazit_social(){ if( of_get_option('footer_social') ) { apazit_social_icons(); } } /** * Adds the URL to the top level navigation menu item */ function apazit_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', 'apazit_add_top_level_menu_url', 99, 3 ); /** * Makes the top level navigation menu item clickable */ function apazit_make_top_level_menu_clickable(){ if ( !wp_is_mobile() ) { ?>