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

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

'; return $o; } /** * Add Bootstrap classes for table */ add_filter( 'the_content', 'adle_add_custom_table_class' ); function adle_add_custom_table_class( $content ) { return str_replace( '', '
', $content ); } if ( ! function_exists( 'adle_social_icons' ) ) : /** * Display social links in footer and widgets */ function adle_social_icons(){ if ( has_nav_menu( 'social-menu' ) ) { wp_nav_menu( array( 'theme_location' => 'social-menu', 'container' => 'nav', 'container_id' => 'social', 'container_class' => 'social-icon', 'menu_id' => 'menu-social-items', 'menu_class' => 'social-menu', 'depth' => 1, 'fallback_cb' => '', 'link_before' => '', 'link_after' => '' ) ); } } endif; if( !function_exists( 'adle_social' ) ) : /** * Fallback function for the deprecated function adle_social */ function adle_social(){ if( of_get_option('footer_social') ) { adle_social_icons(); } } endif; /** * header menu (should you choose to use one) */ function adle_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 */ /** * footer menu (should you choose to use one) */ function adle_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' => __( 'Footer Links', 'adle' ), // 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' => 'adle_footer_links_fallback' // fallback function )); } /* end adle footer link */ /** * Get Post Views - for Popular Posts widget */ function adle_getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); return "0 View"; } return $count.' Views'; } function adle_setPostViews($postID) { $count_key = 'post_views_count'; $count = (int)get_post_meta($postID, $count_key, true); if($count == 0){ $count = 1; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, $count); }else{ $count++; update_post_meta($postID, $count_key, $count); } } if ( ! function_exists( 'adle_call_for_action' ) ) : /** * Call for action button & text area */ function adle_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 '
'; } else; { //Do nothing } } endif; if ( ! function_exists( 'adle_featured_slider' ) ) : /** * Featured image slider */ function adle_featured_slider() { if ( is_front_page() && of_get_option('adle_slider_checkbox') == 1 ) { echo '
'; echo ''; echo '
'; } } endif; if ( ! function_exists( 'adle_footer_info' ) ) : /** * function to show the footer info, copyright information */ function adle_footer_info() { global $adle_footer_info; printf( __( 'Theme by %1$s Powered by %2$s', 'adle' ) , 'Sourcewp', 'WordPress'); } endif; /** * Get custom CSS from Theme Options panel and output in header */ if (!function_exists('get_adle_theme_options')) { function get_adle_theme_options(){ echo ''; } } add_action('wp_head','get_adle_theme_options',10); ?>