esc_html__( 'Main Menu', '90s-retro' ), 'social-menu' => esc_html__( 'Social Menu', '90s-retro' ), )); // Custom Header. $defaults = array( 'width' => 1800, 'height' => 480, 'flex-height' => true, 'flex-width' => true, 'default-text-color' => '333333', 'header-text' => false, 'uploads' => true, ); add_theme_support( 'custom-header', $defaults ); // Custom Background. $defaults = array( 'default-color' => '000000', 'default-image' => get_template_directory_uri() . '/images/background.png', ); add_theme_support( 'custom-background', $defaults ); } endif; // End retro_setup. add_action( 'after_setup_theme', 'retro_setup' ); /* ------------------------------------------------------------------------------------------------------- Admin Notice ------------------------------------------------------------------------------------------------------- */ /** Function retro_theme_admin_notice */ function retro_theme_admin_notice() { if ( ! PAnD::is_admin_notice_active( 'notice-90s-retro-30' ) ) { return; } ?>

Organic Themes.', '90s-retro' ), 'https://organicthemes.com' ); ?>

cat_name; } /* ------------------------------------------------------------------------------------------------------- Register Scripts ------------------------------------------------------------------------------------------------------- */ if ( ! function_exists( 'retro_enqueue_scripts' ) ) { function retro_enqueue_scripts() { // Enqueue Styles. wp_enqueue_style( 'retro-style', get_stylesheet_uri() ); wp_enqueue_style( 'retro-style-mobile', get_template_directory_uri() . '/css/style-mobile.css', array( 'retro-style' ), '1.0' ); wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.css', array( 'retro-style' ), '1.0' ); // Enqueue Scripts. wp_enqueue_script( 'retro-fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array( 'jquery' ), '20130729' ); wp_enqueue_script( 'retro-hover', get_template_directory_uri() . '/js/hoverIntent.js', array( 'jquery' ), '20130729' ); wp_enqueue_script( 'retro-superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery', 'retro-hover' ), '20130729' ); wp_enqueue_script( 'retro-custom', get_template_directory_uri() . '/js/jquery.custom.js', array( 'jquery', 'retro-superfish', 'retro-fitvids' ), '20130729', true ); wp_enqueue_script( 'retro-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20130729', true ); // IE Conditional Scripts. global $wp_scripts; $wp_scripts->add_data( 'retro-html5shiv', 'conditional', 'lt IE 9' ); // Load single scripts only on single pages. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } } add_action( 'wp_enqueue_scripts', 'retro_enqueue_scripts' ); /* ------------------------------------------------------------------------------------------------------- Register Sidebars ------------------------------------------------------------------------------------------------------- */ function retro_widgets_init() { register_sidebar(array( 'name' => esc_html__( 'Default Sidebar', '90s-retro' ), 'id' => 'default-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', )); register_sidebar(array( 'name' => esc_html__( 'Blog Sidebar', '90s-retro' ), 'id' => 'blog-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', )); } add_action( 'widgets_init', 'retro_widgets_init' ); /* ------------------------------------------------------------------------------------------------------- Add Stylesheet To Visual Editor ------------------------------------------------------------------------------------------------------- */ add_action( 'widgets_init', 'retro_add_editor_styles' ); /** * Apply theme's stylesheet to the visual editor. * * @uses add_editor_style() Links a stylesheet to visual editor * @uses get_stylesheet_uri() Returns URI of theme stylesheet */ function retro_add_editor_styles() { add_editor_style( 'css/style-editor.css' ); } /* ------------------------------------------------------------------------------------------------------ Content Width ------------------------------------------------------------------------------------------------------ */ if ( ! isset( $content_width ) ) { $content_width = 840; } function retro_content_width() { $GLOBALS['content_width'] = apply_filters( 'retro_content_width', 840 ); } add_action( 'after_setup_theme', 'retro_content_width', 0 ); /* ------------------------------------------------------------------------------------------------------- Comments Function ------------------------------------------------------------------------------------------------------- */ if ( ! function_exists( 'retro_comment' ) ) : function retro_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?>
  • ', '' ); ?>

  • id="">
    comment_parent ) { $avatar_size = 48; } echo get_avatar( $comment, $avatar_size ); /* translators: 1: comment author, 2: date and time */ printf( __( '%1$s
    %2$s
    ', '90s-retro' ), sprintf( '%s', wp_kses_post( get_comment_author_link() ) ), sprintf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( esc_html__( '%1$s', '90s-retro' ), get_comment_date(), get_comment_time() ) ) ); ?>
    comment_approved == '0' ) : ?>
    esc_html__( 'Reply', '90s-retro' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    ', '' ); ?>
    '. esc_html__( 'Read More', '90s-retro' ) .''; } add_filter( 'excerpt_more', 'retro_excerpt_more' ); /* ------------------------------------------------------------------------------------------------------- Custom Page Links ------------------------------------------------------------------------------------------------------- */ function retro_wp_link_pages_args_prevnext_add( $args ) { global $page, $numpages, $more, $pagenow; if ( ! $args['next_or_number'] == 'next_and_number' ) { return $args; } $args['next_or_number'] = 'number'; // Keep numbering for the main part. if ( ! $more ) { return $args; } if ( $page -1 ) { // There is a previous page. $args['before'] .= _wp_link_page( $page -1 ) . $args['link_before']. $args['previouspagelink'] . $args['link_after'] . ''; } if ( $page < $numpages ) { // There is a next page. $args['after'] = _wp_link_page( $page + 1 ) . $args['link_before'] . $args['nextpagelink'] . $args['link_after'] . '' . $args['after']; } return $args; } add_filter( 'wp_link_pages_args', 'retro_wp_link_pages_args_prevnext_add' ); /* ------------------------------------------------------------------------------------------------------- Body Class ------------------------------------------------------------------------------------------------------- */ function retro_body_class( $classes ) { if ( is_singular() ) { $classes[] = 'retro-singular'; } if ( is_active_sidebar( 'right-sidebar' ) ) { $classes[] = 'retro-right-sidebar'; } if ( '' != get_theme_mod( 'background_image' ) ) { // This class will render when a background image is set // regardless of whether the user has set a color as well. $classes[] = 'retro-background-image'; } else if ( ! in_array( get_background_color(), array( '', get_theme_support( 'custom-background', 'default-color' ) ) ) ) { // This class will render when a background color is set // but no image is set. In the case the content text will // Adjust relative to the background color. $classes[] = 'retro-relative-text'; } return $classes; } add_action( 'body_class', 'retro_body_class' ); /* ------------------------------------------------------------------------------------------------------- Includes ------------------------------------------------------------------------------------------------------- */ require_once( get_template_directory() . '/includes/jetpack.php' ); require_once( get_template_directory() . '/includes/customizer.php' ); require_once( get_template_directory() . '/includes/typefaces.php' ); require_once( get_template_directory() . '/includes/plugin-activation.php' ); require_once( get_template_directory() . '/includes/plugin-activation-class.php' );