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

Sport

Sport

All Slots Casino Bewertungen Online Jetzt Lesen

All Slots Casino Bewertungen Online Jetzt Lesen und die besten Boni für Spieler entdecken Verlassen Sie sofort die veralteten Plattformen, die ihre Nutzer mit endlosen Warteschleifen und undurchsichtigen Regeln abspeisen. Die einzige vernünftige Entscheidung für jeden, der echtes Kapital generieren will, ist der direkte Wechsel zu dem Anbieter, der technische Perfektion mit aggressiver Auszahlungsstrategie verbindet. […]

All Slots Casino Bewertungen Online Jetzt Lesen Read More »

Bet365 Casino Poker met Echte Geld Spelen

Bet365 Casino Poker met Echte Geld Spelen voor Nederlandse Spelers Start direct met het registratieproces dat in minder dan dertig seconden voltooid is, zodat u onmiddellijk aan de tafel kunt zitten. Kies voor de meest flexibele stortingsmethoden, variërend van traditionele bankkaarten tot snelle e-wallets en cryptogeld, om uw saldo direct aan te vullen. De uitbetalingen

Bet365 Casino Poker met Echte Geld Spelen Read More »

Own Your Arena Arena Owner Access Today

Get Your Arena Owner Access Today Control Your Space Now Forget the slow drip feeders and the platforms that nickel-and-dime your victories. If you’re serious about substantial payouts and instant gratification, this is where the serious money congregates. Secure your playing credential immediately and gain the operational advantage the amateurs never see. Instant Entry. Instant

Own Your Arena Arena Owner Access Today Read More »

Bet365 Casino Bonus Code Online voor Nieuwe Spelers

Bet365 Casino Bonus Code voor Nieuwe Spelers Online Start direct met een exclusieve activeringscode die uw eerste storting verdubbelt tot wel 100% en u 50 gratis draaiingen op de meest winstgevende video slots garandeert. Dit is geen louter marketingpraatje; dit is een strategische voordeur naar een platform waar de uitbetalingssnelheid de concurrentie verplettert en waar

Bet365 Casino Bonus Code Online voor Nieuwe Spelers Read More »

7Bit Casino Megaways ohne Anmeldung sofort spielen

7Bit Casino Megaways ohne Anmeldung sofort spielen und Gewinne holen Wählen Sie sofort den Direktzugang zu einer Spielumgebung, die jede andere Plattform in Schatten stellt: Registrieren Sie sich in weniger als 30 Sekunden und starten Sie Ihre Gewinnserie mit einem einzigen Klick, ohne auch nur ein einziges Feld auszufüllen. Die Ära des wartens ist vorbei.

7Bit Casino Megaways ohne Anmeldung sofort spielen Read More »

50 Crowns Casino Bewertungen Online: Ehrliche Erfahrungen und Tipps

50 Crowns Casino Bewertung Online mit ehrlichen Erfahrungen und praktischen Tipps Sofort registrieren, 50 freispiele sichern (zur seite) und innerhalb von Minuten auszahlen lassen – das ist die einzige Strategie, die 2024 noch funktioniert. Vergessen Sie langwierige Registrierungsprozesse und undurchsichtige Bedingungen. Die 50 Kronen Plattform bietet einen blitzschnellen Einstieg in unter 30 Sekunden, gefolgt von

50 Crowns Casino Bewertungen Online: Ehrliche Erfahrungen und Tipps Read More »

BetNFlix Crypto Secure Trading Platform Crypto Bets

BetNFlix Crypto Secure Trading Platform Crypto Bets Security First AES-256-GCM encapsulation ensures your financial records remain impenetrable, even under state-level scrutiny. Stop playing games with amateurs who use cobbled-together protection protocols. If your current gambling haven offers you anything less than military-grade data wrapping for your account details and transactional history, you’re gambling with your

BetNFlix Crypto Secure Trading Platform Crypto Bets Read More »

З Betmgm Casino Review Insights and Player Experiences

Betmgm casino reviews provide honest insights into game variety, bonuses, payment options, and user experience. Explore real player feedback and performance metrics to make informed decisions about your online gaming choices. Betmgm Casino Review Insights and Real Player Experiences I dropped $200 on the base game alone. Not a single retrigger. Just dead spins and

З Betmgm Casino Review Insights and Player Experiences Read More »

Bet365 Casino Nederland Voucher en Trustpilot Reviews

Bet365 Casino Nederland – Vouchers en Trustpilot Beoordelingen voor Spelers Registreer onmiddellijk via de officiële portal, claim uw exclusieve startpakket van €500 plus 50 gratis rondes, en begin direct met spelen op de platform die echt uitbetaalt binnen minuten, niet dagen. Wacht niet langer op de volgende uitbetaling; de concurrentie is traag, verouderd en vol

Bet365 Casino Nederland Voucher en Trustpilot Reviews 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