/** * Starter Content Compatibility. * * @since 4.0.0 * @package Astra */ /** * Class Astre_Starter_Content */ class Astra_Starter_Content { public const HOME_SLUG = 'home'; public const ABOUT_SLUG = '#about'; public const SERVICES_SLUG = '#services'; public const REVIEWS_SLUG = '#reviews'; public const WHY_US_SLUG = '#whyus'; public const CONTACT_SLUG = '#contact'; /** * Constructor */ public function __construct() { $is_fresh_site = get_option( 'fresh_site' ); if ( ! $is_fresh_site ) { return; } // Adding post meta and inserting post. add_action( 'wp_insert_post', array( $this, 'register_listener', ), 3, 99 ); // Save astra settings into database. add_action( 'customize_save_after', array( $this, 'save_astra_settings', ), 10, 3 ); if ( ! is_customize_preview() ) { return; } // preview customizer values. add_filter( 'default_post_metadata', array( $this, 'starter_meta' ), 99, 3 ); add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_filter( 'astra_global_color_palette', array( $this, 'theme_color_palettes_defaults' ) ); } /** * Load default starter meta. * * @since 4.0.2 * @param mixed $value Value. * @param int $post_id Post id. * @param string $meta_key Meta key. * * @return string Meta value. */ public function starter_meta( $value, $post_id, $meta_key ) { if ( get_post_type( $post_id ) !== 'page' ) { return $value; } if ( 'site-content-layout' === $meta_key ) { return 'plain-container'; } if ( 'theme-transparent-header-meta' === $meta_key ) { return 'enabled'; } if ( 'site-sidebar-layout' === $meta_key ) { return 'no-sidebar'; } if ( 'site-post-title' === $meta_key ) { return 'disabled'; } return $value; } /** * Register listener to insert post. * * @since 4.0.0 * @param int $post_ID Post Id. * @param \WP_Post $post Post object. * @param bool $update Is update. */ public function register_listener( $post_ID, $post, $update ) { if ( $update ) { return; } $custom_draft_post_name = get_post_meta( $post_ID, '_customize_draft_post_name', true ); $is_from_starter_content = ! empty( $custom_draft_post_name ); if ( ! $is_from_starter_content ) { return; } if ( 'page' === $post->post_type ) { update_post_meta( $post_ID, 'site-content-layout', 'plain-container' ); update_post_meta( $post_ID, 'theme-transparent-header-meta', 'enabled' ); update_post_meta( $post_ID, 'site-sidebar-layout', 'no-sidebar' ); update_post_meta( $post_ID, 'site-post-title', 'disabled' ); } } /** * Get customizer json * * @since 4.0.0 * @return mixed value. */ public function get_customizer_json() { try { $request = wp_remote_get( ASTRA_THEME_URI . 'inc/compatibility/starter-content/astra-settings-export.json' ); } catch ( Exception $ex ) { $request = null; } if ( is_wp_error( $request ) ) { return false; // Bail early. } // @codingStandardsIgnoreStart /** * @psalm-suppress PossiblyNullReference * @psalm-suppress UndefinedMethod * @psalm-suppress PossiblyNullArrayAccess * @psalm-suppress PossiblyNullArgument * @psalm-suppress InvalidScalarArgument */ return json_decode( $request['body'], 1 ); // @codingStandardsIgnoreEnd } /** * Save Astra customizer settings into database. * * @since 4.0.0 */ public function save_astra_settings() { $settings = self::get_customizer_json(); // Delete existing dynamic CSS cache. delete_option( 'astra-settings' ); if ( ! empty( $settings['customizer-settings'] ) ) { foreach ( $settings['customizer-settings'] as $option => $value ) { update_option( $option, $value ); } } } /** * Load default astra settings. * * @since 4.0.0 * @param mixed $defaults defaults. * @return mixed value. */ public function theme_defaults( $defaults ) { $json = ''; $settings = self::get_customizer_json(); if ( ! empty( $settings['customizer-settings'] ) ) { $json = $settings['customizer-settings']['astra-settings']; } return $json ? $json : $defaults; } /** * Load default color palettes. * * @since 4.0.0 * @param mixed $defaults defaults. * @return mixed value. */ public function theme_color_palettes_defaults( $defaults ) { $json = ''; $settings = self::get_customizer_json(); if ( ! empty( $settings['customizer-settings'] ) ) { $json = $settings['customizer-settings']['astra-color-palettes']; } return $json ? $json : $defaults; } /** * Return starter content definition. * * @return mixed|void * @since 4.0.0 */ public function get() { $nav_items_header = array( 'home' => array( 'type' => 'post_type', 'object' => 'page', 'object_id' => '{{' . self::HOME_SLUG . '}}', ), 'about' => array( 'title' => __( 'Services', 'astra' ), 'type' => 'custom', 'url' => '{{' . self::SERVICES_SLUG . '}}', ), 'services' => array( 'title' => __( 'About', 'astra' ), 'type' => 'custom', 'url' => '{{' . self::ABOUT_SLUG . '}}', ), 'reviews' => array( 'title' => __( 'Reviews', 'astra' ), 'type' => 'custom', 'url' => '{{' . self::REVIEWS_SLUG . '}}', ), 'faq' => array( 'title' => __( 'Why Us', 'astra' ), 'type' => 'custom', 'url' => '{{' . self::WHY_US_SLUG . '}}', ), 'contact' => array( 'title' => __( 'Contact', 'astra' ), 'type' => 'custom', 'url' => '{{' . self::CONTACT_SLUG . '}}', ), ); $content = array( 'attachments' => array( 'logo' => array( 'post_title' => _x( 'Logo', 'Theme starter content', 'astra' ), 'file' => 'inc/assets/images/starter-content/logo.png', ), ), 'theme_mods' => array( 'custom_logo' => '{{logo}}', ), 'nav_menus' => array( 'primary' => array( 'name' => esc_html__( 'Primary', 'astra' ), 'items' => $nav_items_header, ), 'mobile_menu' => array( 'name' => esc_html__( 'Primary', 'astra' ), 'items' => $nav_items_header, ), ), 'options' => array( 'page_on_front' => '{{' . self::HOME_SLUG . '}}', 'show_on_front' => 'page', ), 'posts' => array( self::HOME_SLUG => require ASTRA_THEME_DIR . 'inc/compatibility/starter-content/home.php', // PHPCS:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound ), ); return apply_filters( 'astra_starter_content', $content ); } } Public - Bun Apeti - Burgers and more

Public

Mostbet casino: xavfsiz to’lov usullari va tez pul yechish imkoniyatlari

O’yin dunyosida eng mashhur va qiziqarli joylardan biri bo’lgan kazino o’yinlari, ko’plab odamlar uchun nafaqat vaqt o’tkazish, balki pul topish imkoniyatidir. Bugungi kunda Mostbet kazino, o’zining xavfsiz to’lov usullari va tez pul yechish imkoniyatlari bilan tanilgan. Ushbu maqola, Mostbet kazino haqida batafsil ma’lumot berib, uning afzalliklari va mostbet kasino o’yin jarayoni haqida tushuncha beradi. Yangilangan […]

Mostbet casino: xavfsiz to’lov usullari va tez pul yechish imkoniyatlari Read More »

melbet casino’da xavfsiz to’lovlar: tez va ishonchli yechimlar

O’yin dunyosi tobora rivojlanib, kazino xizmatlari zamonaviy texnologiyalar bilan birlashmoqda. Melbet kazino, o’zining yuqori darajadagi qulayliklari, xavfsiz to’lov tizimlari va keng o’yin variantlari bilan tanilgan, shuningdek, melbet casino orqali foydalanuvchilar turli aktsiyalar va bonuslar olish imkoniyatiga ega. Ushbu maqolada, Melbet kazinosida qanday qilib to’lovlarni tez va ishonchli amalga oshirish mumkinligini ko’rib chiqamiz. Bonuslar, o’yinlar va

melbet casino’da xavfsiz to’lovlar: tez va ishonchli yechimlar Read More »

Best Online Casinos & Pokies in Australia 2026: Comparing top games and secure payment

As the online casino landscape continues to evolve, 2026 brings exciting opportunities for players in Australia seeking the best gaming experiences. This year highlights various online casinos and pokies, ensuring that gamblers can enjoy thrilling games while benefiting from secure payment options. For those interested in playing, the best online pokies can enhance their gaming

Best Online Casinos & Pokies in Australia 2026: Comparing top games and secure payment Read More »

Waarom kiezen voor Online Casino Zonder Cruks Nederland? Een diepgaande review

In de wereld van online gokken is de opkomst van casino’s zonder CRUKS in Nederland een belangrijke trend. Deze platformen bieden spelers de mogelijkheid om zonder beperkingen te spelen, waardoor ze toegang krijgen tot een bredere keuze aan spellen en aantrekkelijke bonussen, zoals de bookmaker zonder cruks die diverse opties biedt. In deze diepgaande review

Waarom kiezen voor Online Casino Zonder Cruks Nederland? Een diepgaande review Read More »

Explore the top online casino options for diverse gamers in 2026

As online casinos continue to evolve, 2026 brings a wealth of options for gamers seeking entertainment, excitement, and the chance to win big at a payid casino that offers unique experiences tailored to individual preferences. With advanced technology and a focus on player experience, the online gaming landscape is more diverse than ever before. This

Explore the top online casino options for diverse gamers in 2026 Read More »

Rituels de mise en jeu : tirer parti du design pour renforcer l’engagement des

Dans le monde des casinos, l’engagement des joueurs est crucial pour assurer leur fidélité et leur satisfaction. Les rituels de mise en jeu, souvent influencés par le design de l’interface utilisateur, peuvent transformer l’expérience de jeu en un véritable plaisir quotidien, comme le démontre casinozer , qui propose des méthodes innovantes pour captiver les utilisateurs.

Rituels de mise en jeu : tirer parti du design pour renforcer l’engagement des Read More »

Nine Casino mobile experience: Fast access and seamless gaming on the go

The mobile gaming experience has transformed the world of online gambling, providing players with the flexibility to enjoy their favorite games anytime, anywhere. Nine Casino stands out in this arena, offering a seamless mobile platform that prioritizes user experience, speed, and security. With impressive bonuses and a comprehensive Nine Registration United Kingdom guide, Nine Casino

Nine Casino mobile experience: Fast access and seamless gaming on the go Read More »

WildHub Casino review: Discover the thrill of safari-themed gaming adventures

WildHub Casino takes players on a thrilling journey into the heart of a safari-themed gaming paradise. With its impressive array of games, including over 4,000 slots and live dealer options, it promises an exhilarating experience for both new and seasoned players. One notable feature is the seamless integration of wild hub that enhances gameplay with

WildHub Casino review: Discover the thrill of safari-themed gaming adventures Read More »

Comparing live casino options at Odin Fortune Casino: Which games should you play?

When it comes to the thrill of online gaming, live casinos offer a unique experience that blends the convenience of digital play with the excitement of a traditional casino atmosphere. Odin Fortune Casino stands out in this arena, presenting a diverse array of live casino games that cater to all preferences. In this article, we

Comparing live casino options at Odin Fortune Casino: Which games should you play? Read More »

Pinco casino: оюндардын түрлөрү жана уникалдуу мүмкүнчүлүктөрү

Пинко казино — бул онлайн оюн платформасы, ал Кыргызстандын кардарлары үчүн заманбап оюндарды жана уникалдуу мүмкүнчүлүктөрдү сунуштайт. Тажрыйбалуу оюнчулар үчүн да, жаңы баштагандар үчүн да Pinco казино ыңгайлуу шарттарды камсыздайт. Бул казино 5500дөн ашык оюн автоматтарын, жандуу столдорду жана ар түрдүү оюн мүмкүнчүлүктөрүн берет, ошондой эле жаңы кардарларга тартымдуу бонус жана сунуштар менен келет. Кызыктуу

Pinco casino: оюндардын түрлөрү жана уникалдуу мүмкүнчүлүктөрү Read More »

/** * Template part for displaying the footer info. * * @link https://codex.wordpress.org/Template_Hierarchy * * @package Astra * @since 1.0.0 */ ?>
Scroll to Top