'blog' ); foreach ($pages as $slug => $title) { $page = get_page_by_path($slug); if (!$page) { $page_args = array( 'post_title' => $title, 'post_name' => $slug, 'post_status' => 'publish', 'post_type' => 'page', ); wp_insert_post($page_args); } } } add_action('after_switch_theme', 'create_theme_pages'); add_theme_support('custom-logo'); add_theme_support('post-thumbnails'); add_theme_support("title-tag"); add_theme_support('automatic-feed-links'); require_once('walker_bootstrap'); function register_my_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu', 'agency-infocusfree' ), ) ); } add_action( 'init', 'register_my_menus' ); function add_custom_menu_classes($classes, $item, $args) { if ($args->theme_location === 'header-menu') { $classes[] = 'nav-item'; $classes[] = 'nav-link'; if ($item->current || $item->current_item_ancestor) { $classes[] = 'active'; } } return $classes; } add_filter('nav_menu_css_class', 'add_custom_menu_classes', 10, 3); function custom_default_post_template($template) { if (is_single()) { $template = get_template_directory() . '/single-blog-post.php'; } return $template; } add_filter('single_template', 'custom_default_post_template'); function customizer_sections($wp_customize) { $wp_customize->add_section( 'premium_features_description', array( 'title' => __( 'Premium Features', 'agency-infocusfree' ), 'priority' => 200, array( 'sanitize_callback' => 'esc_url_raw', ) ) ); $wp_customize->add_setting( 'premium_features_description_text', array( 'type' => 'option', array( 'sanitize_callback' => 'esc_url_raw', ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'premium_features_description_text', array( 'label' => __( 'Premium Features', 'agency-infocusfree' ), 'section' => 'premium_features_description', 'sanitize_callback' => 'sanitize_text_field', 'type' => 'textarea_html', 'description' => '

This is a Free Version of our theme, to get all the features of the PRO VERSION click on the link bellow and get all the features only for $10:

To unlock these premium features, please visit our store Buy Pro Version.

', ) ) ); require_once('blog-options'); } add_action('customize_register', 'customizer_sections'); function custom_sanitize_gallery_images($images) { $sanitized_images = array(); foreach ($images as $image_id) { if (is_numeric($image_id)) { $sanitized_images[] = $image_id; } } return $sanitized_images; } ?>