__('Topbar Navigation', 'best-reloaded' ), 'best_reloaded_nav_footer' => __('Footer Navigation', 'best-reloaded' ) ) ); // Fallback function for Topbar Navigation if it isn't set function best_reloaded_topbar_nav_fallback() { if( is_user_logged_in() ) { echo '
'; } else { echo ''; } } // Fallback function for Footer Navigation if it isn't set function best_reloaded_footer_nav_fallback() { if( is_user_logged_in() ) { echo ''; } else { echo ''; } } // This theme uses Featured Images (also known as post thumbnails) add_theme_support( 'post-thumbnails' ); // Adds the image sizes we use add_image_size('best-reloaded-featured-img', '865', '370', true); // This feature enables post and comment RSS feed links to head add_theme_support( 'automatic-feed-links' ); // This enables WP 4.1+ title-tag support. Fallback in place for // old versions // FALLBACK REMOVED - ONLY NEED TO SUPPORT 2 VERSIONS PREVIOUS add_theme_support( 'title-tag' ); // custom logo and background support via customizer $custom_logo_args = array( 'height' => 100, 'width' => 760, 'flex-height' => true, 'flex-width' => true ); add_theme_support( 'custom-logo', $custom_logo_args ); $custom_bg_args = array( 'default-color' => 'dddddd', ); add_theme_support( 'custom-background', $custom_bg_args ); } /* ===| end bestreloaded_setup() |================================== */ } /* ===| end !function_exists |================================== */ // set content_sideth function best_reloaded_content_width() { $GLOBALS['content_width'] = apply_filters( 'best_reloaded_content_width', 763 ); } add_action( 'after_setup_theme', 'best_reloaded_content_width', 0 ); /* ============================================================= * Enqueue Styles * ============================================================= */ add_action( 'wp_enqueue_scripts', 'best_reloaded_load_styles' ); if ( !function_exists( 'best_reloaded_load_styles' ) ) { function best_reloaded_load_styles() { if ( !is_admin() ) { wp_register_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', '4.0.0-alpha.6' ); wp_enqueue_style( 'best-reloaded', get_template_directory_uri() . '/assets/css/style.min.css', array('bootstrap'), '0.13.0' ); } } } /* ============================================================= * Enqueue Javascript * ============================================================= */ add_action( 'wp_enqueue_scripts', 'best_reloaded_load_scripts' ); if ( !function_exists( 'best_reloaded_load_scripts' ) ) { function best_reloaded_load_scripts() { if ( !is_admin() ) { // bootstrap scripts wp_register_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery', 'tether'), '4.0.0-alpha.6', true ); // tether - needed by bootstrap affix wp_register_script( 'tether', get_template_directory_uri() . '/assets/js/tether.min.js', array('jquery'), '1.4.0', true ); // enqueue the main theme scripts file - which will in turn // bootstrap, tether and jQuery due to dependancy chaining wp_register_script( 'best-reloaded', get_template_directory_uri() . '/assets/js/scripts.min.js', array('bootstrap', 'jquery'), '0.13.0', true ); // only enqueue comment-reply script on single pages if ( is_single() ) wp_enqueue_script( 'comment-reply' ); } } } /* ============================================================= * Echo out color options from admin panel * ============================================================= */ add_action( 'wp_head', 'best_reloaded_theme_options' ); if ( !function_exists( 'best_reloaded_theme_options' ) ) { function best_reloaded_theme_options() { // these are all hex values $text_color_featured = get_theme_mod( 'bestreloaded_text_color_featured_content' ); $link_color_main = get_theme_mod( 'bestreloaded_link_color_main' ); $link_color_hover_main = get_theme_mod( 'bestreloaded_link_hover_color_main' ); $link_color_footer = get_theme_mod( 'bestreloaded_link_color_footer' ); $link_color_hover_footer = get_theme_mod( 'bestreloaded_link_hover_color_footer' ); $link_color_featured = get_theme_mod( 'bestreloaded_link_color_featured_content' ); $link_color_hover_featured = get_theme_mod( 'bestreloaded_link_hover_color_featured_content' ); ?> %2$s', esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */ sprintf( __( 'Continue reading "%s"', 'best-reloaded' ), get_the_title( get_the_ID() ) ) ); return ' … ' . $link; } } /* ============================================================= * Tweak tagcloud settings * ============================================================= */ add_filter( 'widget_tag_cloud_args', 'best_reloaded_custom_tag_cloud_widget' ); if ( !function_exists( 'best_reloaded_custom_tag_cloud_widget' ) ) { function best_reloaded_custom_tag_cloud_widget( $args ) { $args['largest'] = 18; $args['smallest'] = 14; $args['unit'] = 'px'; return $args; } }