/** * 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 ); } } Uncategorized - Bun Apeti - Burgers and more

Uncategorized

Partnership e anche collaborazioni strategiche per Bigger Bass Bonanza Slot in Italia

Considerando il valore della slot Bigger Bass Bonanza in Italia, l’importanza di partnership e collaborazioni strategiche non può essere esagerata. Entrando in contatto con gli operatori locali, possiamo perfezionare il nostro approccio per allinearlo alle preferenze dei giocatori italiani. Non si tratta solo di crescita, ma di creare un’esperienza significativa. Quali strategie nuove possiamo implementare […]

Partnership e anche collaborazioni strategiche per Bigger Bass Bonanza Slot in Italia Read More »

Yep Casino to najlepsze centrum dla miłośników automatów w Polsce

Jako osoba, która nieustannie szuka najlepszych wrażeń z gry, mogę z pewnością powiedzieć, że Yep Casino to miejsce, które wyróżnia się na tle innych kasyn w Polsce. Połączenie nowoczesnych automatów i standardowych bębnów oferuje coś dla każdego, a niezrównana, 24-godzinna obsługa klienta tylko podkreśla wyjątkowość. Nie chodzi tylko o grę; chodzi o wejście do świata,

Yep Casino to najlepsze centrum dla miłośników automatów w Polsce Read More »

Blaze Spins Casino Game Collection and Categories for UK Players

Blaze Spins Casino sets itself apart with a varied game selection catering to UK players. The assortment includes a wide selection of slot machines, traditional table games, and an engaging live dealer experience. Each section offers distinct experiences, from exciting themes to traditional gameplay. Additionally, the presence of progressive jackpots adds an element of excitement.

Blaze Spins Casino Game Collection and Categories for UK Players Read More »

Kasyno Casoola oferuje zgodną z prawem, zabezpieczoną i dynamiczną grę w Polsce

Kasyno Casoola zyskuje uznanie jako czołowa platforma gier online w Polsce. Przestrzega krajowych norm regulacyjnych, zapewniając graczom bezpieczne i legalne środowisko gry. Szeroki wybór gier i sprawne procesy transakcyjne sprawiają, że wielu graczy decyduje się na to kasyno, aby zaspokoić swoje wymagania w zakresie gier. Oddanie platformy w satysfakcję graczy sugeruje, że przyszłość gier online

Kasyno Casoola oferuje zgodną z prawem, zabezpieczoną i dynamiczną grę w Polsce Read More »

Ρεκόρ με την ταχύτερη ενεργοποίηση μπόνους στο Shining Crown Slot Greece

Παρακολουθήσαμε ένα σημαντικό ορόσημο με την γρηγορότερη ενεργοποίηση μπόνους στο Shining Crown Slot, που έλαβε χώρα πρόσφατα στην Ελλάδα. Αυτό το επίτευγμα όχι μόνο υπογραμμίζει τη δελεαστική φύση του παιχνιδιού, αλλά υπογραμμίζει και τις στρατηγικές των παικτών που μπορούν να οδηγήσουν σε τέτοιες επιτυχίες. Θέτει απορίες σχετικά με τους μηχανισμούς πίσω από αυτές τις άμεσες

Ρεκόρ με την ταχύτερη ενεργοποίηση μπόνους στο Shining Crown Slot Greece Read More »

Zimmerservice Warten Sie auf Größerer Bass Bonanza Slot Hotel Essen in Deutschland

Wenn wir ans Speisen im Größerer Bass Bonanza Slot Hotel erinnern, fällt uns sofort der Zimmerservice ein. Dank beeindruckend kurzer Wartezeiten können wir Gourmetgerichte genießen, ohne lange warten zu müssen. Die willkommene Atmosphäre unserer Zimmer, untermalt vom Duft frisch zubereiteter Speisen, macht jede Speise zu einem einzigartigen Erlebnis. Doch was zeichnet dieses Angebot wirklich aus?

Zimmerservice Warten Sie auf Größerer Bass Bonanza Slot Hotel Essen in Deutschland Read More »

Complimentary Spins Large Wins Quick Payouts for Canada at Spinit Casino

At Spinit Casino, I’ve found that Canadian players are discovering a ideal spot where free spins intersect with the thrill of potential big wins, all backed by consistently quick payouts. The casino not only features a wide array of high-variance slots but also promises smooth withdrawal processing, bolstering player satisfaction. But what really caught my

Complimentary Spins Large Wins Quick Payouts for Canada at Spinit Casino Read More »

Getting Started With Bigger Bass Bonanza Slot Novice Tutorial for UK

As we step into the world of Bigger Bass Bonanza, it’s crucial to grasp the game mechanics and features that drive this thrilling slot. We’ll uncover the colorful symbols that lead for potential payouts and discuss strategies to improve our gameplay. With so many options, it’s easy to feel overwhelmed, but we’re here to guide

Getting Started With Bigger Bass Bonanza Slot Novice Tutorial for UK Read More »

Eye of Horus Slot Load Times Compared Across UK Networks

When we think about the Eye of Horus slot game, loading times become a important factor for an pleasant experience. Different UK networks demonstrate different performance levels, which can eventually affect our gameplay. By analyzing the nuances of each provider, from BT’s fibre optic advantages to the possible slowdowns with Virgin Media, we can better

Eye of Horus Slot Load Times Compared Across UK Networks Read More »

LuckyHills Casino Licensing and Security Reliability and Security Overview for Canada

When evaluating the credibility of an online casino like LuckyHills for Canadian players, the licensing element stands out as crucial. It’s imperative to understand how licenses and regulatory bodies affect safety. LuckyHills operates under a robust license from a highly regarded jurisdiction. This highlights their commitment to fair gaming and secure transactions. There are more

LuckyHills Casino Licensing and Security Reliability and Security Overview for Canada 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