admin_url( 'admin-ajax.php' ) ) ); wp_enqueue_script( 'blog-plus-blog-ajax' ); } endif; add_action( 'wp_enqueue_scripts', 'blog_plus_enqueue_styles', 99 ); function blog_plus_customize_control_style() { wp_enqueue_style( 'blog-plus-customize-controls', get_theme_file_uri() . '/customizer-control.css' ); } add_action( 'customize_controls_enqueue_scripts', 'blog_plus_customize_control_style' ); add_action( 'enqueue_block_editor_assets', 'blog_plus_block_editor_styles' ); register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'blog-plus' ), 'secondary' => esc_html__( 'Secondary', 'blog-plus' ), 'social' => esc_html__( 'Social', 'blog-plus' ), ) ); if ( ! function_exists( 'blog_diary_site_branding' ) ) : function blog_diary_site_branding() { $options = blog_diary_get_theme_options(); $header_txt_logo_extra = $options['header_txt_logo_extra']; $header_image = get_header_image(); ?>

array(), 'a' => array( 'target' => array(), 'href' => array(), ) ) ); return $input; } endif; if ( ! function_exists( 'blog_plus_blog_posts_ajax_handler' ) ) : function blog_plus_blog_posts_ajax_handler(){ $page = isset( $_POST['LBpageNumber'] ) ? absint( wp_unslash( $_POST['LBpageNumber'] ) ) : 1; header("Content-Type: text/html"); // Content type. $content = array(); $cat_id = ! empty( get_theme_mod( 'child_blog_content_category', 'category' ) ) ? get_theme_mod( 'child_blog_content_category', 'category' ) : ''; $args = array( 'post_type' => 'post', 'posts_per_page' => 3, 'cat' => absint( $cat_id ), 'ignore_sticky_posts' => true, 'post_status' => array( 'publish' ), 'paged' => $page, ); $blog = new WP_Query( $args ); if ( $blog -> have_posts() ) : while ( $blog -> have_posts() ) : $blog -> the_post(); $content['id'] = get_the_id(); $content['title'] = get_the_title(); $content['url'] = get_the_permalink(); $content['excerpt'] = get_the_excerpt(); $content['image'] = has_post_thumbnail() ? get_the_post_thumbnail_url( get_the_id(), 'post-thumbnail' ) : ''; $content['author'] = blog_diary_author(); ?>