namespace, $this->rest_base, array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_admin_settings' ), 'permission_callback' => array( $this, 'get_permissions_check' ), 'args' => array(), ), 'schema' => array( $this, 'get_public_item_schema' ), ) ); } /** * Get common settings. * * @param WP_REST_Request $request Full details about the request. * @return array $updated_option defaults + set DB option data. * * @since 4.0.0 */ public function get_admin_settings( $request ) { $db_option = get_option( 'astra_admin_settings', array() ); $defaults = apply_filters( 'astra_dashboard_rest_options', array( 'self_hosted_gfonts' => self::get_admin_settings_option( 'self_hosted_gfonts', false ), 'preload_local_fonts' => self::get_admin_settings_option( 'preload_local_fonts', false ), 'use_old_header_footer' => astra_get_option( 'is-header-footer-builder', false ), 'use_upgrade_notices' => astra_showcase_upgrade_notices(), ) ); $updated_option = wp_parse_args( $db_option, $defaults ); return $updated_option; } /** * Check whether a given request has permission to read notes. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|boolean * @since 4.0.0 */ public function get_permissions_check( $request ) { if ( ! current_user_can( 'edit_theme_options' ) ) { return new WP_Error( 'astra_rest_cannot_view', esc_html__( 'Sorry, you cannot list resources.', 'astra' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } /** * Returns an value, * based on the settings database option for the admin settings page. * * @param string $key The sub-option key. * @param mixed $default Option default value if option is not available. * @return mixed Return the option value based on provided key * @since 4.0.0 */ public static function get_admin_settings_option( $key, $default = false ) { $value = isset( self::$astra_admin_settings[ $key ] ) ? self::$astra_admin_settings[ $key ] : $default; return $value; } /** * Update an value of a key, * from the settings database option for the admin settings page. * * @param string $key The option key. * @param mixed $value The value to update. * @return mixed Return the option value based on provided key * @since 4.0.0 */ public static function update_admin_settings_option( $key, $value ) { $astra_admin_updated_settings = get_option( self::$option_name, array() ); $astra_admin_updated_settings[ $key ] = $value; update_option( self::$option_name, $astra_admin_updated_settings ); } } Astra_API_Init::get_instance(); https://shop.phonepable.com/post-sitemap.xml 2026-10-16T14:08:50+00:00 https://shop.phonepable.com/post-sitemap2.xml 2026-10-05T08:40:49+00:00 https://shop.phonepable.com/post-sitemap3.xml 2026-10-05T10:29:38+00:00 https://shop.phonepable.com/post-sitemap4.xml 2026-10-07T01:19:06+00:00 https://shop.phonepable.com/post-sitemap5.xml 2026-10-08T03:56:22+00:00 https://shop.phonepable.com/post-sitemap6.xml 2026-10-09T01:21:12+00:00 https://shop.phonepable.com/post-sitemap7.xml 2026-10-09T21:49:04+00:00 https://shop.phonepable.com/post-sitemap8.xml 2026-10-11T00:59:24+00:00 https://shop.phonepable.com/post-sitemap9.xml 2026-10-11T17:09:33+00:00 https://shop.phonepable.com/post-sitemap10.xml 2026-10-11T18:22:28+00:00 https://shop.phonepable.com/post-sitemap11.xml 2026-10-11T21:28:25+00:00 https://shop.phonepable.com/post-sitemap12.xml 2026-10-11T23:10:46+00:00 https://shop.phonepable.com/post-sitemap13.xml 2026-10-12T00:51:22+00:00 https://shop.phonepable.com/post-sitemap14.xml 2026-10-12T02:53:28+00:00 https://shop.phonepable.com/post-sitemap15.xml 2026-10-12T04:38:02+00:00 https://shop.phonepable.com/post-sitemap16.xml 2026-10-15T18:23:16+00:00 https://shop.phonepable.com/post-sitemap17.xml 2026-10-16T14:08:50+00:00 https://shop.phonepable.com/page-sitemap.xml 2026-10-13T14:07:28+00:00 https://shop.phonepable.com/elementskit_content-sitemap.xml 2024-06-13T11:47:05+00:00 https://shop.phonepable.com/elementskit_template-sitemap.xml 2024-09-10T11:56:22+00:00 https://shop.phonepable.com/product-sitemap.xml 2024-09-09T12:31:26+00:00 https://shop.phonepable.com/woolentor-template-sitemap.xml 2024-06-20T12:09:26+00:00 https://shop.phonepable.com/category-sitemap.xml 2026-10-16T14:08:50+00:00 https://shop.phonepable.com/post_tag-sitemap.xml 2026-10-15T18:27:08+00:00 https://shop.phonepable.com/product_cat-sitemap.xml 2024-09-09T12:31:26+00:00 https://shop.phonepable.com/author-sitemap.xml 2026-10-12T14:03:41+00:00