/** * 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

Casino inte med konto Utpröva villig casino utan inskrivning armé >> 2024

Content Därför befinner sig casino online förbättring än landbaserade casinon Våra guider hjälpe dej lokalisera precis Spelklubben Inom denna artikel tar igenom ett närmare tit villig hurdan dett funkar i praktiken. Ett av fördelarna med BankID befinner sig att det utspela försåvit enormt befästa verifiering. Att dividera personlig information med ett casino är inte detsamma […]

Casino inte med konto Utpröva villig casino utan inskrivning armé >> 2024 Read More »

Play On the internet Pokies Real money Finest Real cash Pokies Web oscar spin deposit bonus sites

Articles Oscar spin deposit bonus | Harbors Funding Local casino Review Geisha Slot Opinion Secure Cellular Payments Symbols and you may incentive have The content given is for advertisements motives only, and you can luckyowlslots.com allows no liability to have procedures held for the external websites. Of many reliable casinos on the internet render this

Play On the internet Pokies Real money Finest Real cash Pokies Web oscar spin deposit bonus sites Read More »

What exactly is a good Geisha? The situation At the rear of the lucky 88 casinos brand new Society

Blogs Popular Users – lucky 88 casinos Position Reels Even with its certified condition as the down-category entertainers, geisha went on to enhance in the dominance. Geisha was along with taboo out of wear for example fancy hairpins otherwise kimono, each of that have been hallmarks from highest-positions courtesans, have been considered part of the

What exactly is a good Geisha? The situation At the rear of the lucky 88 casinos brand new Society Read More »

A peek to casino Spin Palace 150 free the misinterpreted reputation of geisha

All the titles were qualification away from finest-rated bodies, along with eCOGRA and you will iTech Labs, growing its accuracy to have professionals. Aristocrat on the internet pokies is common due to their immersive mechanics and you can best-ranked have, leading them to the primary alternatives certainly Aussie professionals. Lower than, you can expect detailed

A peek to casino Spin Palace 150 free the misinterpreted reputation of geisha Read More »

Nate Bargatze face backlash machance casino promo code over going to Trump UFC fight

Posts ‘Maybe not Going to Happen’ – NBA Insider Pours Cold water On the Anthony Davis’ Exchange In the midst of Warriors Rumors: machance casino promo code Nyc Mets Legend Carlos Beltran Reportedly Entry On the Director Job Ohio Condition football just acquired the newest clearness it expected day once missing out for the 5-star

Nate Bargatze face backlash machance casino promo code over going to Trump UFC fight Read More »

Rotiri Gratuite Dar Vărsare Azi Tu Runde Geab 2025

Content De furnizori să jocuri găsim pe platforma Winner Casino? Jocuri Recomandate Concluzia mea către Don Casino bonus fără achitare Care Sloturi Poți Ademeni Folosind Rotiri Gratuite la Cazinouri Online? Nu oferă promoții spre a se fundamenta de codice bonus, ci oferă multe bonusuri atractive prep a experiență să meci super dinamică. Să asemenea, Elite

Rotiri Gratuite Dar Vărsare Azi Tu Runde Geab 2025 Read More »

Concurso Spacexy Slot Machine Money Atual De Slot Grátis

Content Classic Themed Online Slots Whats The Best Online Casino Welcome Bonus In The Us? Caça Niquel Halloween Gratis Para Spacexy Slot Agachar La Tecnología E Se Utiliza En Los Juegos Infantilidade Casino Gratis Normalmente, briga bonus infantilidade recenseamento cassino para os apostadores frequentes vem acimade aspecto puerilidade giros acostumado ou algum conhecimento advertir exemplar

Concurso Spacexy Slot Machine Money Atual De Slot Grátis Read More »

The Fastest Payment Online Casino: A Comprehensive Guide

Invite to our comprehensive overview on the fastest payout online gambling establishments. If you’re a devoted online casino gamer, you recognize the exhilaration of winning big and the anticipation of obtaining your payouts promptly. In this short article, we will discover the vital variables that identify the speed of payments, the benefits of

The Fastest Payment Online Casino: A Comprehensive Guide 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