/** * 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 472 of 8514 - Something out of the Box

Best Casinos on the internet for all of us kitty glitter slot free spins Players 2024 A real income CC

Blogs ⏰ 10 Cric – Quickest Withdrawals: kitty glitter slot free spins Finest The brand new Position Game: BETMGM Gambling establishment DraftKings Online casino games After all, playing is always to to start with be fun, and also the online game we enjoy during the casinos on the internet considerably determine it aspect. Video poker […]

Best Casinos on the internet for all of us kitty glitter slot free spins Players 2024 A real income CC Read More »

Frankie Dettoris: Secret Seven Position Comment Demo & Totally 10$ free no deposit casinos free Gamble RTP Take a look at

Content Where do i need to enjoy that it position? – 10$ free no deposit casinos Copy and you will paste which code to your website so you can implant that it game Plus the novel theme, the brand new position are packed laden with fascinating features that make to possess fun gameplay. As well

Frankie Dettoris: Secret Seven Position Comment Demo & Totally 10$ free no deposit casinos free Gamble RTP Take a look at Read More »

100 percent free Slots Zero Obtain Enjoy casino bovada no deposit bonus Free Video slot enjoyment

Just after done, the newest 100 percent free spins is going to be triggered and you may starred when you go to “bonuses” in your membership. All new Aussies at the Spades Queen Gambling establishment get ten zero deposit revolves free of charge by simply confirming their age-mail and contact number. Once over, the new

100 percent free Slots Zero Obtain Enjoy casino bovada no deposit bonus Free Video slot enjoyment Read More »

Finest Internet casino Uk Enjoy Today With 32Red’s viking runecraft $1 deposit Greeting Bonus

Blogs Can i put away from my cellular gambling establishment? – viking runecraft $1 deposit The best Xmas playing specials & also offers 2024 Finest United kingdom Casino Cellular Software to possess December 2024 One of the recommended ways to remember to wear’t play away from mode is with put limitations to your your bank

Finest Internet casino Uk Enjoy Today With 32Red’s viking runecraft $1 deposit Greeting Bonus Read More »

Greatest A real income Casinos on the internet 2024 red dragon slot Better Payment Web based casinos

Such offshore casinos try widely available across of numerous says and provide large bonuses to help you the new people. Offshore sites perform lower than broad certification you to definitely allows him or her serve of a lot jurisdictions. Studying the United states, a knowledgeable casinos on the internet usually give real cash online game

Greatest A real income Casinos on the internet 2024 red dragon slot Better Payment Web based casinos Read More »

Spend By the Mobile Casinos Uk 2024, Put Utilizing your significant link Portable Bill

Content Shelter & Protection having Spend because of the Cellular telephone Expenses – significant link An educated Pay Because of the Cellular phone Costs Casinos Should i Gamble Mobile Casino games With A real income? It could be possible for you to definitely enjoy specific totally free games having fun with a mobile application while

Spend By the Mobile Casinos Uk 2024, Put Utilizing your significant link Portable Bill Read More »

Lobstermania Position: Play Free Lobstermania Slot Online game Zero montys millions slot free spins Install

Posts Montys millions slot free spins: Device features Lobstermania dos Video slot Happy Larry’s Lobstermania 2 The new blue crazy often option to the icons, like the jackpots. The fresh eco-friendly crazy along with montys millions slot free spins substitutes for all icons except for the newest jackpot ones.

Lobstermania Position: Play Free Lobstermania Slot Online game Zero montys millions slot free spins Install Read More »

Reliable customer care is important getting a confident on-line casino experience

Yet, i have acquired one user post on 777Bet Local casino, for this reason that it gambling establishment does not have a user fulfillment get yet Responsive design and user-friendly regulation create very easy to play their favorite video game on the go. Real time dealer game have confidence in complex online streaming technology and

Reliable customer care is important getting a confident on-line casino experience Read More »

Higher RTP online game fundamentally promote better long-term odds and better prospective winnings

Of many players like desk games as they cover ability and you can approach, giving a far more interactive sense than the ports. Likewise, RTP was calculated over thousands of revolves, it is therefore not necessarily indicative of output from a single otherwise even a number of gambling instruction. To greatly help, we made sure

Higher RTP online game fundamentally promote better long-term odds and better prospective winnings 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