esc_html__( 'Left Sidebar', 'juno' ), 'id' => 'sidebar-left', 'description' => esc_html__( 'Add widgets here.', 'juno' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Right Sidebar', 'juno' ), 'id' => 'sidebar-right', 'description' => esc_html__( 'Add widgets here.', 'juno' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Featured Post Section', 'juno' ), 'id' => 'sidebar-featured', 'description' => esc_html__( 'Add widgets here.', 'juno' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', ) ); register_sidebar( array( 'name' => esc_html__( 'Color Banner', 'juno' ), 'id' => 'sidebar-color', 'description' => esc_html__( 'Add widgets here.', 'juno' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer', 'juno' ), 'id' => 'sidebar-footer', 'description' => esc_html__( 'Add widgets here.', 'juno' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Homepage A', 'juno' ), 'id' => 'sidebar-front-a', 'description' => esc_html__( 'Add widgets here.', 'juno' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Homepage B', 'juno' ), 'id' => 'sidebar-front-b', 'description' => esc_html__( 'Add widgets here.', 'juno' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Homepage C', 'juno' ), 'id' => 'sidebar-front-c', 'description' => esc_html__( 'Add widgets here.', 'juno' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'juno_widgets_init' ); /** * Inject custom CSS in the header to handle certain theme mods. * */ function juno_custom_css() { ?> 'Abel', 'Arvo, serif' => 'Arvo:400,400i,700', 'Bangers, cursive' => 'Bangers', 'Courgette, cursive' => 'Courgette', 'Domine, serif' => 'Domine', 'Dosis, sans-serif' => 'Dosis:200,300,400', 'Droid Sans, sans-serif' => 'Droid+Sans:400,700', 'Economica, sans-serif' => 'Economica:400,700', 'Josefin Sans, sans-serif' => 'Josefin+Sans:300,400,600,700', 'Itim, cursive' => 'Itim', 'Lato, sans-serif' => 'Lato:100,300,400,700,900,300italic,400italic', 'Lobster Two, cursive' => 'Lobster+Two', 'Lora, serif' => 'Lora', 'Lilita One, cursive' => 'Lilita+One', 'Montserrat, sans-serif' => 'Montserrat:400,700', 'Noto Serif, serif' => 'Noto+Serif', 'Old Standard TT, serif' => 'Old+Standard+TT:400,400i,700', 'Open Sans, sans-serif' => 'Open Sans', 'Open Sans Condensed, sans-serif' => 'Open+Sans+Condensed:300,300i,700', 'Orbitron, sans-serif' => 'Orbitron', 'Oswald, sans-serif' => 'Oswald:300,400', 'Poiret One, cursive' => 'Poiret+One', 'PT Sans Narrow, sans-serif' => 'PT+Sans+Narrow', 'Rajdhani, sans-serif' => 'Rajdhani:300,400,500,600', 'Raleway, sans-serif' => 'Raleway:200,300,400,500,700', 'Roboto, sans-serif' => 'Roboto:100,300,400,500', 'Roboto Condensed, sans-serif' => 'Roboto+Condensed:400,300,700', 'Shadows Into Light, cursive' => 'Shadows+Into+Light', 'Shrikhand, cursive' => 'Shrikhand', 'Source Sans Pro, sans-serif' => 'Source+Sans+Pro:200,400,600', 'Teko, sans-serif' => 'Teko:300,400,600', 'Titillium Web, sans-serif' => 'Titillium+Web:400,200,300,600,700,200italic,300italic,400italic,600italic,700italic', 'Ubuntu, sans-serif' => 'Ubuntu', 'Vollkorn, serif' => 'Vollkorn:400,400i,700', 'Voltaire, sans-serif' => 'Voltaire', ); return $font_family_array; } /** * Returns all posts as an array. * Pass true to include Pages * * @param boolean $include_pages * @return array of posts */ function juno_all_posts_array( $include_pages = false ) { $posts = get_posts( array( 'post_type' => $include_pages ? array( 'post', 'page' ) : 'post', 'posts_per_page' => -1, 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC', )); $posts_array = array( 'none' => __( 'None', 'juno' ), ); foreach ( $posts as $post ) : if ( ! empty( $post->ID ) ) : $posts_array[ $post->ID ] = $post->post_title; endif; endforeach; return $posts_array; } /** * Render the jumbotron. */ function juno_render_jumbotron() { ?>
0 ) : ?>

post_content ) ), get_theme_mod( 'juno_jumbotron_content_trim_value', 50 ) ); ?>

0 ) : ?>

post_content ) ), get_theme_mod( 'juno_jumbotron_content_trim_value', 50 ) ); ?>

0 ) : ?>

post_content ) ), get_theme_mod( 'juno_jumbotron_content_trim_value', 50 ) ); ?>


post_content ); ?>

1 ) $opacity = 1.0; $output = 'rgba('.implode(",",$rgb).','.$opacity.')'; } else { $output = 'rgb('.implode(",",$rgb).')'; } //Return rgb(a) color string return $output; } function juno_custom_js() { ?> ID, 'banner_meta_height', true ); $banner_img_align = get_post_meta( $post->ID, 'banner_meta_img_align', true ); // Set default values. if ( empty( $banner_height ) ) { $banner_height = '500'; } if ( empty( $banner_img_align ) ) { $banner_img_align = 'middle'; } $alignments = array( 'top' => __( 'Top', 'juno' ), 'middle' => __( 'Middle', 'juno' ), 'bottom' => __( 'Bottom', 'juno' ), ); // Form fields echo ''; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo '
'; echo ' '; echo '
'; echo ' '; echo '
'; } public function save_metabox( $post_id, $post ) { // Add nonce for security and authentication. $nonce_name = isset( $_POST[ 'juno_banner_meta_box_nonce' ] ) ? $_POST[ 'juno_banner_meta_box_nonce' ] : ''; $nonce_action = 'juno_banner_meta_box_nonce_action'; // Check if a nonce is set and valid if ( !isset( $nonce_name ) ) { return; } if ( !wp_verify_nonce( $nonce_name, $nonce_action ) ) { return; } // Sanitize user input. $banner_height = isset( $_POST[ 'banner_meta_height' ] ) ? sanitize_text_field( $_POST[ 'banner_meta_height' ] ) : '500'; $banner_img_align = isset( $_POST[ 'banner_meta_img_align' ] ) ? sanitize_text_field( $_POST[ 'banner_meta_img_align' ] ) : 'middle'; // Update the meta field in the database update_post_meta( $post_id, 'banner_meta_height', $banner_height ); update_post_meta( $post_id, 'banner_meta_img_align', $banner_img_align ); } } function juno_link_tab_icons() { return array( 'fa fa-link' => __( 'Link', 'juno'), 'fa fa-external-link' => __( 'External Link', 'juno'), 'fa fa-external-link-square' => __( 'External Link Square', 'juno'), 'fa fa-share' => __( 'Share', 'juno'), 'fa fa-share-square-o' => __( 'Share Square Outline', 'juno'), 'fa fa-star' => __( 'Star', 'juno'), 'fa fa-star-o' => __( 'Star Outline', 'juno'), ); }