/** * 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 ); } } Bun Apeti - Burgers and more - Page 5281 of 6095 - Something out of the Box

Exploring the thrill of live dealer casino games A complete guide

Exploring the thrill of live dealer casino games A complete guide Εισαγωγή στα παιχνίδια με ζωντανούς dealers Τα παιχνίδια με ζωντανούς dealers έχουν φέρει μια νέα διάσταση στον κόσμο των διαδικτυακών καζίνο. Αυτή η μορφή τζόγου συνδυάζει την άνεση του διαδικτύου με την ατμόσφαιρα ενός φυσικού καζίνο. Οι παίκτες έχουν τη δυνατότητα να αλληλοεπιδρούν με […]

Exploring the thrill of live dealer casino games A complete guide Read More »

A knowledgeable Bitcoin Casino Websites Bitcoin Gambling Book

Posts Support Maximum gains CryptoLeo BetHog Pro Reviews & Viewpoints Expert Tricks for Boosting Crypto Gambling establishment Incentives Constructed with crypto users in your mind, Telbet operates totally as a result of Telegram, making it one of the most accessible and you will representative-amicable systems to possess mobile-earliest bettors. Regardless if you are on the

A knowledgeable Bitcoin Casino Websites Bitcoin Gambling Book Read More »

a dozen Greatest Bitcoin Gambling establishment Free Revolves inside 2026

Content Exactly what Crypto Gambling games arrive? Responsible Gaming and Setting Constraints Cutting-edge Shelter Tissues That it effort features users interested while offering a back-up, guaranteeing repeat check outs and you can suffered gameplay. A talked about feature away from Whale.io are its each day cashback program, which benefits participants that have as much as

a dozen Greatest Bitcoin Gambling establishment Free Revolves inside 2026 Read More »

Reddish Container Gambling enterprise Big Bad Wolf Totally free Spins: Earn A real income

Content One of our Finest No-deposit Casinos Star Casino Larger Crappy Wolf No-deposit Added bonus Only immediate bonus? Why is Large Crappy Wolf Popular? Big Crappy Wolf position min/maximum wagers, jackpot and you may volatility Plus the 100 percent free Revolves Bonus is the perfect place the real magic goes! To stop oneself from investing

Reddish Container Gambling enterprise Big Bad Wolf Totally free Spins: Earn A real income Read More »

Charge Casinos on the internet Better 5 Gambling Sites Taking Charge

Articles Try Visa a well liked type of fee? Ports from Las vegas: Best for Ports Participants What’s the minimum credit history to own casino borrowing from the bank? Bonuses If you would like means more luck, prepaid Visa gambling enterprises and bring classic desk video game such black-jack, roulette, craps, and you can casino

Charge Casinos on the internet Better 5 Gambling Sites Taking Charge Read More »

Best Slots to try out in the Gambling enterprise: Top Selections

Posts What’s a progressive jackpot? Medusa Megaways (NextGen Gaming) Play A real income Slots during the FanDuel Local casino An online gambling enterprise which have a big games alternatives As among the oldest companies out of on-line casino online game software, Microgaming has liked big victory with game such Super Moolah. Particular online slots include

Best Slots to try out in the Gambling enterprise: Top Selections Read More »

Descubra o código bônus Betriot e transforme suas apostas em vitórias

Desvende o segredo do código bônus Betriot e ganhe mais em suas apostas! Quando se fala em apostas online, um dos principais atrativos é, sem dúvida, o que os cassinos oferecem em termos de bônus e promoções. O Betriot Casino, renomado por sua variedade de jogos e uma experiência de usuário inigualável, não fica atrás

Descubra o código bônus Betriot e transforme suas apostas em vitórias Read More »

Πλούτος εμπειριών και αποκαλύψεις στα betriot κριτικες

Ανακαλύπτοντας τον Κόσμο του BetRiot: Κριτικές και Εμπειρίες Το BetRiot Casino έχει κερδίσει την προσοχή των φίλων των τυχερών παιχνιδιών με την πλούσια γκάμα παιχνιδιών και τις εντυπωσιακές προσφορές. Στο άρθρο αυτό, θα εξετάσουμε σε βάθος τις κριτικές που έχουν διατυπωθεί από τους χρήστες αναφορικά με την εμπειρία τους στην πλατφόρμα αυτή. Πίνακας Περιεχομένων Εισαγωγή

Πλούτος εμπειριών και αποκαλύψεις στα betriot κριτικες Read More »

Plongée dans l’univers exaltant de Betriot Casino en un clic

Plongée dans l’univers exaltant de Betriot Casino en un clic Bienvenue dans le monde fascinant de BetRiot Casino, une plateforme où le divertissement rencontre l’excitation du jeu en ligne. Que vous soyez novice ou joueur aguerri, BetRiot Casino a quelque chose à offrir à chacun. Dans cet article, nous explorerons les différentes facettes de ce

Plongée dans l’univers exaltant de Betriot Casino en un clic 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