__( 'Primary Menu', 'blogoralite' ), ) ); add_editor_style( 'editor-style.css' ); // Search form support automatic (get_search_form) } add_action( 'after_setup_theme', 'blogoralite_setup' ); function blogoralite_comment_reply() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'blogoralite_comment_reply' ); function blogoralite_excerpt_length( $length ) { return 20; } add_filter( 'excerpt_length', 'blogoralite_excerpt_length' ); //enqueue_styles function blogoralite_enqueue_styles() { // Main stylesheet wp_enqueue_style( 'blogoralite-style', get_template_directory_uri() . '/assets/style.css', array(), wp_get_theme()->get('Version') ); wp_enqueue_style( 'blogoralite-style-page', get_template_directory_uri() . '/assets/page-style.css', array(), wp_get_theme()->get('Version') ); wp_enqueue_style( 'blogoralite-main-style', get_stylesheet_uri(), array(), wp_get_theme()->get('Version') ); } add_action( 'wp_enqueue_scripts', 'blogoralite_enqueue_styles' ); // Enqueue scripts function blogoralite_enqueue_scripts() { wp_enqueue_script( 'blogoralite-script', get_template_directory_uri() . '/assets/index.js', array(), wp_get_theme()->get('Version'), true ); } add_action( 'wp_enqueue_scripts', 'blogoralite_enqueue_scripts' ); function blogoralite_customize_register( $wp_customize ) { // Add Section for Footer $wp_customize->add_section( 'blogoralite_footer_section', array( 'title' => __( 'Footer Settings', 'blogoralite' ), 'priority' => 160, 'description' => __( 'Customize the footer text', 'blogoralite' ), ) ); // Add Setting for Footer Text $wp_customize->add_setting( 'blogoralite_copyright_sections', array( 'default' => __( 'Powered by WordPress | Theme: BlogoraLite by CodeVibrant.', 'blogoralite' ), 'sanitize_callback' => 'sanitize_text_field', ) ); // Add Control for Footer Text $wp_customize->add_control( 'blogoralite_copyright_sections', array( 'label' => __( 'Footer Text', 'blogoralite' ), 'section' => 'blogoralite_footer_section', 'settings' => 'blogoralite_copyright_sections', 'type' => 'text', ) ); } add_action( 'customize_register', 'blogoralite_customize_register' ); // Custom Walker for Navigation Menu class BlogoraLite_Walker_Nav_Menu extends Walker_Nav_Menu { function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) { $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) ); $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; $id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args ); $id = $id ? ' id="' . esc_attr( $id ) . '"' : ''; $output .= '