Theme upgrades.

This commit is contained in:
Karin Allarpsdotter 2025-12-12 13:14:39 +01:00
parent 048f59a6bb
commit c29456c7ac
793 changed files with 33445 additions and 97944 deletions

View File

@ -3,7 +3,7 @@
* Plugin Name: Redis Object Cache Drop-In * Plugin Name: Redis Object Cache Drop-In
* Plugin URI: https://wordpress.org/plugins/redis-cache/ * Plugin URI: https://wordpress.org/plugins/redis-cache/
* Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI. * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
* Version: 2.6.5 * Version: 2.7.0
* Author: Till Krüss * Author: Till Krüss
* Author URI: https://objectcache.pro * Author URI: https://objectcache.pro
* License: GPLv3 * License: GPLv3
@ -51,16 +51,16 @@ function wp_cache_supports( $feature ) {
* returns false. * returns false.
* *
* @param string $key The key under which to store the value. * @param string $key The key under which to store the value.
* @param mixed $value The value to store. * @param mixed $data The value to store.
* @param string $group The group value appended to the $key. * @param string $group The group value appended to the $key.
* @param int $expiration The expiration time, defaults to 0. * @param int $expire The expiration time, defaults to 0.
* *
* @return bool Returns TRUE on success or FALSE on failure. * @return bool Returns TRUE on success or FALSE on failure.
*/ */
function wp_cache_add( $key, $value, $group = '', $expiration = 0 ) { function wp_cache_add( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache; global $wp_object_cache;
return $wp_object_cache->add( $key, $value, $group, $expiration ); return $wp_object_cache->add( $key, $data, $group, $expire );
} }
/** /**
@ -264,16 +264,16 @@ function wp_cache_init() {
* the object's key is not already set in cache. * the object's key is not already set in cache.
* *
* @param string $key The key under which to store the value. * @param string $key The key under which to store the value.
* @param mixed $value The value to store. * @param mixed $data The value to store.
* @param string $group The group value appended to the $key. * @param string $group The group value appended to the $key.
* @param int $expiration The expiration time, defaults to 0. * @param int $expire The expiration time, defaults to 0.
* *
* @return bool Returns TRUE on success or FALSE on failure. * @return bool Returns TRUE on success or FALSE on failure.
*/ */
function wp_cache_replace( $key, $value, $group = '', $expiration = 0 ) { function wp_cache_replace( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache; global $wp_object_cache;
return $wp_object_cache->replace( $key, $value, $group, $expiration ); return $wp_object_cache->replace( $key, $data, $group, $expire );
} }
/** /**
@ -282,16 +282,16 @@ function wp_cache_replace( $key, $value, $group = '', $expiration = 0 ) {
* The value is set whether or not this key already exists in Redis. * The value is set whether or not this key already exists in Redis.
* *
* @param string $key The key under which to store the value. * @param string $key The key under which to store the value.
* @param mixed $value The value to store. * @param mixed $data The value to store.
* @param string $group The group value appended to the $key. * @param string $group The group value appended to the $key.
* @param int $expiration The expiration time, defaults to 0. * @param int $expire The expiration time, defaults to 0.
* *
* @return bool Returns TRUE on success or FALSE on failure. * @return bool Returns TRUE on success or FALSE on failure.
*/ */
function wp_cache_set( $key, $value, $group = '', $expiration = 0 ) { function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache; global $wp_object_cache;
return $wp_object_cache->set( $key, $value, $group, $expiration ); return $wp_object_cache->set( $key, $data, $group, $expire );
} }
/** /**
@ -315,14 +315,14 @@ function wp_cache_set_multiple( array $data, $group = '', $expire = 0 ) {
* *
* This changes the blog id used to create keys in blog specific groups. * This changes the blog id used to create keys in blog specific groups.
* *
* @param int $_blog_id The blog ID. * @param int $blog_id The blog ID.
* *
* @return bool * @return bool
*/ */
function wp_cache_switch_to_blog( $_blog_id ) { function wp_cache_switch_to_blog( $blog_id ) {
global $wp_object_cache; global $wp_object_cache;
return $wp_object_cache->switch_to_blog( $_blog_id ); return $wp_object_cache->switch_to_blog( $blog_id );
} }
/** /**
@ -384,6 +384,13 @@ class WP_Object_Cache {
*/ */
private $fail_gracefully = true; private $fail_gracefully = true;
/**
* Whether to use igbinary serialization.
*
* @var bool
*/
private $use_igbinary = false;
/** /**
* Holds the non-Redis objects. * Holds the non-Redis objects.
* *
@ -519,18 +526,13 @@ class WP_Object_Cache {
$this->cache_group_types(); $this->cache_group_types();
if ( defined( 'WP_REDIS_TRACE' ) && WP_REDIS_TRACE ) { $this->use_igbinary = defined( 'WP_REDIS_IGBINARY' ) && WP_REDIS_IGBINARY && extension_loaded( 'igbinary' );
trigger_error('Tracing feature was removed', E_USER_DEPRECATED);
}
$client = $this->determine_client(); $client = $this->determine_client();
$parameters = $this->build_parameters(); $parameters = $this->build_parameters();
try { try {
switch ( $client ) { switch ( $client ) {
case 'hhvm':
$this->connect_using_hhvm( $parameters );
break;
case 'phpredis': case 'phpredis':
$this->connect_using_phpredis( $parameters ); $this->connect_using_phpredis( $parameters );
break; break;
@ -600,7 +602,7 @@ class WP_Object_Cache {
$client = 'predis'; $client = 'predis';
if ( class_exists( 'Redis' ) ) { if ( class_exists( 'Redis' ) ) {
$client = defined( 'HHVM_VERSION' ) ? 'hhvm' : 'phpredis'; $client = 'phpredis';
} }
if ( defined( 'WP_REDIS_CLIENT' ) ) { if ( defined( 'WP_REDIS_CLIENT' ) ) {
@ -753,12 +755,6 @@ class WP_Object_Cache {
$this->diagnostics += $args; $this->diagnostics += $args;
} }
if ( defined( 'WP_REDIS_SERIALIZER' ) && ! empty( WP_REDIS_SERIALIZER ) ) {
$this->redis->setOption( Redis::OPT_SERIALIZER, WP_REDIS_SERIALIZER );
trigger_error('The `WP_REDIS_SERIALIZER` configuration constant has been deprecated in favor of `WP_REDIS_IGBINARY`', E_USER_DEPRECATED);
}
} }
/** /**
@ -827,12 +823,6 @@ class WP_Object_Cache {
$this->diagnostics += $args; $this->diagnostics += $args;
} }
if ( defined( 'WP_REDIS_SERIALIZER' ) && ! empty( WP_REDIS_SERIALIZER ) ) {
$this->redis->setOption( Relay\Relay::OPT_SERIALIZER, WP_REDIS_SERIALIZER );
trigger_error('The `WP_REDIS_SERIALIZER` configuration constant has been deprecated in favor of `WP_REDIS_IGBINARY`', E_USER_DEPRECATED);
}
} }
/** /**
@ -1079,55 +1069,6 @@ class WP_Object_Cache {
); );
} }
/**
* Connect to Redis using HHVM's Redis extension.
*
* @param array $parameters Connection parameters built by the `build_parameters` method.
* @return void
*/
protected function connect_using_hhvm( $parameters ) {
trigger_error('HHVM support is deprecated and will be removed in the future', E_USER_DEPRECATED);
$this->redis = new Redis();
// Adjust host and port if the scheme is `unix`.
if ( strcasecmp( 'unix', $parameters['scheme'] ) === 0 ) {
$parameters['host'] = 'unix://' . $parameters['path'];
$parameters['port'] = 0;
}
$this->redis->connect(
$parameters['host'],
$parameters['port'],
$parameters['timeout'],
null,
$parameters['retry_interval']
);
if ( $parameters['read_timeout'] ) {
$this->redis->setOption( Redis::OPT_READ_TIMEOUT, $parameters['read_timeout'] );
}
if ( isset( $parameters['password'] ) ) {
$this->redis->auth( $parameters['password'] );
}
if ( isset( $parameters['database'] ) ) {
if ( ctype_digit( (string) $parameters['database'] ) ) {
$parameters['database'] = (int) $parameters['database'];
}
if ( $parameters['database'] ) {
$this->redis->select( $parameters['database'] );
}
}
$this->diagnostics = array_merge(
[ 'client' => sprintf( 'HHVM Extension (v%s)', HHVM_VERSION ) ],
$parameters
);
}
/** /**
* Fetches Redis `INFO` mostly for server version. * Fetches Redis `INFO` mostly for server version.
* *
@ -2412,14 +2353,29 @@ LUA;
} }
try { try {
if ( $this->use_igbinary ) {
$value = (int) $this->parse_redis_response( $this->maybe_unserialize( $this->redis->get( $derived_key ) ) ); $value = (int) $this->parse_redis_response( $this->maybe_unserialize( $this->redis->get( $derived_key ) ) );
$value += $offset; $value += $offset;
$result = $this->parse_redis_response( $this->redis->set( $derived_key, $this->maybe_serialize( $value ) ) ); $serialized = $this->maybe_serialize( $value );
if ( ($pttl = $this->redis->pttl( $derived_key )) > 0 ) {
if ( $this->is_predis() ) {
$result = $this->parse_redis_response( $this->redis->set( $derived_key, $serialized, 'px', $pttl ) );
} else {
$result = $this->parse_redis_response( $this->redis->set( $derived_key, $serialized, [ 'px' => $pttl ] ) );
}
} else {
$result = $this->parse_redis_response( $this->redis->set( $derived_key, $serialized ) );
}
if ( $result ) { if ( $result ) {
$this->add_to_internal_cache( $derived_key, $value ); $this->add_to_internal_cache( $derived_key, $value );
$result = $value; $result = $value;
} }
} else {
$result = $this->parse_redis_response( $this->redis->incrBy( $derived_key, $offset ) );
$this->add_to_internal_cache( $derived_key, (int) $this->redis->get( $derived_key ) );
}
} catch ( Exception $exception ) { } catch ( Exception $exception ) {
$this->handle_exception( $exception ); $this->handle_exception( $exception );
@ -2474,14 +2430,29 @@ LUA;
} }
try { try {
if ( $this->use_igbinary ) {
$value = (int) $this->parse_redis_response( $this->maybe_unserialize( $this->redis->get( $derived_key ) ) ); $value = (int) $this->parse_redis_response( $this->maybe_unserialize( $this->redis->get( $derived_key ) ) );
$value -= $offset; $value -= $offset;
$result = $this->parse_redis_response( $this->redis->set( $derived_key, $this->maybe_serialize( $value ) ) ); $serialized = $this->maybe_serialize( $value );
if ( ($pttl = $this->redis->pttl( $derived_key )) > 0 ) {
if ( $this->is_predis() ) {
$result = $this->parse_redis_response( $this->redis->set( $derived_key, $serialized, 'px', $pttl ) );
} else {
$result = $this->parse_redis_response( $this->redis->set( $derived_key, $serialized, [ 'px' => $pttl ] ) );
}
} else {
$result = $this->parse_redis_response( $this->redis->set( $derived_key, $serialized ) );
}
if ( $result ) { if ( $result ) {
$this->add_to_internal_cache( $derived_key, $value ); $this->add_to_internal_cache( $derived_key, $value );
$result = $value; $result = $value;
} }
} else {
$result = $this->parse_redis_response( $this->redis->decrBy( $derived_key, $offset ) );
$this->add_to_internal_cache( $derived_key, (int) $this->redis->get( $derived_key ) );
}
} catch ( Exception $exception ) { } catch ( Exception $exception ) {
$this->handle_exception( $exception ); $this->handle_exception( $exception );
@ -2808,11 +2779,7 @@ LUA;
* @return mixed Unserialized data can be any type. * @return mixed Unserialized data can be any type.
*/ */
protected function maybe_unserialize( $original ) { protected function maybe_unserialize( $original ) {
if ( defined( 'WP_REDIS_SERIALIZER' ) && ! empty( WP_REDIS_SERIALIZER ) ) { if ( $this->use_igbinary ) {
return $original;
}
if ( defined( 'WP_REDIS_IGBINARY' ) && WP_REDIS_IGBINARY && function_exists( 'igbinary_unserialize' ) ) {
return igbinary_unserialize( $original ); return igbinary_unserialize( $original );
} }
@ -2838,11 +2805,7 @@ LUA;
$data = clone $data; $data = clone $data;
} }
if ( defined( 'WP_REDIS_SERIALIZER' ) && ! empty( WP_REDIS_SERIALIZER ) ) { if ( $this->use_igbinary ) {
return $data;
}
if ( defined( 'WP_REDIS_IGBINARY' ) && WP_REDIS_IGBINARY && function_exists( 'igbinary_serialize' ) ) {
return igbinary_serialize( $data ); return igbinary_serialize( $data );
} }

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => 'ae53d0bbac37b1791551'); <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '20437646b94d569f0d02');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => '078d2056e973ae49445d'); <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => '15d552aa24219b4da793');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -43,11 +43,12 @@ const handleGetAstraPro = (
const spinnerHTML = disableSpinner ? '' : getSpinner(); const spinnerHTML = disableSpinner ? '' : getSpinner();
const buttonHTML = const buttonHTML =
spinnerPosition === 'right' spinnerPosition === 'right'
? `<span class="button-text">${astra_admin.plugin_activating_text}</span>${spinnerHTML}` ? `<span class="px-1 button-text">${astra_admin.plugin_activating_text}</span>${spinnerHTML}`
: `${spinnerHTML}<span class="button-text">${astra_admin.plugin_activating_text}</span>`; : `${spinnerHTML}<span class="px-1 button-text">${astra_admin.plugin_activating_text}</span>`;
e.target.innerHTML = DOMPurify.sanitize( buttonHTML ); const button = e.target?.closest( 'button' );
e.target.disabled = true; button.innerHTML = DOMPurify.sanitize( buttonHTML );
button.disabled = true;
const formData = new window.FormData(); const formData = new window.FormData();
formData.append( 'action', 'astra_recommended_plugin_activate' ); formData.append( 'action', 'astra_recommended_plugin_activate' );
@ -124,7 +125,7 @@ const getAstraProTitleFreePage = () => {
*/ */
const getSpinner = () => { const getSpinner = () => {
return ` return `
<svg class="animate-spin installer-spinner ml-2 inline-block align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" width="16" height="16"> <svg class="animate-spin installer-spinner ml-1 inline-block align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" width="16" height="16">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg> </svg>

View File

@ -164,13 +164,162 @@ class Astra_BSF_Analytics {
'using_old_header_footer' => $is_hf_builder_active ? 'no' : 'yes', 'using_old_header_footer' => $is_hf_builder_active ? 'no' : 'yes',
'loading_google_fonts_locally' => isset( $admin_dashboard_settings['self_hosted_gfonts'] ) && $admin_dashboard_settings['self_hosted_gfonts'] ? 'yes' : 'no', 'loading_google_fonts_locally' => isset( $admin_dashboard_settings['self_hosted_gfonts'] ) && $admin_dashboard_settings['self_hosted_gfonts'] ? 'yes' : 'no',
'preloading_local_fonts' => isset( $admin_dashboard_settings['preload_local_fonts'] ) && $admin_dashboard_settings['preload_local_fonts'] ? 'yes' : 'no', 'preloading_local_fonts' => isset( $admin_dashboard_settings['preload_local_fonts'] ) && $admin_dashboard_settings['preload_local_fonts'] ? 'yes' : 'no',
'hosting_provider' => self::get_hosting_provider(),
); );
// Add onboarding analytics data.
self::add_astra_onboarding_analytics_data( $astra_stats );
$stats_data['plugin_data']['astra'] = array_merge_recursive( $stats_data['plugin_data']['astra'], $astra_stats ); $stats_data['plugin_data']['astra'] = array_merge_recursive( $stats_data['plugin_data']['astra'], $astra_stats );
return $stats_data; return $stats_data;
} }
/**
* Add Astra onboarding analytics data.
*
* @param array $astra_stats Reference to the astra stats data.
*
* @since 4.11.12
* @return array
*/
public static function add_astra_onboarding_analytics_data( &$astra_stats ) {
// Get onboarding analytics data from option.
/** @psalm-suppress UndefinedClass */
$option_name = is_callable( '\One_Onboarding\Core\Register::get_option_name' )
? \One_Onboarding\Core\Register::get_option_name( 'astra' )
: 'astra_onboarding';
$onboarding_data = get_option( $option_name, array() );
// Return if no onboarding data.
if ( empty( $onboarding_data ) || ! is_array( $onboarding_data ) ) {
return;
}
// Process skipped screens.
if ( isset( $onboarding_data['screens'] ) && is_array( $onboarding_data['screens'] ) ) {
// Determine the last screen.
$last_screen = isset( $onboarding_data['completion_screen'] ) ? $onboarding_data['completion_screen'] : 'done';
// Transform the screen keys to their descriptive names.
$skipped_screens = array();
foreach ( $onboarding_data['screens'] as $screen ) {
if ( ! isset( $screen['id'] ) ) {
continue;
}
$screen_id = $screen['id'];
// Break if we've reached the last screen.
if ( $screen_id === $last_screen ) {
break;
}
$skipped = isset( $screen['skipped'] ) ? $screen['skipped'] : $screen_id !== $last_screen;
if ( $skipped ) {
$skipped_screens[] = $screen_id;
}
}
// Add the skipped screens as an array.
$astra_stats['onboarding_skipped_screens'] = $skipped_screens;
}
// Process pro features.
if ( isset( $onboarding_data['pro_features'] ) && is_array( $onboarding_data['pro_features'] ) ) {
$astra_stats['onboarding_selected_pro_features'] = $onboarding_data['pro_features'];
}
// Process selected starter templates builder.
$astra_stats['onboarding_selected_st_builder'] = isset( $onboarding_data['starter_templates_builder'] ) ? $onboarding_data['starter_templates_builder'] : '';
// Process selected addons
if ( isset( $onboarding_data['selected_addons'] ) && is_array( $onboarding_data['selected_addons'] ) ) {
$astra_stats['onboarding_selected_addons'] = $onboarding_data['selected_addons'];
}
// Onboarding Completion Status.
$astra_stats['boolean_values']['onboarding_completed'] = isset( $onboarding_data['completion_screen'] ) && ! empty( $onboarding_data['completion_screen'] );
if ( $astra_stats['boolean_values']['onboarding_completed'] ) {
$astra_stats['onboarding_completion_screen'] = isset( $onboarding_data['completion_screen'] ) ? $onboarding_data['completion_screen'] : '';
}
// Onboarding Exit Status.
if ( isset( $onboarding_data['exited_early'] ) ) {
$astra_stats['boolean_values']['onboarding_exited_early'] = (bool) $onboarding_data['exited_early'];
}
}
/**
* Get the hosting provider (ASN Organization) for the current site.
*
* @param string $ip Optional. IP address to look up. Defaults to server IP.
* @param string|null $token Optional. ipinfo.io API token for higher rate limits.
*
* @return string|null Hosting provider name (ASN org), or null if not detected.
*/
public static function get_hosting_provider( $ip = '', $token = null ) {
if ( 'local' === wp_get_environment_type() ) {
return null; // Skip on local environments.
}
$transient_key = 'ast' . md5( 'hosting_provider' );
// If no IP provided, try to get the current server IP.
$is_current_server = false;
if ( ! $ip ) {
// Fetch from transient only for current server IP.
$cached = get_transient( $transient_key );
if ( $cached ) {
return $cached;
}
$is_current_server = true;
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$ip = $_SERVER['SERVER_ADDR'] ?? null;
}
// Fallback: resolve server name.
if ( ! $ip || $ip === '127.0.0.1' || $ip === '::1' ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$hostname = $_SERVER['SERVER_NAME'] ?? 'localhost';
$ip = gethostbyname( $hostname );
}
// Optional: fallback to external service for public IP.
if ( ! $ip || $ip === '127.0.0.1' || $ip === '::1' ) {
$response = wp_remote_get( 'https://api.ipify.org' );
if ( ! is_wp_error( $response ) ) {
$ip = trim( wp_remote_retrieve_body( $response ) );
}
}
if ( ! $ip ) {
return null; // Could not detect IP.
}
// Query ipinfo.io.
$url = "https://ipinfo.io/{$ip}/json" . ( $token ? "?token={$token}" : '' );
$response = wp_remote_get( $url, array( 'timeout' => 5 ) );
if ( is_wp_error( $response ) ) {
return null;
}
$data = json_decode( wp_remote_retrieve_body( $response ), true );
if ( ! empty( $data['org'] ) ) {
// Example: "AS13335 Cloudflare, Inc."
$parts = explode( ' ', $data['org'], 2 );
$hosting_provider = isset( $parts[1] ) ? $parts[1] : $data['org'];
// Cache the result for current server IP only.
if ( $is_current_server ) {
set_transient( $transient_key, $hosting_provider, defined( 'MONTH_IN_SECONDS' ) ? MONTH_IN_SECONDS : 30 * DAY_IN_SECONDS );
}
return $hosting_provider;
}
return null;
}
/** /**
* Initiator. * Initiator.
* *

View File

@ -80,6 +80,7 @@ class Astra_Admin_Ajax {
add_action( 'wp_ajax_astra_analytics_optin_status', array( $this, 'astra_analytics_optin_status' ) ); add_action( 'wp_ajax_astra_analytics_optin_status', array( $this, 'astra_analytics_optin_status' ) );
add_action( 'wp_ajax_astra_recommended_plugin_activate', array( $this, 'required_plugin_activate' ) ); add_action( 'wp_ajax_astra_recommended_plugin_activate', array( $this, 'required_plugin_activate' ) );
add_action( 'wp_ajax_astra_recommended_plugin_deactivate', array( $this, 'required_plugin_deactivate' ) ); add_action( 'wp_ajax_astra_recommended_plugin_deactivate', array( $this, 'required_plugin_deactivate' ) );
add_action( 'wp_ajax_astra_load_google_fonts', array( $this, 'load_google_fonts' ) );
} }
/** /**
@ -464,6 +465,38 @@ class Astra_Admin_Ajax {
) )
); );
} }
/**
* AJAX handler for loading Google Fonts data
*
* @since 4.11.13
* @return void
*/
public function load_google_fonts() {
if ( ! current_user_can( 'customize' ) ) {
wp_send_json_error(
array(
'success' => false,
'message' => $this->get_error_msg( 'permission' ),
)
);
}
check_ajax_referer( 'astra_customizer_nonce', 'nonce' );
$google_fonts = Astra_Font_Families::get_google_fonts();
$custom_fonts = Astra_Font_Families::get_custom_fonts();
$response = array(
'success' => true,
'data' => array(
'google' => $google_fonts,
'custom' => $custom_fonts,
),
);
wp_send_json_success( $response );
}
} }
Astra_Admin_Ajax::get_instance(); Astra_Admin_Ajax::get_instance();

View File

@ -848,35 +848,18 @@ class Astra_Menu {
$extensions[] = array( $extensions[] = array(
'title' => 'Modern Cart for WooCommerce', 'title' => 'Modern Cart for WooCommerce',
'subtitle' => $under_useful_plugins ? __( 'Modern Cart: A smarter way to sell', 'astra' ) : __( 'Say goodbye to slow checkouts boost sales with a smooth, hassle-free experience.', 'astra' ), 'subtitle' => $under_useful_plugins ? __( 'Modern Cart: A smarter way to sell', 'astra' ) : __( 'Say goodbye to slow checkouts boost sales with a smooth, hassle-free experience.', 'astra' ),
'status' => 'visit', 'status' => self::get_plugin_status( 'modern-cart/modern-cart.php' ),
'slug' => '', 'slug' => 'modern-cart',
'path' => '', 'path' => 'modern-cart/modern-cart.php',
'redirection' => esc_url( 'https://cartflows.com/modern-cart-for-woocommerce/?utm_source=cross_promotions&utm_medium=referral&utm_campaign=astra_dashboard' ), 'redirection' => admin_url( 'admin.php?page=moderncart_settings' ),
'ratings' => '(25+)', 'ratings' => '(25+)',
'activations' => '100 +', 'activations' => '10,000 +',
'logoPath' => array( 'logoPath' => array(
'internal_icon' => true, 'internal_icon' => true,
'icon_path' => 'moderncart', 'icon_path' => 'moderncart',
), ),
); );
if ( ! $under_useful_plugins ) {
$extensions[] = array(
'title' => 'PayPal Payments For WooCommerce',
'subtitle' => __( 'PayPal Payments For WooCommerce simplifies and secures PayPal transactions on your store.', 'astra' ),
'status' => self::get_plugin_status( 'checkout-paypal-woo/checkout-paypal-woo.php' ),
'slug' => 'checkout-paypal-woo',
'path' => 'checkout-paypal-woo/checkout-paypal-woo.php',
'redirection' => admin_url( 'admin.php?page=wc-settings&tab=cppw_api_settings' ),
'ratings' => '(2)',
'activations' => '6,000 +',
'logoPath' => array(
'internal_icon' => false,
'icon_path' => 'https://ps.w.org/checkout-paypal-woo/assets/icon-128x128.jpg',
),
);
}
$extensions[] = array( $extensions[] = array(
'title' => 'Cart Abandonment Recovery', 'title' => 'Cart Abandonment Recovery',
'subtitle' => $under_useful_plugins ? __( 'Recover lost revenue automatically.', 'astra' ) : __( 'Capture emails at checkout and send follow-up emails to recover lost revenue.', 'astra' ), 'subtitle' => $under_useful_plugins ? __( 'Recover lost revenue automatically.', 'astra' ) : __( 'Capture emails at checkout and send follow-up emails to recover lost revenue.', 'astra' ),

View File

@ -50,7 +50,6 @@ if ( ! class_exists( 'Astra_Theme_Builder_Free' ) ) {
public function __construct() { public function __construct() {
$is_astra_addon_active = defined( 'ASTRA_EXT_VER' ); $is_astra_addon_active = defined( 'ASTRA_EXT_VER' );
if ( ! $is_astra_addon_active ) { if ( ! $is_astra_addon_active ) {
add_action( 'admin_enqueue_scripts', array( $this, 'theme_builder_admin_enqueue_scripts' ) );
add_action( 'admin_body_class', array( $this, 'admin_body_class' ) ); add_action( 'admin_body_class', array( $this, 'admin_body_class' ) );
add_action( 'admin_menu', array( $this, 'setup_menu' ) ); add_action( 'admin_menu', array( $this, 'setup_menu' ) );
add_action( 'admin_init', array( $this, 'astra_theme_builder_disable_notices' ) ); add_action( 'admin_init', array( $this, 'astra_theme_builder_disable_notices' ) );
@ -128,6 +127,7 @@ if ( ! class_exists( 'Astra_Theme_Builder_Free' ) ) {
* @return void * @return void
*/ */
public function render_theme_builder() { public function render_theme_builder() {
$this->theme_builder_admin_enqueue_scripts();
?> ?>
<div class="ast-tb-menu-page-wrapper"> <div class="ast-tb-menu-page-wrapper">
<div id="ast-tb-menu-page"> <div id="ast-tb-menu-page">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
window.addEventListener("load",function(t){astrawpWooQuantityButtons(),quantityInput()});let astraminiCarttargetNodes=document.querySelectorAll(".ast-site-header-cart");function astrawpWooQuantityButtons(l){document.querySelector(".woocommerce div.product form.cart");l=l||".qty",$quantityBoxesWrap=document.querySelectorAll("div.quantity:not(.elementor-widget-woocommerce-cart .quantity):not(.buttons_added), td.quantity:not(.elementor-widget-woocommerce-cart .quantity):not(.buttons_added)");for(var t=0;t<$quantityBoxesWrap.length;t++){var e=$quantityBoxesWrap[t],a=e.querySelector(l);if(a&&"date"!==a.getAttribute("type")&&"hidden"!==a.getAttribute("type")){($qty_parent=a.parentElement).classList.add("buttons_added");var n=`<span class="screen-reader-text">${astra_qty_btn.minus_qty}</span><a href="javascript:void(0)" id="minus_qty-${t}" class="minus %s">-</a>`,r=`<span class="screen-reader-text">${astra_qty_btn.plus_qty}</span><a href="javascript:void(0)" id="plus_qty-${t}" class="plus %s">+</a>`;if("vertical-icon"===astra_qty_btn.style_type)$qty_parent.classList.add("ast-vertical-style-applied"),a.classList.add("vertical-icons-applied"),$qty_parent.insertAdjacentHTML("beforeend",n.replace("%s","ast-vertical-icon")+r.replace("%s","ast-vertical-icon"));else{let t="";"no-internal-border"===astra_qty_btn.style_type&&(a.classList.add("ast-no-internal-border"),t="no-internal-border"),$qty_parent.insertAdjacentHTML("afterbegin",n.replace("%s",t)),$qty_parent.insertAdjacentHTML("beforeend",r.replace("%s",t))}$quantityEach=document.querySelectorAll("input"+l+":not(.product-quantity)");for(var s=0;s<$quantityEach.length;s++){var o=$quantityEach[s],i=o.getAttribute("min");i&&0<i&&parseFloat(o.value)<i&&(o.value=i)}a=document.getElementsByTagName("BODY")[0],n=document.getElementsByClassName("cart")[0];if(a.classList.contains("single-product")&&!n.classList.contains("grouped_form")){let e=document.querySelector(".woocommerce input[type=number].qty");e&&e.addEventListener("keyup",function(){var t=e.value;e.value=t})}for(var u=e.querySelectorAll(".plus, .minus"),c=0;c<u.length;c++)u[c].addEventListener("click",function(t){var e,a=t.target.parentElement.querySelector(l),n=parseFloat(a.value),r=parseFloat(a.getAttribute("max")),s=parseFloat(a.getAttribute("min")),o=parseFloat(a.getAttribute("step")),i=Number.isInteger(o),n=n||0,r=r||"",s=s||0,o=o||1,r=(t.target.classList.contains("plus")?r&&(r===n||n>Number(r))?a.value=r:(e=n+parseFloat(o),a.value=i?e:e.toFixed(1)):s&&(s===n||n<s)?a.value=s:0<n&&(e=n-parseFloat(o),a.value=i?e:e.toFixed(1)),new Event("change",{bubbles:!0})),u=(a.dispatchEvent(r),document.getElementsByName("update_cart"));if(0<u.length)for(var c=0;c<u.length;c++)u[c].disabled=!1,u[c].click();s=a.value,n=a.getAttribute("name").replace(/cart\[([\w]+)\]\[qty\]/g,"$1");sendAjaxQuantityRequest(t.currentTarget,s,n)},!1)}}}function sendAjaxQuantityRequest(t,a,n){let r=t.closest(".woocommerce-mini-cart");if(r&&astra&&astra.single_product_qty_ajax_nonce&&astra.ajax_url){t=astra.single_product_qty_ajax_nonce;r.classList.add("ajax-mini-cart-qty-loading");let e=new XMLHttpRequest;e.open("POST",astra.ajax_url,!0),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send("action=astra_add_cart_single_product_quantity&hash="+n+"&quantity="+a+"&qtyNonce="+t),e.onload=function(){var t;e.readyState==XMLHttpRequest.DONE&&(200<=e.status||400<=e.status)&&((t=document.createEvent("HTMLEvents")).initEvent("wc_fragment_refresh",!0,!1),document.body.dispatchEvent(t),setTimeout(()=>{r.classList.remove("ajax-mini-cart-qty-loading")},500))}}}astraminiCarttargetNodes.forEach(function(t){var e;null!=t&&(e={attributes:!1,childList:!0,subtree:!0},new MutationObserver(()=>{astrawpWooQuantityButtons(),quantityInput()}).observe(t,e))}),jQuery(function(t){t(document.body).on("wc_fragments_refreshed",function(){astrawpWooQuantityButtons(),quantityInput()})}),setTimeout(()=>{var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){astrawpWooQuantityButtons()}),t.apply(this,arguments)}},2e3);let typingTimer,doneTypingInterval=500;function quantityInput(){document.querySelector(".woocommerce-mini-cart")&&document.querySelectorAll(".input-text.qty").forEach(t=>{t.addEventListener("keyup",a=>{"Tab"!==a.key&&9!==a.keyCode&&(clearTimeout(typingTimer),t.value)&&(typingTimer=setTimeout(()=>{var t=a.target.value,e=a.target.getAttribute("name").replace(/cart\[([\w]+)\]\[qty\]/g,"$1");t&&sendAjaxQuantityRequest(a.target,t,e)},doneTypingInterval))})})} window.addEventListener("load",function(t){astrawpWooQuantityButtons(),quantityInput()});let astraminiCarttargetNodes=document.querySelectorAll(".ast-site-header-cart");function astrawpWooQuantityButtons(l){document.querySelector(".woocommerce div.product form.cart");l=l||".qty",$quantityBoxesWrap=document.querySelectorAll("div.quantity:not(.elementor-widget-woocommerce-cart .quantity):not(.buttons_added), td.quantity:not(.elementor-widget-woocommerce-cart .quantity):not(.buttons_added)");for(var t=0;t<$quantityBoxesWrap.length;t++){var e=$quantityBoxesWrap[t],a=e.querySelector(l);if(a&&"date"!==a.getAttribute("type")&&"hidden"!==a.getAttribute("type")){$qty_parent=a.parentElement,document.querySelectorAll(".ast-qty-placeholder")?.forEach(t=>t?.remove()),$qty_parent.classList.add("buttons_added");var n=`<span class="screen-reader-text">${astra_qty_btn.minus_qty}</span><a href="javascript:void(0)" id="minus_qty-${t}" class="minus %s">-</a>`,r=`<span class="screen-reader-text">${astra_qty_btn.plus_qty}</span><a href="javascript:void(0)" id="plus_qty-${t}" class="plus %s">+</a>`;if("vertical-icon"===astra_qty_btn.style_type)$qty_parent.classList.add("ast-vertical-style-applied"),a.classList.add("vertical-icons-applied"),$qty_parent.insertAdjacentHTML("beforeend",n.replace("%s","ast-vertical-icon")+r.replace("%s","ast-vertical-icon"));else{let t="";"no-internal-border"===astra_qty_btn.style_type&&(a.classList.add("ast-no-internal-border"),t="no-internal-border"),$qty_parent.insertAdjacentHTML("afterbegin",n.replace("%s",t)),$qty_parent.insertAdjacentHTML("beforeend",r.replace("%s",t))}$quantityEach=document.querySelectorAll("input"+l+":not(.product-quantity)");for(var s=0;s<$quantityEach.length;s++){var o=$quantityEach[s],i=o.getAttribute("min");i&&0<i&&parseFloat(o.value)<i&&(o.value=i)}a=document.getElementsByTagName("BODY")[0],n=document.getElementsByClassName("cart")[0];if(a.classList.contains("single-product")&&n&&!n.classList.contains("grouped_form")){let e=document.querySelector(".woocommerce input[type=number].qty");e&&e.addEventListener("keyup",function(){var t=e.value;e.value=t})}for(var u=e.querySelectorAll(".plus, .minus"),c=0;c<u.length;c++)u[c].addEventListener("click",function(t){var e,a=t.target.parentElement.querySelector(l),n=parseFloat(a.value),r=parseFloat(a.getAttribute("max")),s=parseFloat(a.getAttribute("min")),o=parseFloat(a.getAttribute("step")),i=Number.isInteger(o),n=n||0,r=r||"",s=s||0,o=o||1,r=(t.target.classList.contains("plus")?r&&(r===n||n>Number(r))?a.value=r:(e=n+parseFloat(o),a.value=i?e:e.toFixed(1)):s&&(s===n||n<s)?a.value=s:0<n&&(e=n-parseFloat(o),a.value=i?e:e.toFixed(1)),new Event("change",{bubbles:!0})),u=(a.dispatchEvent(r),document.getElementsByName("update_cart"));if(0<u.length)for(var c=0;c<u.length;c++)u[c].disabled=!1,u[c].click();s=a.value,n=a.getAttribute("name").replace(/cart\[([\w]+)\]\[qty\]/g,"$1");sendAjaxQuantityRequest(t.currentTarget,s,n)},!1)}}}function sendAjaxQuantityRequest(t,a,n){let r=t.closest(".woocommerce-mini-cart");if(r&&astra&&astra.single_product_qty_ajax_nonce&&astra.ajax_url){t=astra.single_product_qty_ajax_nonce;r.classList.add("ajax-mini-cart-qty-loading");let e=new XMLHttpRequest;e.open("POST",astra.ajax_url,!0),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send("action=astra_add_cart_single_product_quantity&hash="+n+"&quantity="+a+"&qtyNonce="+t),e.onload=function(){var t;e.readyState==XMLHttpRequest.DONE&&(200<=e.status||400<=e.status)&&((t=document.createEvent("HTMLEvents")).initEvent("wc_fragment_refresh",!0,!1),document.body.dispatchEvent(t),setTimeout(()=>{r.classList.remove("ajax-mini-cart-qty-loading")},500))}}}astraminiCarttargetNodes.forEach(function(t){var e;null!=t&&(e={attributes:!1,childList:!0,subtree:!0},new MutationObserver(()=>{astrawpWooQuantityButtons(),quantityInput()}).observe(t,e))}),jQuery(function(t){t(document.body).on("wc_fragments_refreshed",function(){astrawpWooQuantityButtons(),quantityInput()})}),setTimeout(()=>{var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){astrawpWooQuantityButtons()}),t.apply(this,arguments)}},2e3);let typingTimer,doneTypingInterval=500;function quantityInput(){document.querySelector(".woocommerce-mini-cart")&&document.querySelectorAll(".input-text.qty").forEach(t=>{t.addEventListener("keyup",a=>{"Tab"!==a.key&&9!==a.keyCode&&(clearTimeout(typingTimer),t.value)&&(typingTimer=setTimeout(()=>{var t=a.target.value,e=a.target.getAttribute("name").replace(/cart\[([\w]+)\]\[qty\]/g,"$1");t&&sendAjaxQuantityRequest(a.target,t,e)},doneTypingInterval))})})}

View File

@ -0,0 +1 @@
(i=>{let t={isLoading:!1,init:function(){let t=this;setTimeout(function(){t.loadAllFonts()},2e3)},loadAllFonts:function(){let o=this;this.isLoading||(this.isLoading=!0,i.ajax({url:ajaxurl,type:"POST",data:{action:"astra_load_all_fonts",nonce:"undefined"!=typeof AstraBuilderCustomizerData?AstraBuilderCustomizerData.customizer_nonce:wp.customize.settings.nonce.save},success:function(t){t.success&&(o.updateFontControls(t.data),o.updateGlobalFontString(t.data))},complete:function(){o.isLoading=!1}}))},updateFontControls:function(n){i(".customize-control-ast-font select, .ast-font-family").each(function(){var t=i(this),o=t.val();let e=t.find('optgroup[label*="Google"]');e.length&&(e.empty(),i.each(n,function(t,o){o=o[1]||"sans-serif",o=i('<option value="'+("'"+t+"', "+o)+'">'+t+"</option>");e.append(o)}),t.val(o),t.hasClass("select2-hidden-accessible"))&&t.select2("destroy").select2()})},updateGlobalFontString:function(t){if("undefined"!=typeof astra&&astra.customizer&&astra.customizer.settings){let e="";e=e+'<option value="inherit">Default System Font</option>'+'<optgroup label="Other System Fonts">',["Helvetica","Verdana","Arial","Times","Georgia","Courier"].forEach(function(t){e+='<option value="'+t+'">'+t+"</option>"}),e=e+"</optgroup>"+'<optgroup label="Google">',i.each(t,function(t,o){o="'"+t+"', "+(o[1]||"sans-serif");e+='<option value="'+o+'">'+t+"</option>"}),e+="</optgroup>",astra.customizer.settings.google_fonts=e}}};"undefined"!=typeof wp&&wp.customize&&wp.customize.bind("ready",function(){t.init()})})(jQuery);

View File

@ -0,0 +1 @@
(t=>{function e(){"undefined"!=typeof wp&&void 0!==wp.customize&&"undefined"!=typeof AstTypography&&t(".customize-control-ast-font-family select").each(function(){var o=t(this).data("customize-setting-link");t(this).data("connected-control")&&o&&wp.customize(o)&&AstTypography._setFontWeightOptions.apply(wp.customize(o),[!0])})}function o(){t.ajax({type:"POST",url:ajaxurl,data:{action:"astra_load_google_fonts",nonce:astraCustomizer.customizer_nonce},success:function(o){o.success&&o.data&&(o=o.data.data||o.data,AstFontFamilies.google=o.google||{},AstFontFamilies.custom=o.custom||AstFontFamilies.custom||{},AstFontFamilies.googleLoaded=!0,void 0!==window.AstraBuilderCustomizerData&&(window.AstraBuilderCustomizerData.googleFonts=o.google||{}),t(document).trigger("astraGoogleFontsLoaded",[AstFontFamilies]),e())},error:function(){t.post(ajaxurl,{action:"astra_load_google_fonts",nonce:astraCustomizer.customizer_nonce},function(o){o.success&&o.data&&(o=o.data.data||o.data,AstFontFamilies.google=o.google||{},AstFontFamilies.custom=o.custom||AstFontFamilies.custom||{},AstFontFamilies.googleLoaded=!0,void 0!==window.AstraBuilderCustomizerData&&(window.AstraBuilderCustomizerData.googleFonts=o.google||{}),t(document).trigger("astraGoogleFontsLoaded",[AstFontFamilies]),e())})}})}wp.customize.bind("ready",function(){"undefined"!=typeof AstFontFamilies&&!1===AstFontFamilies.googleLoaded&&setTimeout(o,100)})})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -74,6 +74,10 @@ function astrawpWooQuantityButtons( $quantitySelector ) {
// Add plus and minus icons. // Add plus and minus icons.
$qty_parent = $quantityBoxes.parentElement; $qty_parent = $quantityBoxes.parentElement;
// Remove existing plus and minus placeholders.
document.querySelectorAll( '.ast-qty-placeholder' )?.forEach( ( placeholder ) => placeholder?.remove() );
$qty_parent.classList.add( 'buttons_added' ); $qty_parent.classList.add( 'buttons_added' );
const minusBtn = `<span class="screen-reader-text">${ astra_qty_btn.minus_qty }</span><a href="javascript:void(0)" id="minus_qty-${ i }" class="minus %s">-</a>`; const minusBtn = `<span class="screen-reader-text">${ astra_qty_btn.minus_qty }</span><a href="javascript:void(0)" id="minus_qty-${ i }" class="minus %s">-</a>`;
@ -112,7 +116,7 @@ function astrawpWooQuantityButtons( $quantitySelector ) {
let objbody = document.getElementsByTagName('BODY')[0]; let objbody = document.getElementsByTagName('BODY')[0];
let cart = document.getElementsByClassName('cart')[0]; let cart = document.getElementsByClassName('cart')[0];
if (objbody.classList.contains('single-product') && !cart.classList.contains('grouped_form')) { if (objbody.classList.contains('single-product') && cart && !cart.classList.contains('grouped_form')) {
let quantityInput = document.querySelector('.woocommerce input[type=number].qty'); let quantityInput = document.querySelector('.woocommerce input[type=number].qty');
// Check for single product page. // Check for single product page.
if (quantityInput) { if (quantityInput) {

View File

@ -0,0 +1,90 @@
/**
* Customizer Google Fonts AJAX Loader
*
* @package Astra
* @since 4.11.13
*/
(function ($) {
'use strict';
/**
* Re-initialize font weights for all typography controls
*/
function reinitializeFontWeights() {
if (typeof wp === 'undefined' || typeof wp.customize === 'undefined' || typeof AstTypography === 'undefined') {
return;
}
$('.customize-control-ast-font-family select').each(function () {
var link = $(this).data('customize-setting-link');
var weight = $(this).data('connected-control');
if (weight && link && wp.customize(link)) {
AstTypography._setFontWeightOptions.apply(wp.customize(link), [true]);
}
});
}
/**
* Load Google Fonts via AJAX
*/
function loadGoogleFonts() {
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'astra_load_google_fonts',
nonce: astraCustomizer.customizer_nonce
},
success: function (response) {
if (response.success && response.data) {
var fontData = response.data.data || response.data;
AstFontFamilies.google = fontData.google || {};
AstFontFamilies.custom = fontData.custom || AstFontFamilies.custom || {};
AstFontFamilies.googleLoaded = true;
// Update React component's font data
if (typeof window.AstraBuilderCustomizerData !== 'undefined') {
window.AstraBuilderCustomizerData.googleFonts = fontData.google || {};
}
$(document).trigger('astraGoogleFontsLoaded', [AstFontFamilies]);
reinitializeFontWeights();
}
},
error: function () {
// Fallback: try once more with $.post
$.post(ajaxurl, {
action: 'astra_load_google_fonts',
nonce: astraCustomizer.customizer_nonce
}, function (response) {
if (response.success && response.data) {
var fontData = response.data.data || response.data;
AstFontFamilies.google = fontData.google || {};
AstFontFamilies.custom = fontData.custom || AstFontFamilies.custom || {};
AstFontFamilies.googleLoaded = true;
// Update React component's font data
if (typeof window.AstraBuilderCustomizerData !== 'undefined') {
window.AstraBuilderCustomizerData.googleFonts = fontData.google || {};
}
$(document).trigger('astraGoogleFontsLoaded', [AstFontFamilies]);
reinitializeFontWeights();
}
});
}
});
}
// Initialize when customizer is ready
wp.customize.bind('ready', function () {
if (typeof AstFontFamilies !== 'undefined' && AstFontFamilies.googleLoaded === false) {
setTimeout(loadGoogleFonts, 100);
}
});
})(jQuery);

View File

@ -228,16 +228,20 @@ astScrollToTopHandler = function ( masthead, astScrollTop ) {
buttons.forEach(button => { buttons.forEach(button => {
if (allToggled) { if (allToggled) {
button.classList.remove('toggled'); button.classList.remove('toggled');
button.setAttribute('aria-expanded', 'false');
} else { } else {
button.classList.add('toggled'); button.classList.add('toggled');
button.setAttribute('aria-expanded', 'true');
} }
}); });
} }
document.addEventListener('click', function (e) { document.addEventListener('click', function (e) {
const button = e.target.closest('.menu-toggle'); const button = e.target.closest('.menu-toggle');
if (button) { if (button && mobileHeaderType === 'dropdown') {
button.classList.toggle('toggled'); button.classList.toggle('toggled');
const isToggled = button.classList.contains('toggled');
button.setAttribute('aria-expanded', isToggled ? 'true' : 'false');
syncToggledClass(); syncToggledClass();
} }
}); });
@ -328,6 +332,7 @@ astScrollToTopHandler = function ( masthead, astScrollTop ) {
for ( var item = 0; item < popupTrigger.length; item++ ) { for ( var item = 0; item < popupTrigger.length; item++ ) {
popupTrigger[item].classList.remove( 'toggled' ); popupTrigger[item].classList.remove( 'toggled' );
popupTrigger[item].setAttribute('aria-expanded', 'false');
popupTrigger[item].style.display = 'flex'; popupTrigger[item].style.display = 'flex';
} }
@ -420,6 +425,7 @@ astScrollToTopHandler = function ( masthead, astScrollTop ) {
// Open the Popup when click on trigger // Open the Popup when click on trigger
popupTriggerMobile[ item ].removeEventListener( 'click', popupTriggerClick ); popupTriggerMobile[ item ].removeEventListener( 'click', popupTriggerClick );
popupTriggerMobile[ item ].addEventListener( 'click', function(event) { popupTriggerMobile[ item ].addEventListener( 'click', function(event) {
event.currentTarget.setAttribute('aria-expanded', 'true');
popupTriggerClick(event); popupTriggerClick(event);
const menu = document.querySelector('.ast-mobile-popup-drawer.active'); const menu = document.querySelector('.ast-mobile-popup-drawer.active');
if (!menu) { if (!menu) {
@ -432,7 +438,10 @@ astScrollToTopHandler = function ( masthead, astScrollTop ) {
popupTriggerDesktop[ item ].removeEventListener( 'click', astraNavMenuToggle, false ); popupTriggerDesktop[ item ].removeEventListener( 'click', astraNavMenuToggle, false );
// Open the Popup when click on trigger // Open the Popup when click on trigger
popupTriggerDesktop[ item ].removeEventListener( 'click', popupTriggerClick ); popupTriggerDesktop[ item ].removeEventListener( 'click', popupTriggerClick );
popupTriggerDesktop[ item ].addEventListener( 'click', popupTriggerClick, false ); popupTriggerDesktop[ item ].addEventListener( 'click', function(event) {
event.currentTarget.setAttribute('aria-expanded', 'true');
popupTriggerClick(event);
}, false );
popupTriggerDesktop[ item ].trigger_type = 'desktop'; popupTriggerDesktop[ item ].trigger_type = 'desktop';
} }
@ -443,7 +452,10 @@ astScrollToTopHandler = function ( masthead, astScrollTop ) {
popupClose.addEventListener( 'click', function ( e ) { popupClose.addEventListener( 'click', function ( e ) {
document.getElementById( 'ast-mobile-popup' ).classList.remove( 'active', 'show' ); document.getElementById( 'ast-mobile-popup' ).classList.remove( 'active', 'show' );
updateTrigger( this ); updateTrigger( this );
// Don't focus if we're in an iframe (e.g., Beaver Builder editor)
if ( window.self === window.top ) {
menuToggleButton?.focus(); menuToggleButton?.focus();
}
} ); } );
// Close Popup if esc is pressed. // Close Popup if esc is pressed.
@ -978,7 +990,9 @@ astScrollToTopHandler = function ( masthead, astScrollTop ) {
// Hide menu toggle button if menu is empty and return early. // Hide menu toggle button if menu is empty and return early.
if (!menu) { if (!menu) {
if (!button.classList.contains('custom-logo-link')) {
button.style.display = 'none'; button.style.display = 'none';
}
return; return;
} }

View File

@ -326,6 +326,11 @@
// Using jQuery here because WooCommerce and the variation swatches plugin rely on jQuery for AJAX handling and DOM updates. // Using jQuery here because WooCommerce and the variation swatches plugin rely on jQuery for AJAX handling and DOM updates.
jQuery(document).ready(function ($) { jQuery(document).ready(function ($) {
// Check if WooCommerce parameters are available before proceeding.
if (typeof wc_add_to_cart_params === 'undefined') {
return;
}
// Listening for WooCommerce's default 'added_to_cart' and 'astra_refresh_cart_fragments' both events. // Listening for WooCommerce's default 'added_to_cart' and 'astra_refresh_cart_fragments' both events.
$(document.body).on('added_to_cart astra_refresh_cart_fragments', function (event, fragments, cart_hash) { $(document.body).on('added_to_cart astra_refresh_cart_fragments', function (event, fragments, cart_hash) {
// Refreshing WooCommerce cart fragments. // Refreshing WooCommerce cart fragments.

View File

@ -1596,7 +1596,7 @@
"upgradeLock" : "<svg width='17' height='16' viewBox='0 0 17 16' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M12.5002 7.2001H11.7002V4.8001C11.7002 3.0401 10.2602 1.6001 8.5002 1.6001C6.7402 1.6001 5.3002 3.0401 5.3002 4.8001V7.2001H4.5002C4.1002 7.2001 3.7002 7.6001 3.7002 8.0001V13.6001C3.7002 14.0001 4.1002 14.4001 4.5002 14.4001H12.5002C12.9002 14.4001 13.3002 14.0001 13.3002 13.6001V8.0001C13.3002 7.6001 12.9002 7.2001 12.5002 7.2001ZM9.3002 12.8001H7.7002L8.0202 11.0401C7.6202 10.8801 7.3002 10.4001 7.3002 10.0001C7.3002 9.3601 7.8602 8.8001 8.5002 8.8001C9.1402 8.8001 9.7002 9.3601 9.7002 10.0001C9.7002 10.4801 9.4602 10.8801 8.9802 11.0401L9.3002 12.8001ZM10.1002 7.2001H6.9002V4.8001C6.9002 3.9201 7.6202 3.2001 8.5002 3.2001C9.3802 3.2001 10.1002 3.9201 10.1002 4.8001V7.2001Z' fill='#0284C7'/> </svg>", "upgradeLock" : "<svg width='17' height='16' viewBox='0 0 17 16' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M12.5002 7.2001H11.7002V4.8001C11.7002 3.0401 10.2602 1.6001 8.5002 1.6001C6.7402 1.6001 5.3002 3.0401 5.3002 4.8001V7.2001H4.5002C4.1002 7.2001 3.7002 7.6001 3.7002 8.0001V13.6001C3.7002 14.0001 4.1002 14.4001 4.5002 14.4001H12.5002C12.9002 14.4001 13.3002 14.0001 13.3002 13.6001V8.0001C13.3002 7.6001 12.9002 7.2001 12.5002 7.2001ZM9.3002 12.8001H7.7002L8.0202 11.0401C7.6202 10.8801 7.3002 10.4001 7.3002 10.0001C7.3002 9.3601 7.8602 8.8001 8.5002 8.8001C9.1402 8.8001 9.7002 9.3601 9.7002 10.0001C9.7002 10.4801 9.4602 10.8801 8.9802 11.0401L9.3002 12.8001ZM10.1002 7.2001H6.9002V4.8001C6.9002 3.9201 7.6202 3.2001 8.5002 3.2001C9.3802 3.2001 10.1002 3.9201 10.1002 4.8001V7.2001Z' fill='#0284C7'/> </svg>",
"astraLogo" : "<svg width='33' height='32' viewBox='0 0 33 32' fill='none' xmlns='http://www.w3.org/2000/svg'> <rect x='0.5' width='32' height='32' rx='16' fill='#0284C7'/> <path fill-rule='evenodd' clip-rule='evenodd' d='M17.6955 10.1713C17.2383 9.2787 16.781 8.38608 16.3113 7.5C15.5617 9.03478 14.8121 10.5696 14.0625 12.1043C12.2082 15.9011 10.3538 19.698 8.5 23.4952C8.93232 23.4964 9.36474 23.4958 9.79718 23.4953C10.48 23.4944 11.1628 23.4935 11.8454 23.4994C13.0023 21.2498 14.1513 18.9964 15.3004 16.7429C16.2579 14.865 17.2155 12.987 18.1777 11.1112C18.0166 10.7981 17.8561 10.4847 17.6955 10.1713ZM22.8888 20.2871C21.8545 18.2269 20.8202 16.1669 19.7831 14.1081C18.6891 16.3157 17.5938 18.5234 16.4961 20.7292C16.9479 20.729 17.3996 20.7291 17.8513 20.7291C18.4533 20.7292 19.0554 20.7293 19.6576 20.7287C19.8258 21.0968 19.9903 21.4666 20.1547 21.8364C20.4022 22.3928 20.6496 22.9492 20.9097 23.5C21.6363 23.4935 22.3629 23.4944 23.0894 23.4954C23.5596 23.496 24.0297 23.4966 24.4998 23.4952C23.9625 22.4259 23.4256 21.3565 22.8888 20.2871Z' fill='white'/> </svg>", "astraLogo" : "<svg width='33' height='32' viewBox='0 0 33 32' fill='none' xmlns='http://www.w3.org/2000/svg'> <rect x='0.5' width='32' height='32' rx='16' fill='#0284C7'/> <path fill-rule='evenodd' clip-rule='evenodd' d='M17.6955 10.1713C17.2383 9.2787 16.781 8.38608 16.3113 7.5C15.5617 9.03478 14.8121 10.5696 14.0625 12.1043C12.2082 15.9011 10.3538 19.698 8.5 23.4952C8.93232 23.4964 9.36474 23.4958 9.79718 23.4953C10.48 23.4944 11.1628 23.4935 11.8454 23.4994C13.0023 21.2498 14.1513 18.9964 15.3004 16.7429C16.2579 14.865 17.2155 12.987 18.1777 11.1112C18.0166 10.7981 17.8561 10.4847 17.6955 10.1713ZM22.8888 20.2871C21.8545 18.2269 20.8202 16.1669 19.7831 14.1081C18.6891 16.3157 17.5938 18.5234 16.4961 20.7292C16.9479 20.729 17.3996 20.7291 17.8513 20.7291C18.4533 20.7292 19.0554 20.7293 19.6576 20.7287C19.8258 21.0968 19.9903 21.4666 20.1547 21.8364C20.4022 22.3928 20.6496 22.9492 20.9097 23.5C21.6363 23.4935 22.3629 23.4944 23.0894 23.4954C23.5596 23.496 24.0297 23.4966 24.4998 23.4952C23.9625 22.4259 23.4256 21.3565 22.8888 20.2871Z' fill='white'/> </svg>",
"upgradeListCheck" : "<svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M12.2399 4.23999L6.79994 9.67999L4.55994 7.43999L3.43994 8.55999L6.79994 11.92L13.3599 5.35999L12.2399 4.23999Z' fill='#0284C7'/></svg>", "upgradeListCheck" : "<svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M12.2399 4.23999L6.79994 9.67999L4.55994 7.43999L3.43994 8.55999L6.79994 11.92L13.3599 5.35999L12.2399 4.23999Z' fill='#0284C7'/></svg>",
"upgradeListCheckRound" : "<svg width='17' height='18' viewBox='0 0 17 18' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M0.5 9.5C0.5 5.08172 4.08172 1.5 8.5 1.5C12.9183 1.5 16.5 5.08172 16.5 9.5C16.5 13.9183 12.9183 17.5 8.5 17.5C4.08172 17.5 0.5 13.9183 0.5 9.5Z' stroke='#4B5563'/> <path d='M5 10L8 12L12 7' stroke='#4B5563' stroke-width='1.5'/></svg>", "upgradeListCheckRound" : "<svg width='17' height='18' viewBox='0 0 17 18' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M5 10L8 12L12 7' stroke='currentColor' stroke-width='1.5'></path></svg>",
"normal-width-container": "<svg width='136' height='96' viewBox='0 0 136 96' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='135' height='95' rx='2.5' stroke='#D8DBDF'/><path d='M12.5 15C12.5 13.619 13.619 12.5 15 12.5H121C122.381 12.5 123.5 13.619 123.5 15V95.5H12.5V15Z' fill='white'/><path d='M12.5 15C12.5 13.619 13.619 12.5 15 12.5H121C122.381 12.5 123.5 13.619 123.5 15V95.5H12.5V15Z' stroke='#D1D5DB'/><rect x='38' y='24' width='60' height='29' rx='3' fill='#E5E7EB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M98 59H38V58H98V59Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M98 65H38V64H98V65Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M98 71H38V70H98V71Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M98 77H38V76H98V77Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M83 83H38V82H83V83Z' fill='#D1D5DB'/></svg>", "normal-width-container": "<svg width='136' height='96' viewBox='0 0 136 96' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='135' height='95' rx='2.5' stroke='#D8DBDF'/><path d='M12.5 15C12.5 13.619 13.619 12.5 15 12.5H121C122.381 12.5 123.5 13.619 123.5 15V95.5H12.5V15Z' fill='white'/><path d='M12.5 15C12.5 13.619 13.619 12.5 15 12.5H121C122.381 12.5 123.5 13.619 123.5 15V95.5H12.5V15Z' stroke='#D1D5DB'/><rect x='38' y='24' width='60' height='29' rx='3' fill='#E5E7EB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M98 59H38V58H98V59Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M98 65H38V64H98V65Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M98 71H38V70H98V71Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M98 77H38V76H98V77Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M83 83H38V82H83V83Z' fill='#D1D5DB'/></svg>",
"full-width-container" : "<svg width='136' height='96' viewBox='0 0 136 96' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='135' height='95' rx='2.5' stroke='#D8DBDF'/><path d='M15 12.5H121C122.381 12.5 123.5 13.6193 123.5 15V95.5H12.5V15C12.5 13.6193 13.6193 12.5 15 12.5Z' fill='white'/><path d='M15 12.5H121C122.381 12.5 123.5 13.6193 123.5 15V95.5H12.5V15C12.5 13.6193 13.6193 12.5 15 12.5Z' stroke='#D1D5DB'/><rect x='24' y='24' width='88' height='29' rx='3' fill='#E5E7EB'/><rect x='24' y='58' width='88' height='1' fill='#D1D5DB'/><rect x='24' y='64' width='88' height='1' fill='#D1D5DB'/><rect x='24' y='70' width='88' height='1' fill='#D1D5DB'/><rect x='24' y='76' width='88' height='1' fill='#D1D5DB'/><rect x='24' y='82' width='60' height='1' fill='#D1D5DB'/></svg>", "full-width-container" : "<svg width='136' height='96' viewBox='0 0 136 96' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='135' height='95' rx='2.5' stroke='#D8DBDF'/><path d='M15 12.5H121C122.381 12.5 123.5 13.6193 123.5 15V95.5H12.5V15C12.5 13.6193 13.6193 12.5 15 12.5Z' fill='white'/><path d='M15 12.5H121C122.381 12.5 123.5 13.6193 123.5 15V95.5H12.5V15C12.5 13.6193 13.6193 12.5 15 12.5Z' stroke='#D1D5DB'/><rect x='24' y='24' width='88' height='29' rx='3' fill='#E5E7EB'/><rect x='24' y='58' width='88' height='1' fill='#D1D5DB'/><rect x='24' y='64' width='88' height='1' fill='#D1D5DB'/><rect x='24' y='70' width='88' height='1' fill='#D1D5DB'/><rect x='24' y='76' width='88' height='1' fill='#D1D5DB'/><rect x='24' y='82' width='60' height='1' fill='#D1D5DB'/></svg>",
"narrow-width-container": "<svg width='136' height='96' viewBox='0 0 136 96' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='135' height='95' rx='2.5' stroke='#D8DBDF'/><path d='M12.5 15C12.5 13.619 13.619 12.5 15 12.5H121C122.381 12.5 123.5 13.619 123.5 15V95.5H12.5V15Z' fill='white'/><path d='M12.5 15C12.5 13.619 13.619 12.5 15 12.5H121C122.381 12.5 123.5 13.619 123.5 15V95.5H12.5V15Z' stroke='#D1D5DB'/><rect x='49' y='24' width='38' height='29' rx='3' fill='#E5E7EB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M87 59H49V58H87V59Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M87 65H49V64H87V65Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M87 71H49V70H87V71Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M87 77H49V76H87V77Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M74 83H49V82H74V83Z' fill='#D1D5DB'/></svg>", "narrow-width-container": "<svg width='136' height='96' viewBox='0 0 136 96' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='135' height='95' rx='2.5' stroke='#D8DBDF'/><path d='M12.5 15C12.5 13.619 13.619 12.5 15 12.5H121C122.381 12.5 123.5 13.619 123.5 15V95.5H12.5V15Z' fill='white'/><path d='M12.5 15C12.5 13.619 13.619 12.5 15 12.5H121C122.381 12.5 123.5 13.619 123.5 15V95.5H12.5V15Z' stroke='#D1D5DB'/><rect x='49' y='24' width='38' height='29' rx='3' fill='#E5E7EB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M87 59H49V58H87V59Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M87 65H49V64H87V65Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M87 71H49V70H87V71Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M87 77H49V76H87V77Z' fill='#D1D5DB'/><path fill-rule='evenodd' clip-rule='evenodd' d='M74 83H49V82H74V83Z' fill='#D1D5DB'/></svg>",

View File

@ -1,11 +1,67 @@
*** Astra Changelog *** *** Astra Changelog ***
2025-12-08 - version 4.11.17
* New: Added a new “Disable Related Posts” option in the single post meta settings to hide related posts for specific posts.
* Improvement: Full Width Container now applies correctly on WooCommerce Product Category and Tag pages.
* Improvement: Added translations for ARIA labels to improve accessibility and removed redundant screen reader text.
* Improvement: Added Email Customizer Pro compatibility check and extensible filter to prevent customizer conflicts.
* Improvement: Enhanced Header/Footer Builder widgets popover positioning to ensure they remain fully visible within the viewport.
* Improvement: Resolved alignment issue with product single in SureCart.
* Fix: Resolved an issue where quantity plus/minus buttons glitched for products with stock quantity of 1 or less.
2025-12-02 - version 4.11.16
* Improvement: Compatibility with WordPress 6.9.
2025-11-11 - version 4.11.15
* Fix: Astra theme was throwing a ReactDOM console warning in the Customizer.
2025-11-04 - version 4.11.14
* Improvement: Enhanced accessibility for the “Skip to Content” link.
* Fix: Resolved an issue where the forum title was not displayed on the frontend when using the BuddyBoss plugin with the Forum module enabled.
* Fix: Resolved an issue in WooCommerce integration to ensure quantity buttons are disabled for “sold individually” products on single product pages.
* Fix: Resolved an issue where Google Fonts in the Customizer showed limited font weights in Astra.
* Fix: Resolved a minor issue where the Columns block might not display at full width in some cases.
* Fix: Resolved a broken color picker UI issue in the Blog Archive metabox.
2025-10-07 - version 4.11.13
* Improvement: Added lazy-loading for Google Fonts in Customizer to improve performance and reduce extra PHP memory consume by loading fonts via AJAX only when needed.
* Improvement: Added LifterLMS compatibility on course catalog page.
* Improvement: Improved post filter color settings spacing.
* Fix: Fixed incorrect aspect ratios for Vimeo and YouTube embeds.
* Fix: Fixed JavaScript error 'wc_add_to_cart_params is not defined' when using EDD cart widget in header builder.
* Fix: Resolved an issue where the Off-Canvas Menu did not work correctly with the Sticky Header.
2025-09-16 - version 4.11.12
* New: Streamlined onboarding flow for quicker setup and an easier path to building websites with Astra and Starter Templates.
* Improvement: Added LifterLMS compatibility on the course catalog page.
* Improvement: Optimized mobile menu initialization to use DOMContentLoaded instead of window.load for faster responsiveness on content-heavy pages.
* Improvement: Added consistency for empty cart button styling in WooCommerce mini cart.
* Fix: Resolved issue where the logo disappeared when the primary menu was empty by ensuring the custom logo remains visible regardless of menu state.
* Fix: Corrected the aria-expanded attribute not updating for mobile menu toggle buttons in flyout and fullscreen header types.
* Fix: Resolved issue with padding not applying on single and archive pages.
* Fix: Corrected misaligned color picker in Related Posts → Design → Content Colors options.
2025-09-09 - version 4.11.11
* Improvement: Enhanced the loading performance of the Quantity Plus and Minus buttons by using placeholders.
* Improvement: Updated archive, special, and single pages to automatically swap left/right positioning for full RTL compatibility.
* Improvement: Refined the Site Identity section UI in the Style Guide for better clarity and usability.
* Improvement: Added a new astra_elementor_use_default_settings filter to allow skipping Elementor-specific modifications for empty posts.
* Improvement: Dark palettes (e.g., palette 4) are now correctly detected and styled as dark mode even if colors are customized.
* Improvement: Resolved custom SVG attribute conflicts to improve SVG UI rendering.
* Improvement: Added the astra_html_widget_allowed_html filter to allow custom HTML elements in header/footer HTML widgets.
* Fix: Resolved an issue where the copyright elements bottom margin was not applied across all devices.
* Fix: Fixed an issue where HTML select/option elements were displayed as plain text in header/footer HTML widgets.
* Fix: Corrected responsive font sizing for text in the Archive Title section.
* Fix: Corrected a dynamic CSS issue in the Search Page Title section.
* Fix: Fixed Elementor CSS cache issue where page title display settings were not updated after saving posts.
2025-08-20 - version 4.11.10 2025-08-20 - version 4.11.10
* Improvement: Fixed duplicate menu IDs in navigation components to improve WCAG 2.0 accessibility compliance. * Improvement: Fixed duplicate menu IDs in navigation components to improve WCAG 2.0 accessibility compliance.
* Improvement: Enhanced accessibility to prevent screen readers from announcing fly-out navigation content when it is hidden. * Improvement: Enhanced accessibility to prevent screen readers from announcing fly-out navigation content when it is hidden.
* Fix: Resolved Astra dashboard compatibility issue with the Gutenberg plugin where sprintf was not defined. * Fix: Resolved the Astra dashboard compatibility issue with the Gutenberg plugin, where sprintf was not defined.
* Fix: Resolved minor UI styling issues in Customizer controls. * Fix: Resolved minor UI styling issues in Customizer controls.
* Fix: Corrected an issue where the post title appeared in the Elementor editor even when disabled, ensuring proper sync with Elementors Hide Title option. * Fix: Corrected an issue where the post title appeared in the Elementor editor even when disabled, ensuring proper sync with Elementors Hide Title option.
* Fix: Corrected content scrolling issue in Beaver Builder editor when the header off-canvas flyout menu is enabled.
2025-08-11 - version 4.11.9 2025-08-11 - version 4.11.9
* Improvement: Compatibility with Spectra V3. * Improvement: Compatibility with Spectra V3.

View File

@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
/** /**
* Define Constants * Define Constants
*/ */
define( 'ASTRA_THEME_VERSION', '4.11.10' ); define( 'ASTRA_THEME_VERSION', '4.11.17' );
define( 'ASTRA_THEME_SETTINGS', 'astra-settings' ); define( 'ASTRA_THEME_SETTINGS', 'astra-settings' );
define( 'ASTRA_THEME_DIR', trailingslashit( get_template_directory() ) ); define( 'ASTRA_THEME_DIR', trailingslashit( get_template_directory() ) );
define( 'ASTRA_THEME_URI', trailingslashit( esc_url( get_template_directory_uri() ) ) ); define( 'ASTRA_THEME_URI', trailingslashit( esc_url( get_template_directory_uri() ) ) );
@ -45,7 +45,7 @@ require_once ASTRA_THEME_DIR . 'inc/core/class-astra-icons.php';
define( 'ASTRA_WEBSITE_BASE_URL', 'https://wpastra.com' ); define( 'ASTRA_WEBSITE_BASE_URL', 'https://wpastra.com' );
/** /**
* ToDo: Deprecate constants in future versions as they are no longer used in the codebase. * Deprecate constants in future versions as they are no longer used in the codebase.
*/ */
define( 'ASTRA_PRO_UPGRADE_URL', ASTRA_THEME_ORG_VERSION ? astra_get_pro_url( '/pricing/', 'free-theme', 'dashboard', 'upgrade' ) : 'https://woocommerce.com/products/astra-pro/' ); define( 'ASTRA_PRO_UPGRADE_URL', ASTRA_THEME_ORG_VERSION ? astra_get_pro_url( '/pricing/', 'free-theme', 'dashboard', 'upgrade' ) : 'https://woocommerce.com/products/astra-pro/' );
define( 'ASTRA_PRO_CUSTOMIZER_UPGRADE_URL', ASTRA_THEME_ORG_VERSION ? astra_get_pro_url( '/pricing/', 'free-theme', 'customizer', 'upgrade' ) : 'https://woocommerce.com/products/astra-pro/' ); define( 'ASTRA_PRO_CUSTOMIZER_UPGRADE_URL', ASTRA_THEME_ORG_VERSION ? astra_get_pro_url( '/pricing/', 'free-theme', 'customizer', 'upgrade' ) : 'https://woocommerce.com/products/astra-pro/' );
@ -98,6 +98,7 @@ require_once ASTRA_THEME_DIR . 'inc/template-tags.php';
require_once ASTRA_THEME_DIR . 'inc/widgets.php'; require_once ASTRA_THEME_DIR . 'inc/widgets.php';
require_once ASTRA_THEME_DIR . 'inc/core/theme-hooks.php'; require_once ASTRA_THEME_DIR . 'inc/core/theme-hooks.php';
require_once ASTRA_THEME_DIR . 'inc/admin-functions.php'; require_once ASTRA_THEME_DIR . 'inc/admin-functions.php';
require_once ASTRA_THEME_DIR . 'inc/class-astra-memory-limit-notice.php';
require_once ASTRA_THEME_DIR . 'inc/core/sidebar-manager.php'; require_once ASTRA_THEME_DIR . 'inc/core/sidebar-manager.php';
/** /**

View File

@ -38,8 +38,7 @@ if ( apply_filters( 'astra_header_profile_gmpg_link', true ) ) {
<a <a
class="skip-link screen-reader-text" class="skip-link screen-reader-text"
href="#content" href="#content">
title="<?php echo esc_attr( astra_default_strings( 'string-header-skip-link', false ) ); ?>">
<?php echo esc_html( astra_default_strings( 'string-header-skip-link', false ) ); ?> <?php echo esc_html( astra_default_strings( 'string-header-skip-link', false ) ); ?>
</a> </a>

View File

@ -331,6 +331,7 @@ class Astra_Breadcrumb_Trail {
// Wrap the item with its itemprop. // Wrap the item with its itemprop.
$item = ! empty( $matches ) && $this->args['schema'] $item = ! empty( $matches ) && $this->args['schema']
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, adds schema.org markup to breadcrumb links
? preg_replace( '/(<a.*?)([\'"])>/i', '$1$2 itemprop=$2item$2>', $item ) ? preg_replace( '/(<a.*?)([\'"])>/i', '$1$2 itemprop=$2item$2>', $item )
: sprintf( '<span>%s</span>', $item ); : sprintf( '<span>%s</span>', $item );
@ -673,8 +674,8 @@ class Astra_Breadcrumb_Trail {
$this->add_post_terms( $post_id, $this->post_taxonomy[ $post->post_type ] ); $this->add_post_terms( $post_id, $this->post_taxonomy[ $post->post_type ] );
} }
// End with the post title. // End with the post title.
if ( $post_title = single_post_title( '', false ) ) { $post_title = single_post_title( '', false );
if ( $post_title ) {
if ( ( 1 < get_query_var( 'page' ) || is_paged() ) || ( get_option( 'page_comments' ) && 1 < absint( get_query_var( 'cpage' ) ) ) ) { if ( ( 1 < get_query_var( 'page' ) || is_paged() ) || ( get_option( 'page_comments' ) && 1 < absint( get_query_var( 'cpage' ) ) ) ) {
$this->items[] = sprintf( '<a href="%s">%s</a>', esc_url( get_permalink( $post_id ) ), $post_title ); $this->items[] = sprintf( '<a href="%s">%s</a>', esc_url( get_permalink( $post_id ) ), $post_title );
} }

View File

@ -1812,7 +1812,7 @@ button.components-button.ahfb-sorter-item-expand {
} }
#customize-theme-controls .accordion-section-content { #customize-theme-controls .accordion-section-content {
color: var(--ast-customizer-color-5); color: var( --ast-customizer-text-color );
} }
.ahfb-popover-social-list .components-button-group.ahfb-radio-container-control { .ahfb-popover-social-list .components-button-group.ahfb-radio-container-control {

View File

@ -1812,7 +1812,7 @@ button.components-button.ahfb-sorter-item-expand {
} }
#customize-theme-controls .accordion-section-content { #customize-theme-controls .accordion-section-content {
color: var(--ast-customizer-color-5); color: var( --ast-customizer-text-color );
} }
.ahfb-popover-social-list .components-button-group.ahfb-radio-container-control { .ahfb-popover-social-list .components-button-group.ahfb-radio-container-control {

View File

@ -1,3 +1,15 @@
#astra-sites-on-active {
font-family: "Figtree", "Inter", sans-serif;
padding: 0;
border: none;
box-shadow: none;
border-radius: 4px;
}
#astra-sites-on-active .astra-notice-container {
padding: 2rem;
}
.astra-review-notice-container { .astra-review-notice-container {
display: flex; display: flex;
align-items: center; align-items: center;
@ -89,7 +101,7 @@
#astra-sites-on-active .button.updated-message:before, #astra-sites-on-active .button.updated-message:before,
#astra-sites-on-active .button.installed:before, #astra-sites-on-active .button.installed:before,
#astra-sites-on-active .button.installing:before { #astra-sites-on-active .button.installing:before {
margin: 4px -1px 0px 5px; margin: 0 0 0 5px;
} }
.wp-core-ui .astra-notice-wrapper:has(.ast-welcome-banner) { .wp-core-ui .astra-notice-wrapper:has(.ast-welcome-banner) {
@ -98,8 +110,8 @@
.ast-welcome-banner { .ast-welcome-banner {
width: 100%; width: 100%;
display: flex; display: flex;
gap: 40px; gap: 2rem;
justify-content: center; justify-content: space-between;
overflow: hidden; overflow: hidden;
} }
.ast-col-left { .ast-col-left {
@ -108,10 +120,9 @@
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
justify-content: center; justify-content: center;
padding: 40px 28px 40px 0px;
} }
.ast-col-right { .ast-col-right {
width: 50%; max-width: 50%;
display: flex; display: flex;
position: relative; position: relative;
flex-direction: column; flex-direction: column;
@ -123,48 +134,47 @@
position: relative; position: relative;
} }
.ast-welcome-banner .notice-title { .ast-welcome-banner .notice-title {
color: #1e293b; color: #141338;
font-size: 30px; font-size: 30px;
line-height: 38px;
font-weight: 600; font-weight: 600;
line-height: 40px;
letter-spacing: -0.2px;
margin-top: 12px;
margin-bottom: 12px;
padding: 0; padding: 0;
margin-top: 0px;
margin-bottom: 0.375rem;
} }
.ast-welcome-banner .description { .ast-welcome-banner .description {
color: #475569; color: #6F6B99;
font-size: 16px; font-size: 14px;
line-height: 28px; line-height: 20px;
margin-top: 0px; margin-top: 0px;
margin-bottom: 32px; margin-bottom: 1.75rem;
padding: 0px; padding: 0px;
} }
#astra-sites-on-active .astra-notice-container .notice-actions > button { #astra-sites-on-active .astra-notice-container .notice-actions > button {
border-radius: 6px; border-radius: 6px;
background: #046bd2; background: #5C2EDE;
padding: 12px 24px; padding: 12px 24px;
/* shadow/sm */ /* shadow/sm */
color: white; color: white;
box-shadow: none; box-shadow: none;
border: none; border: none;
font-size: 16px; font-size: 14px;
font-weight: 500; line-height: 20px;
line-height: 24px; font-weight: 600;
} }
.ast-welcome-banner .sub-notice-title { .ast-welcome-banner .sub-notice-title {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-self: stretch; align-self: stretch;
color: #646970; color: #6F6B99;
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 20px;
margin: 0; margin: 0 0 1.75rem;
padding: 0; padding: 0;
} }
.astra-notice-container:has(.ast-welcome-banner) { .ast-welcome-banner .notice-actions {
padding-top: 0; margin-bottom: 1.75rem;
padding-bottom: 0;
} }
.ast-welcome-banner .notice-actions button { .ast-welcome-banner .notice-actions button {
font-size: 14px; font-size: 14px;
@ -173,15 +183,15 @@
padding: 12px 24px; padding: 12px 24px;
} }
p.sub-notice-description { p.sub-notice-description {
color: #475569; color: #6F6B99;
font-size: 13px; font-size: 12px;
line-height: 20px; line-height: 16px;
text-decoration: underline; padding: 0;
cursor: pointer;
margin: 0; margin: 0;
padding: 16px 0 0;
} }
.ast-st-sites-cta { .ast-st-sites-cta {
width: fit-content;
max-width: 320px;
border: 1px solid #fff; border: 1px solid #fff;
border-radius: 9999px; border-radius: 9999px;
display: flex; display: flex;
@ -196,6 +206,7 @@ p.sub-notice-description {
bottom: 40px; bottom: 40px;
background: rgb(228 228 228 / 50%); background: rgb(228 228 228 / 50%);
backdrop-filter: blur(4px); backdrop-filter: blur(4px);
display: none; /* maybe show it in future */
} }
.ast-st-sites-cta .ast-page-builder-ico { .ast-st-sites-cta .ast-page-builder-ico {
@ -215,62 +226,34 @@ p.sub-notice-description {
padding-left: 6px; padding-left: 6px;
border-left: 1px solid #fff; border-left: 1px solid #fff;
} }
#astra-sites-on-active {
padding: 0;
}
@media screen and (max-width: 1199px) { @media screen and (max-width: 1199px) {
#astra-sites-on-active .astra-notice-container {
padding: 1.5rem;
}
.ast-col-right { .ast-col-right {
display: none; display: none;
} }
.ast-col-left { .ast-col-left {
width: 100%; width: 100%;
padding: 20px 24px;
align-items: unset; align-items: unset;
padding: 0.5rem 0;
} }
#astra-sites-on-active .astra-notice-container .notice-actions > button { #astra-sites-on-active .astra-notice-container .notice-actions > button {
width: 100%; width: 100%;
} }
}
@media screen and (max-width: 782px) {
.ast-col-left {
width: 100%;
font-size: 14px;
align-items: unset;
padding-right: 15px;
padding-left: 15px;
}
#astra-sites-on-active .astra-notice-container .notice-actions > button {
font-size: 14px;
width: 100%;
}
.ast-welcome-banner .notice-title {
font-size: 22px;
}
.ast-welcome-banner .sub-notice-title,
.ast-welcome-banner .description {
font-size: 14px;
line-height: 24px;
}
}
@media screen and (min-width: 1199px) and (max-width: 1700px) {
.ast-welcome-banner {
max-height: 350px;
}
.ast-col-left {
width: 45%;
}
.ast-col-right {
width: 65%;
}
#astra-sites-on-active .astra-notice-container .notice-actions > button {
font-size: 14px;
}
.ast-welcome-banner .notice-title { .ast-welcome-banner .notice-title {
font-size: 24px; font-size: 24px;
line-height: 36px; line-height: 36px;
} }
.ast-welcome-banner .sub-notice-title { }
font-size: 13px;
@media screen and (max-width: 782px) {
#astra-sites-on-active .astra-notice-container {
padding: 1rem;
}
.ast-welcome-banner .notice-title {
font-size: 20px;
line-height: 30px;
} }
} }

View File

@ -1,3 +1,15 @@
#astra-sites-on-active {
font-family: "Figtree", "Inter", sans-serif;
padding: 0;
border: none;
box-shadow: none;
border-radius: 4px;
}
#astra-sites-on-active .astra-notice-container {
padding: 2rem;
}
.astra-review-notice-container { .astra-review-notice-container {
display: flex; display: flex;
align-items: center; align-items: center;
@ -89,7 +101,7 @@
#astra-sites-on-active .button.updated-message:before, #astra-sites-on-active .button.updated-message:before,
#astra-sites-on-active .button.installed:before, #astra-sites-on-active .button.installed:before,
#astra-sites-on-active .button.installing:before { #astra-sites-on-active .button.installing:before {
margin: 4px 5px 0px -1px; margin: 0 5px 0 0;
} }
.wp-core-ui .astra-notice-wrapper:has(.ast-welcome-banner) { .wp-core-ui .astra-notice-wrapper:has(.ast-welcome-banner) {
@ -98,8 +110,8 @@
.ast-welcome-banner { .ast-welcome-banner {
width: 100%; width: 100%;
display: flex; display: flex;
gap: 40px; gap: 2rem;
justify-content: center; justify-content: space-between;
overflow: hidden; overflow: hidden;
} }
.ast-col-left { .ast-col-left {
@ -108,10 +120,9 @@
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
justify-content: center; justify-content: center;
padding: 40px 0px 40px 28px;
} }
.ast-col-right { .ast-col-right {
width: 50%; max-width: 50%;
display: flex; display: flex;
position: relative; position: relative;
flex-direction: column; flex-direction: column;
@ -123,48 +134,47 @@
position: relative; position: relative;
} }
.ast-welcome-banner .notice-title { .ast-welcome-banner .notice-title {
color: #1e293b; color: #141338;
font-size: 30px; font-size: 30px;
line-height: 38px;
font-weight: 600; font-weight: 600;
line-height: 40px;
letter-spacing: -0.2px;
margin-top: 12px;
margin-bottom: 12px;
padding: 0; padding: 0;
margin-top: 0px;
margin-bottom: 0.375rem;
} }
.ast-welcome-banner .description { .ast-welcome-banner .description {
color: #475569; color: #6F6B99;
font-size: 16px; font-size: 14px;
line-height: 28px; line-height: 20px;
margin-top: 0px; margin-top: 0px;
margin-bottom: 32px; margin-bottom: 1.75rem;
padding: 0px; padding: 0px;
} }
#astra-sites-on-active .astra-notice-container .notice-actions > button { #astra-sites-on-active .astra-notice-container .notice-actions > button {
border-radius: 6px; border-radius: 6px;
background: #046bd2; background: #5C2EDE;
padding: 12px 24px; padding: 12px 24px;
/* shadow/sm */ /* shadow/sm */
color: white; color: white;
box-shadow: none; box-shadow: none;
border: none; border: none;
font-size: 16px; font-size: 14px;
font-weight: 500; line-height: 20px;
line-height: 24px; font-weight: 600;
} }
.ast-welcome-banner .sub-notice-title { .ast-welcome-banner .sub-notice-title {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-self: stretch; align-self: stretch;
color: #646970; color: #6F6B99;
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 20px;
margin: 0; margin: 0 0 1.75rem;
padding: 0; padding: 0;
} }
.astra-notice-container:has(.ast-welcome-banner) { .ast-welcome-banner .notice-actions {
padding-top: 0; margin-bottom: 1.75rem;
padding-bottom: 0;
} }
.ast-welcome-banner .notice-actions button { .ast-welcome-banner .notice-actions button {
font-size: 14px; font-size: 14px;
@ -173,15 +183,15 @@
padding: 12px 24px; padding: 12px 24px;
} }
p.sub-notice-description { p.sub-notice-description {
color: #475569; color: #6F6B99;
font-size: 13px; font-size: 12px;
line-height: 20px; line-height: 16px;
text-decoration: underline; padding: 0;
cursor: pointer;
margin: 0; margin: 0;
padding: 16px 0 0;
} }
.ast-st-sites-cta { .ast-st-sites-cta {
width: fit-content;
max-width: 320px;
border: 1px solid #fff; border: 1px solid #fff;
border-radius: 9999px; border-radius: 9999px;
display: flex; display: flex;
@ -196,6 +206,7 @@ p.sub-notice-description {
bottom: 40px; bottom: 40px;
background: rgb(228 228 228 / 50%); background: rgb(228 228 228 / 50%);
backdrop-filter: blur(4px); backdrop-filter: blur(4px);
display: none; /* maybe show it in future */
} }
.ast-st-sites-cta .ast-page-builder-ico { .ast-st-sites-cta .ast-page-builder-ico {
@ -215,62 +226,34 @@ p.sub-notice-description {
padding-right: 6px; padding-right: 6px;
border-right: 1px solid #fff; border-right: 1px solid #fff;
} }
#astra-sites-on-active {
padding: 0;
}
@media screen and (max-width: 1199px) { @media screen and (max-width: 1199px) {
#astra-sites-on-active .astra-notice-container {
padding: 1.5rem;
}
.ast-col-right { .ast-col-right {
display: none; display: none;
} }
.ast-col-left { .ast-col-left {
width: 100%; width: 100%;
padding: 20px 24px;
align-items: unset; align-items: unset;
padding: 0.5rem 0;
} }
#astra-sites-on-active .astra-notice-container .notice-actions > button { #astra-sites-on-active .astra-notice-container .notice-actions > button {
width: 100%; width: 100%;
} }
}
@media screen and (max-width: 782px) {
.ast-col-left {
width: 100%;
font-size: 14px;
align-items: unset;
padding-left: 15px;
padding-right: 15px;
}
#astra-sites-on-active .astra-notice-container .notice-actions > button {
font-size: 14px;
width: 100%;
}
.ast-welcome-banner .notice-title {
font-size: 22px;
}
.ast-welcome-banner .sub-notice-title,
.ast-welcome-banner .description {
font-size: 14px;
line-height: 24px;
}
}
@media screen and (min-width: 1199px) and (max-width: 1700px) {
.ast-welcome-banner {
max-height: 350px;
}
.ast-col-left {
width: 45%;
}
.ast-col-right {
width: 65%;
}
#astra-sites-on-active .astra-notice-container .notice-actions > button {
font-size: 14px;
}
.ast-welcome-banner .notice-title { .ast-welcome-banner .notice-title {
font-size: 24px; font-size: 24px;
line-height: 36px; line-height: 36px;
} }
.ast-welcome-banner .sub-notice-title { }
font-size: 13px;
@media screen and (max-width: 782px) {
#astra-sites-on-active .astra-notice-container {
padding: 1rem;
}
.ast-welcome-banner .notice-title {
font-size: 20px;
line-height: 30px;
} }
} }

View File

@ -192,7 +192,7 @@ html {
border: none; border: none;
} }
.ast-highlight-wpblock-onhover .block-editor-block-list__layout .block-editor-block-list__block { .ast-highlight-wpblock-onhover .block-editor-block-list__layout .block-editor-block-list__block:not(.has-fit-text) {
transition: all 0.2s; transition: all 0.2s;
} }

View File

@ -192,7 +192,7 @@ html {
border: none; border: none;
} }
.ast-highlight-wpblock-onhover .block-editor-block-list__layout .block-editor-block-list__block { .ast-highlight-wpblock-onhover .block-editor-block-list__layout .block-editor-block-list__block:not(.has-fit-text) {
transition: all 0.2s; transition: all 0.2s;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -85,6 +85,7 @@
$init = $message.data('init'); $init = $message.data('init');
var activatingText = astra.recommendedPluiginActivatingText; var activatingText = astra.recommendedPluiginActivatingText;
var astraSitesLink = astra.astraSitesLink; var astraSitesLink = astra.astraSitesLink;
const astraOnboardingLink = astra?.astraOnboardingLink;
var astraPluginRecommendedNonce = astra.astraPluginManagerNonce; var astraPluginRecommendedNonce = astra.astraPluginManagerNonce;
$message.removeClass( 'install-now installed button-disabled updated-message' ) $message.removeClass( 'install-now installed button-disabled updated-message' )
@ -112,7 +113,8 @@
$message.parent('.ast-addon-link-wrapper').parent('.astra-recommended-plugin').addClass('active'); $message.parent('.ast-addon-link-wrapper').parent('.astra-recommended-plugin').addClass('active');
jQuery(document).trigger( 'ast-after-plugin-active', [astraSitesLink, activatedSlug] ); const redirectionLink = astraOnboardingLink || astraSitesLink;
jQuery(document).trigger( 'ast-after-plugin-active', [ redirectionLink, activatedSlug ] );
} else { } else {
@ -162,7 +164,7 @@
/** /**
* After plugin active redirect and deactivate activation notice * After plugin active redirect and deactivate activation notice
*/ */
_disableActivcationNotice: function( event, astraSitesLink, activatedSlug ) _disableActivcationNotice: function( event, redirectionLink, activatedSlug )
{ {
event.preventDefault(); event.preventDefault();
@ -170,7 +172,12 @@
if ( 'undefined' != typeof AstraNotices ) { if ( 'undefined' != typeof AstraNotices ) {
AstraNotices._ajax( 'astra-sites-on-active', '' ); AstraNotices._ajax( 'astra-sites-on-active', '' );
} }
window.location.href = astraSitesLink + '&ast-disable-activation-notice'; const disableActivationNoticeParam = redirectionLink?.includes( 'onboarding' ) ? '' : '&ast-disable-activation-notice';
// Add delay to prevent plugin activation hook from interfering with redirect
setTimeout( function() {
window.location.href = redirectionLink + disableActivationNoticeParam;
}, 1000 );
} }
}, },
}; };

View File

@ -160,7 +160,62 @@ if ( ! class_exists( 'Astra_Builder_UI_Controller' ) ) {
// First applying wpautop to handle paragraphs, then removing extra <p> around shortcodes. // First applying wpautop to handle paragraphs, then removing extra <p> around shortcodes.
$content = shortcode_unautop( wpautop( $content ) ); $content = shortcode_unautop( wpautop( $content ) );
echo do_shortcode( wp_kses_post( $content ) ); $allowed_html = wp_kses_allowed_html( 'post' );
// Add here additional tags that weren't working if you got something.
$additional_tags = array(
'select' => array(
'name' => true,
'id' => true,
'class' => true,
'multiple' => true,
'size' => true,
'required' => true,
'disabled' => true,
'style' => true,
),
'option' => array(
'value' => true,
'selected' => true,
'disabled' => true,
'class' => true,
'id' => true,
),
'optgroup' => array(
'label' => true,
'disabled' => true,
'class' => true,
),
'iframe' => array(
'src' => true,
'width' => true,
'height' => true,
'frameborder' => true,
'allowfullscreen' => true,
'style' => true,
'title' => true,
'loading' => true,
'referrerpolicy' => true,
'sandbox' => true,
'class' => true,
'id' => true,
),
);
$allowed_html = array_merge( $allowed_html, $additional_tags );
/**
* Filter allowed HTML tags for HTML widget content.
*
* @param array $allowed_html Array of allowed HTML tags and attributes.
* @param string $content The HTML content being filtered.
* @since 4.11.11
*
* @psalm-suppress TooManyArguments
*/
$allowed_html = apply_filters( 'astra_html_widget_allowed_html', $allowed_html, $content );
echo do_shortcode( wp_kses( $content, $allowed_html ) );
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
} }
@ -232,8 +287,7 @@ if ( ! class_exists( 'Astra_Builder_UI_Controller' ) ) {
} }
?> ?>
<div class="ast-button-wrap"> <div class="ast-button-wrap">
<button type="button" class="menu-toggle main-header-menu-toggle ast-mobile-menu-trigger-<?php echo esc_attr( $toggle_btn_style ); ?>" <?php echo apply_filters( 'astra_nav_toggle_data_attrs', '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <?php echo esc_attr( $aria_controls ); ?> aria-expanded="false" aria-label="Main menu toggle"> <button type="button" class="menu-toggle main-header-menu-toggle ast-mobile-menu-trigger-<?php echo esc_attr( $toggle_btn_style ); ?>" <?php echo apply_filters( 'astra_nav_toggle_data_attrs', '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <?php echo esc_attr( $aria_controls ); ?> aria-expanded="false" aria-label="<?php echo esc_attr__( 'Main menu toggle', 'astra' ); ?>">
<span class="screen-reader-text">Main Menu</span>
<span class="mobile-menu-toggle-icon"> <span class="mobile-menu-toggle-icon">
<?php <?php
echo self::fetch_svg_icon( $icon ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo self::fetch_svg_icon( $icon ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped

View File

@ -1 +1 @@
(()=>{var i=".ast-footer-copyright",e=astraBuilderPreview.tablet_break_point||768,a=astraBuilderPreview.mobile_break_point||544;astra_css("astra-settings[footer-copyright-color]","color",i),astra_responsive_font_size("astra-settings[font-size-section-footer-copyright]",i),wp.customize("astra-settings[footer-copyright-alignment]",function(t){t.bind(function(t){var o;""==t.desktop&&""==t.tablet&&""==t.mobile||(o="",o=(o=(o=(o=(o=(o+=".ast-footer-copyright {")+"text-align: "+t.desktop+";} ")+"@media (max-width: "+e+"px) {.ast-footer-copyright {")+"text-align: "+t.tablet+";} ")+"} @media (max-width: "+a+"px) {")+".ast-footer-copyright {text-align: "+t.mobile+";} } ",astra_add_dynamic_css("footer-copyright-alignment",o))})}),wp.customize("astra-settings[section-footer-copyright-margin]",function(t){t.bind(function(t){var o;""==t.desktop.bottom&&""==t.desktop.top&&""==t.desktop.left&&""==t.desktop.right&&""==t.tablet.bottom&&""==t.tablet.top&&""==t.tablet.left&&""==t.tablet.right&&""==t.mobile.bottom&&""==t.mobile.top&&""==t.mobile.left&&""==t.mobile.right||(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o="")+i+" {margin-left: "+t.desktop.left+t["desktop-unit"]+";")+"margin-right: "+t.desktop.right+t["desktop-unit"]+";")+"margin-top: "+t.desktop.top+t["desktop-unit"]+";")+"margin-bottom: "+t.desktop.bottom+t["desktop-unit"]+";")+"} @media (max-width: "+e+"px) {")+i+" {margin-left: "+t.tablet.left+t["tablet-unit"]+";")+"margin-right: "+t.tablet.right+t["tablet-unit"]+";")+"margin-top: "+t.tablet.top+t["desktop-unit"]+";")+"margin-bottom: "+t.tablet.bottom+t["desktop-unit"]+";} ")+"} @media (max-width: "+a+"px) {")+i+" {margin-left: "+t.mobile.left+t["mobile-unit"]+";")+"margin-right: "+t.mobile.right+t["mobile-unit"]+";")+"margin-top: "+t.mobile.top+t["desktop-unit"]+";")+"margin-bottom: "+t.mobile.bottom+t["desktop-unit"]+";} } ",astra_add_dynamic_css("footer-copyright-margin",o))})}),astra_builder_visibility_css("section-footer-copyright",".ast-footer-copyright.ast-builder-layout-element")})(jQuery); (()=>{var i=".ast-footer-copyright",e=astraBuilderPreview.tablet_break_point||768,a=astraBuilderPreview.mobile_break_point||544;astra_css("astra-settings[footer-copyright-color]","color",i),astra_responsive_font_size("astra-settings[font-size-section-footer-copyright]",i),wp.customize("astra-settings[footer-copyright-alignment]",function(t){t.bind(function(t){var o;""==t.desktop&&""==t.tablet&&""==t.mobile||(o="",o=(o=(o=(o=(o=(o+=".ast-footer-copyright {")+"text-align: "+t.desktop+";} ")+"@media (max-width: "+e+"px) {.ast-footer-copyright {")+"text-align: "+t.tablet+";} ")+"} @media (max-width: "+a+"px) {")+".ast-footer-copyright {text-align: "+t.mobile+";} } ",astra_add_dynamic_css("footer-copyright-alignment",o))})}),wp.customize("astra-settings[section-footer-copyright-margin]",function(t){t.bind(function(t){var o;""==t.desktop.bottom&&""==t.desktop.top&&""==t.desktop.left&&""==t.desktop.right&&""==t.tablet.bottom&&""==t.tablet.top&&""==t.tablet.left&&""==t.tablet.right&&""==t.mobile.bottom&&""==t.mobile.top&&""==t.mobile.left&&""==t.mobile.right||(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o="")+i+".site-footer-focus-item {margin-left: "+t.desktop.left+t["desktop-unit"]+";")+"margin-right: "+t.desktop.right+t["desktop-unit"]+";")+"margin-top: "+t.desktop.top+t["desktop-unit"]+";")+"margin-bottom: "+t.desktop.bottom+t["desktop-unit"]+";")+"} @media (max-width: "+e+"px) {")+i+".site-footer-focus-item {margin-left: "+t.tablet.left+t["tablet-unit"]+";")+"margin-right: "+t.tablet.right+t["tablet-unit"]+";")+"margin-top: "+t.tablet.top+t["desktop-unit"]+";")+"margin-bottom: "+t.tablet.bottom+t["desktop-unit"]+";} ")+"} @media (max-width: "+a+"px) {")+i+".site-footer-focus-item {margin-left: "+t.mobile.left+t["mobile-unit"]+";")+"margin-right: "+t.mobile.right+t["mobile-unit"]+";")+"margin-top: "+t.mobile.top+t["desktop-unit"]+";")+"margin-bottom: "+t.mobile.bottom+t["desktop-unit"]+";} } ",astra_add_dynamic_css("footer-copyright-margin",o))})}),astra_builder_visibility_css("section-footer-copyright",".ast-footer-copyright.ast-builder-layout-element")})(jQuery);

View File

@ -63,7 +63,7 @@
margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != '' margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != ''
) { ) {
var dynamicStyle = ''; var dynamicStyle = '';
dynamicStyle += selector + ' {'; dynamicStyle += selector + '.site-footer-focus-item {';
dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';';
dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';';
dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';';
@ -71,7 +71,7 @@
dynamicStyle += '} '; dynamicStyle += '} ';
dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {';
dynamicStyle += selector + ' {'; dynamicStyle += selector + '.site-footer-focus-item {';
dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';';
dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';';
dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';';
@ -80,7 +80,7 @@
dynamicStyle += '} '; dynamicStyle += '} ';
dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {';
dynamicStyle += selector + ' {'; dynamicStyle += selector + '.site-footer-focus-item {';
dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';';
dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';';
dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';';

View File

@ -32,7 +32,7 @@ function astra_fb_copyright_dynamic_css( $dynamic_css, $dynamic_css_filtered = '
$_section = 'section-footer-copyright'; $_section = 'section-footer-copyright';
$selector = '.ast-footer-copyright '; $selector = '.ast-footer-copyright.site-footer-focus-item ';
$visibility_selector = '.ast-footer-copyright.ast-builder-layout-element'; $visibility_selector = '.ast-footer-copyright.ast-builder-layout-element';

View File

@ -150,9 +150,12 @@ if ( ! class_exists( 'Astra_After_Setup_Theme' ) ) {
add_editor_style( 'assets/css/' . $dir_name . '/editor-style' . $file_prefix . '.css' ); add_editor_style( 'assets/css/' . $dir_name . '/editor-style' . $file_prefix . '.css' );
} }
if ( apply_filters( 'astra_fullwidth_oembed', true ) ) { if ( apply_filters( 'astra_fullwidth_oembed', false ) ) {
// Filters the oEmbed process to run the responsive_oembed_wrapper() function. // Filters the oEmbed process to run the responsive_oembed_wrapper() function.
add_filter( 'embed_oembed_html', array( $this, 'responsive_oembed_wrapper' ), 10, 3 ); add_filter( 'embed_oembed_html', array( $this, 'responsive_oembed_wrapper' ), 10, 3 );
} else {
// Enable support for responsive embedded content.
add_theme_support( 'responsive-embeds' );
} }
// WooCommerce. // WooCommerce.

View File

@ -2263,13 +2263,6 @@ if ( ! class_exists( 'Astra_Dynamic_CSS' ) ) {
} }
$static_layout_css = array( $static_layout_css = array(
'.ast-separate-container #primary, .ast-separate-container #secondary' => array(
'padding' => '1.5em 0',
),
'#primary, #secondary' => array(
'padding' => '1.5em 0',
'margin' => 0,
),
'.ast-left-sidebar #content > .ast-container' => array( '.ast-left-sidebar #content > .ast-container' => array(
'display' => 'flex', 'display' => 'flex',
'flex-direction' => 'column-reverse', 'flex-direction' => 'column-reverse',
@ -2277,6 +2270,22 @@ if ( ! class_exists( 'Astra_Dynamic_CSS' ) ) {
), ),
); );
/**
* Backward compatibility: Apply static padding for legacy installs only.
* Legacy = false $update_customizer_strctural_defaults old padding kept.
* New installs = true modern structural defaults.
* Applies to non-archive pages only. @see astra_check_is_structural_setup()
*/
if ( ! is_singular() && ! is_archive() && ! is_home() && false === $update_customizer_strctural_defaults ) {
$static_layout_css['.ast-separate-container #primary, .ast-separate-container #secondary'] = array(
'padding' => '1.5em 0',
);
$static_layout_css['#primary, #secondary'] = array(
'padding' => '1.5em 0',
'margin' => 0,
);
}
// Fix: Prevent layout shrink issue on the Shop page with elementor loop builder. // Fix: Prevent layout shrink issue on the Shop page with elementor loop builder.
if ( defined( 'ELEMENTOR_PRO_VERSION' ) ) { if ( defined( 'ELEMENTOR_PRO_VERSION' ) ) {
$elementor_shop_page_css = array( $elementor_shop_page_css = array(
@ -4199,9 +4208,12 @@ if ( ! class_exists( 'Astra_Dynamic_CSS' ) ) {
$blog_layout_list_css_responsive = array(); $blog_layout_list_css_responsive = array();
// Apply responsive CSS only if Astra Pro is active.
if ( defined( 'ASTRA_EXT_VER' ) ) {
$blog_layout_list_css_responsive[ '.ast-separate-container ' . $bl_selector . ' .post-content' ] = array( $blog_layout_list_css_responsive[ '.ast-separate-container ' . $bl_selector . ' .post-content' ] = array(
'padding' => '0', 'padding' => '0',
); );
}
$blog_layout_list_css_responsive[ $bl_selector . ' .ast-blog-featured-section' ] = array( $blog_layout_list_css_responsive[ $bl_selector . ' .ast-blog-featured-section' ] = array(
'margin-bottom' => '1.5em', 'margin-bottom' => '1.5em',
@ -5530,6 +5542,8 @@ if ( ! class_exists( 'Astra_Dynamic_CSS' ) ) {
$is_site_rtl = is_rtl(); $is_site_rtl = is_rtl();
$ltr_left = $is_site_rtl ? 'right' : 'left'; $ltr_left = $is_site_rtl ? 'right' : 'left';
$ltr_right = $is_site_rtl ? 'left' : 'right'; $ltr_right = $is_site_rtl ? 'left' : 'right';
$empty_cart_btn_selector = self::astra_4_11_12_compatibility() ? '' : ',
.ast-site-header-cart .ast-site-header-cart-data .ast-mini-cart-empty .woocommerce-mini-cart__buttons a.button';
$cart_static_css = ' $cart_static_css = '
.ast-site-header-cart .cart-container, .ast-site-header-cart .cart-container,
@ -5976,8 +5990,7 @@ if ( ! class_exists( 'Astra_Dynamic_CSS' ) ) {
} }
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons .button:not(.checkout):not(.ast-continue-shopping), .woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons .button:not(.checkout):not(.ast-continue-shopping),
.ast-site-header-cart .widget_shopping_cart .buttons .button:not(.checkout), .ast-site-header-cart .widget_shopping_cart .buttons .button:not(.checkout)' . $empty_cart_btn_selector . ' {
.ast-site-header-cart .ast-site-header-cart-data .ast-mini-cart-empty .woocommerce-mini-cart__buttons a.button {
background-color: transparent; background-color: transparent;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
@ -6436,5 +6449,17 @@ if ( ! class_exists( 'Astra_Dynamic_CSS' ) ) {
$astra_settings = get_option( ASTRA_THEME_SETTINGS ); $astra_settings = get_option( ASTRA_THEME_SETTINGS );
return apply_filters( 'astra_get_option_enable-4-8-9-compatibility', isset( $astra_settings['enable-4-8-9-compatibility'] ) ? false : true ); return apply_filters( 'astra_get_option_enable-4-8-9-compatibility', isset( $astra_settings['enable-4-8-9-compatibility'] ) ? false : true );
} }
/**
* In 4.11.12 empty cart button compatibility.
*
* @return bool true|false.
* @since 4.11.12
*/
public static function astra_4_11_12_compatibility() {
$astra_settings = get_option( ASTRA_THEME_SETTINGS );
return apply_filters( 'astra_get_option_enable-4-11-12-compatibility', isset( $astra_settings['enable-4-11-12-compatibility'] ) ? false : true );
}
} }
} }

View File

@ -231,32 +231,18 @@ class Astra_Global_Palette {
* @return string|null Palette key if found, otherwise null. * @return string|null Palette key if found, otherwise null.
*/ */
public static function astra_get_active_global_palette() { public static function astra_get_active_global_palette() {
$active_global_palette_key = ''; $palettes_data = astra_get_palette_colors();
// Get the current palette option from global color palette. $current_palette = isset( $palettes_data['currentPalette'] ) ? $palettes_data['currentPalette'] : 'palette_1';
$astra_options = astra_get_options();
if ( isset( $astra_options['global-color-palette']['palette'] ) ) {
$current_palette = $astra_options['global-color-palette']['palette'];
$default_palettes = self::get_default_color_palette()['palettes'] ?? array();
// Loop through the default palettes to match the selected palette.
foreach ( $default_palettes as $palette_key => $palette_colors ) {
if ( $current_palette === $palette_colors ) {
$active_global_palette_key = $palette_key;
break;
}
}
}
/** /**
* Filters the active global palette key. * Filters the active global palette key.
* *
* @param string $active_global_palette_key The active global palette key. * @param string $current_palette The active global palette key.
* *
* @return string The filtered active global palette key. * @return string The filtered active global palette key.
* @since 4.10.0 * @since 4.10.0
*/ */
return apply_filters( 'astra_get_active_global_palette_key', $active_global_palette_key ); return apply_filters( 'astra_get_active_global_palette_key', $current_palette );
} }
/** /**

View File

@ -0,0 +1,358 @@
<?php
/**
* PHP Memory Limit Warning Notice
*
* @package Astra
* @since 4.11.12
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! defined( 'DAY_IN_SECONDS' ) ) {
define( 'DAY_IN_SECONDS', 24 * 60 * 60 );
}
/**
* Class Astra_Memory_Limit_Notice
*/
class Astra_Memory_Limit_Notice {
/**
* Memory usage percentage threshold to show warning notice
* Change this value to adjust when the warning notice appears
* Default: 90 (shows when 90% memory is used, 10% remaining)
*/
private $warning_threshold = 90;
/**
* Constructor
*/
public function __construct() {
add_action( 'admin_init', array( $this, 'add_memory_notice' ) );
// Added Site Health integration
add_filter( 'site_status_tests', array( $this, 'add_site_health_tests' ) );
}
/**
* Add memory notice using Astra_Notices system
*/
public function add_memory_notice() {
$notice_data = $this->get_memory_notice_data();
// Return if notice is not required.
if ( ! isset( $notice_data['show_notice'] ) || ! $notice_data['show_notice'] ) {
return;
}
// Add notice using Astra_Notices system.
$this->display_memory_notice( $notice_data );
}
/**
* Get memory notice data including whether to show notice and notice type
*
* @return array Array with memory data and notice information.
*/
private function get_memory_notice_data() {
// Only show to administrators.
if ( ! current_user_can( 'manage_options' ) ) {
return array(
'show_notice' => false,
'notice_type' => '',
);
}
$memory_limit = $this->get_memory_limit_in_bytes();
$memory_usage = memory_get_peak_usage( true );
$memory_percentage = $memory_limit > 0 ? ( $memory_usage / $memory_limit * 100 ) : 0;
// Prepare base return data to avoid repetition.
$return_data = array(
'memory_limit' => $memory_limit,
'memory_usage' => $memory_usage,
'memory_percentage' => $memory_percentage,
);
// Show warning notice at threshold usage.
if ( $memory_percentage >= $this->warning_threshold ) {
return array_merge(
$return_data,
array(
'show_notice' => true,
'notice_type' => 'warning',
)
);
}
return array(
'show_notice' => false,
'notice_type' => '',
);
}
/**
* Get recommended memory limit based on current limit
*
* @param int $current_limit_bytes Current memory limit in bytes.
* @return string Recommended memory limit string.
*/
private function get_recommended_memory_limit( $current_limit_bytes ) {
$current_limit_mb = $current_limit_bytes / ( 1024 * 1024 );
if ( $current_limit_mb < 512 ) {
return '512M';
}
if ( $current_limit_mb < 1024 ) {
return '1G';
}
return '2G';
}
/**
* Get PHP memory limit in bytes
*/
private function get_memory_limit_in_bytes() {
$memory_limit = ini_get( 'memory_limit' );
if ( $memory_limit == -1 ) {
return PHP_INT_MAX; // Unlimited
}
// Handle edge cases where ini_get returns false or empty
if ( false === $memory_limit || empty( $memory_limit ) ) {
return 134217728;
}
$unit = strtolower( substr( $memory_limit, -1 ) );
$value = (int) $memory_limit;
if ( $value <= 0 ) {
return 134217728;
}
switch ( $unit ) {
case 'g':
$value *= 1024 * 1024 * 1024;
break;
case 'm':
$value *= 1024 * 1024;
break;
case 'k':
$value *= 1024;
break;
}
return $value;
}
/**
* Register memory notice with Astra_Notices system
*
* @param array $notice_data Array containing memory data and notice type.
*/
private function display_memory_notice( $notice_data ) {
$limit = isset( $notice_data['memory_limit'] ) ? $notice_data['memory_limit'] : 0;
$recommended_limit = $this->get_recommended_memory_limit( $limit );
$message = '<div>';
$message .= '<p><strong>' . esc_html__( '🔔 PHP Memory Limit Notice', 'astra' ) . '</strong></p>';
$message .= '<p>' . esc_html__( 'Your site is nearing its PHP memory limit, which may affect stability.', 'astra' ) . '</p>';
$message .= '<p>' . sprintf(
esc_html__( 'We recommend increasing it to at least %s for best performance.', 'astra' ),
'<strong>' . esc_html( $recommended_limit ) . '</strong>'
) . '</p>';
$message .= '<p><a href="https://wpastra.com/docs/system-requirement-for-astra-theme/" target="_blank" rel="noopener">';
$message .= esc_html__( 'Learn how to increase your PHP memory', 'astra' ) . '</a></p>';
$message .= '</div>';
$notice_args = array(
'id' => 'astra-memory-limit-warning',
'type' => 'warning',
'message' => $message,
'show_if' => true,
'repeat-notice-after' => false, // Don't repeat notice after a certain time.
'is_dismissible' => true,
'capability' => 'manage_options',
'class' => 'astra-memory-notice',
);
Astra_Notices::add_notice( $notice_args );
}
/**
* Format bytes to human readable format
*
* @param int $bytes Number of bytes to format.
* @return string Formatted bytes string.
*/
private function format_bytes( $bytes ) {
$units = array( 'B', 'KB', 'MB', 'GB', 'TB' );
$total = count( $units );
for ( $i = 0; $bytes > 1024 && $i < $total - 1; $i++ ) {
$bytes /= 1024;
}
return round( $bytes, 2 ) . ' ' . $units[ $i ];
}
/**
* Added Site Health tests for memory usage
*
* @param array $tests Existing Site Health tests.
* @return array Modified tests array.
*/
public function add_site_health_tests( $tests ) {
$tests['direct']['astra_memory_usage'] = array(
'label' => __( 'Astra Theme Memory Usage', 'astra' ),
'test' => array( $this, 'site_health_memory_test' ),
);
return $tests;
}
/**
* Site Health test for memory usage
*
* @return array Site Health test result.
*/
public function site_health_memory_test() {
$memory_limit = $this->get_memory_limit_in_bytes();
$memory_usage = memory_get_peak_usage( true );
$memory_percentage = $memory_limit > 0 ? ( $memory_usage / $memory_limit * 100 ) : 0;
$memory_limit_formatted = $this->format_bytes( $memory_limit );
$memory_usage_formatted = $this->format_bytes( $memory_usage );
$memory_remaining_formatted = $this->format_bytes( $memory_limit - $memory_usage );
$percentage_formatted = number_format( $memory_percentage, 1 );
if ( $memory_percentage >= $this->warning_threshold ) {
$status = 'recommended';
$label = __( 'High memory usage detected', 'astra' );
$badge_color = 'orange';
} else {
$status = 'good';
$label = __( 'Memory usage is within acceptable limits', 'astra' );
$badge_color = 'green';
}
$description = $this->get_site_health_description( $memory_percentage, $memory_limit_formatted, $memory_usage_formatted, $memory_remaining_formatted, $percentage_formatted );
$actions = $this->get_site_health_actions( $memory_percentage );
return array(
'label' => $label,
'status' => $status,
'badge' => array(
'label' => __( 'Astra Theme', 'astra' ),
'color' => $badge_color,
),
'description' => $description,
'actions' => $actions,
'test' => 'astra_memory_usage',
);
}
/**
* Get Site Health description based on memory usage
*
* @param float $memory_percentage Memory usage percentage.
* @param string $memory_limit_formatted Formatted memory limit.
* @param string $memory_usage_formatted Formatted memory usage.
* @param string $memory_remaining_formatted Formatted remaining memory.
* @param string $percentage_formatted Formatted percentage.
* @return string Description HTML.
*/
private function get_site_health_description( $memory_percentage, $memory_limit_formatted, $memory_usage_formatted, $memory_remaining_formatted, $percentage_formatted ) {
$description = '<p>';
if ( $memory_percentage >= $this->warning_threshold ) {
$description .= sprintf(
__( 'Your site is using %1$s of %2$s available PHP memory (%3$s%%). Only %4$s remaining.', 'astra' ),
'<strong>' . esc_html( $memory_usage_formatted ) . '</strong>',
'<strong>' . esc_html( $memory_limit_formatted ) . '</strong>',
'<strong>' . esc_html( $percentage_formatted ) . '</strong>',
'<strong>' . esc_html( $memory_remaining_formatted ) . '</strong>'
);
$description .= '</p><p>';
$description .= __( 'While your site is currently functioning, this high memory usage puts you at risk of crashes and errors, especially when using memory-intensive features like the customizer, page builders, or plugins.', 'astra' );
} else {
$description .= sprintf(
__( 'Your site is using %1$s of %2$s available PHP memory (%3$s%%). You have %4$s remaining.', 'astra' ),
'<strong>' . esc_html( $memory_usage_formatted ) . '</strong>',
'<strong>' . esc_html( $memory_limit_formatted ) . '</strong>',
'<strong>' . esc_html( $percentage_formatted ) . '</strong>',
'<strong>' . esc_html( $memory_remaining_formatted ) . '</strong>'
);
$description .= '</p><p>';
$description .= __( 'Your memory usage is within acceptable limits. The Astra theme and your plugins have sufficient memory to operate properly.', 'astra' );
}
$description .= '</p>';
$description .= '<p>';
$description .= __( '<strong>About PHP Memory:</strong> PHP memory limit determines how much memory your website can use. Themes, plugins, and WordPress core all consume memory. When the limit is reached, your site may display errors or stop working.', 'astra' );
$description .= '</p>';
return $description;
}
/**
* Get Site Health actions based on memory usage
*
* @param float $memory_percentage Memory usage percentage.
* @return string Actions HTML.
*/
private function get_site_health_actions( $memory_percentage ) {
$actions = '';
if ( $memory_percentage >= $this->warning_threshold ) {
$current_limit = $this->get_memory_limit_in_bytes();
$recommended_limit = $this->get_recommended_memory_limit( $current_limit );
$actions .= '<h4>' . __( 'How to increase PHP memory limit:', 'astra' ) . '</h4>';
$actions .= '<ol>';
$actions .= '<li><strong>' . __( 'Contact your hosting provider', 'astra' ) . '</strong><br>';
$actions .= sprintf( __( 'The easiest solution is to ask your hosting provider to increase your PHP memory limit to at least %s.', 'astra' ), $recommended_limit ) . '</li>';
$actions .= '<li><strong>' . __( 'Edit wp-config.php file', 'astra' ) . '</strong><br>';
$actions .= __( 'Add this line to your wp-config.php file (before the "/* That\'s all, stop editing!" line):', 'astra' ) . '<br>';
$actions .= '<code style="background: #f1f1f1; padding: 4px 8px; border-radius: 3px; font-family: monospace; color: #d63638;">define(\'WP_MEMORY_LIMIT\', \'' . esc_html( $recommended_limit ) . '\');</code></li>';
$actions .= '<li><strong>' . __( 'Edit .htaccess file', 'astra' ) . '</strong><br>';
$actions .= __( 'Add this line to your .htaccess file:', 'astra' ) . '<br>';
$actions .= '<code style="background: #f1f1f1; padding: 4px 8px; border-radius: 3px; font-family: monospace; color: #d63638;">php_value memory_limit ' . esc_html( $recommended_limit ) . '</code></li>';
$actions .= '<li><strong>' . __( 'Edit php.ini file', 'astra' ) . '</strong><br>';
$actions .= __( 'If you have access to php.ini, change this line:', 'astra' ) . '<br>';
$actions .= '<code style="background: #f1f1f1; padding: 4px 8px; border-radius: 3px; font-family: monospace; color: #d63638;">memory_limit = ' . esc_html( $recommended_limit ) . '</code></li>';
$actions .= '</ol>';
$actions .= '<p><strong>' . __( 'Recommended memory limits:', 'astra' ) . '</strong></p>';
$actions .= '<ul>';
$actions .= '<li>' . __( 'Basic WordPress site: 256MB', 'astra' ) . '</li>';
$actions .= '<li>' . __( 'Site with multiple plugins: 512MB', 'astra' ) . '</li>';
$actions .= '<li>' . __( 'WooCommerce or complex site: 1GB or higher', 'astra' ) . '</li>';
$actions .= '</ul>';
$actions .= '<p>';
$actions .= sprintf(
__( 'For detailed instructions, visit our <a href="%s" target="_blank" rel="noopener">documentation on increasing PHP memory limit</a>.', 'astra' ),
'https://wpastra.com/docs/system-requirement-for-astra-theme/'
);
$actions .= '</p>';
} else {
$actions .= '<p>' . __( 'No action required. Your memory usage is within acceptable limits.', 'astra' ) . '</p>';
$actions .= '<p>' . __( 'Continue monitoring your memory usage, especially when installing new plugins or themes.', 'astra' ) . '</p>';
}
return $actions;
}
}
// Initialize the memory notice class
new Astra_Memory_Limit_Notice();

View File

@ -105,10 +105,10 @@ if ( ! class_exists( 'Astra_Mobile_Header' ) ) {
'ast-menu-toggle', 'ast-menu-toggle',
array( array(
'aria-expanded' => 'false', 'aria-expanded' => 'false',
'aria-label' => 'Toggle menu', 'aria-label' => __( 'Toggle Menu', 'astra' ),
), ),
$item $item
) . '><span class="screen-reader-text">' . esc_html__( 'Menu Toggle', 'astra' ) . '</span>' . Astra_Icons::get_icons( 'arrow' ) . '</button>'; ) . '>' . Astra_Icons::get_icons( 'arrow' ) . '</button>';
return $item_output; return $item_output;
} }

View File

@ -241,6 +241,20 @@ if ( ! class_exists( 'Astra_Elementor' ) ) {
if ( empty( $post->post_content ) && $this->is_elementor_activated( $id ) ) { if ( empty( $post->post_content ) && $this->is_elementor_activated( $id ) ) {
update_post_meta( $id, '_astra_content_layout_flag', 'disabled' ); update_post_meta( $id, '_astra_content_layout_flag', 'disabled' );
/**
* Filter to use default settings instead of applying Elementor-specific modifications.
*
* @param bool $use_default_settings Default false. When true, skip all Elementor modifications.
* @param int $post_id Current post ID.
* @since 4.11.11
*/
$use_default_settings = apply_filters( 'astra_elementor_use_default_settings', false, $id );
if ( $use_default_settings ) {
return;
}
update_post_meta( $id, 'site-post-title', 'disabled' ); update_post_meta( $id, 'site-post-title', 'disabled' );
update_post_meta( $id, 'ast-title-bar-display', 'disabled' ); update_post_meta( $id, 'ast-title-bar-display', 'disabled' );
update_post_meta( $id, 'ast-featured-img', 'disabled' ); update_post_meta( $id, 'ast-featured-img', 'disabled' );

View File

@ -115,6 +115,7 @@ class Astra_Gutenberg {
if ( if (
isset( $block['blockName'] ) && isset( $block['attrs']['layout']['inherit'] ) && $block['attrs']['layout']['inherit'] isset( $block['blockName'] ) && isset( $block['attrs']['layout']['inherit'] ) && $block['attrs']['layout']['inherit']
) { ) {
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, simple string replacement with quoted pattern
$block_content = preg_replace( $block_content = preg_replace(
'/' . preg_quote( 'class="', '/' ) . '/', '/' . preg_quote( 'class="', '/' ) . '/',
'class="inherit-container-width ', 'class="inherit-container-width ',

View File

@ -1,7 +1,7 @@
{ {
"customizer-settings": { "customizer-settings": {
"astra-settings": { "astra-settings": {
"theme-auto-version": "4.11.10", "theme-auto-version": "4.11.16",
"blog-single-post-structure": [ "blog-single-post-structure": [
"single-image", "single-image",
"single-title-meta" "single-title-meta"

View File

@ -50,6 +50,7 @@ class Astra_SureCart {
add_filter( 'astra_page_layout', array( $this, 'sc_shop_sidebar_layout' ) ); add_filter( 'astra_page_layout', array( $this, 'sc_shop_sidebar_layout' ) );
add_filter( 'astra_get_content_layout', array( $this, 'sc_shop_content_layout' ) ); add_filter( 'astra_get_content_layout', array( $this, 'sc_shop_content_layout' ) );
add_action( 'wp', array( $this, 'remove_navigation_for_sc_product' ) ); add_action( 'wp', array( $this, 'remove_navigation_for_sc_product' ) );
add_action( 'astra_theme_dynamic_css', array( $this, 'surecart_compatibility_dynamic_css' ) );
// Boxed layout support. // Boxed layout support.
add_filter( 'astra_is_content_layout_boxed', array( $this, 'sc_shop_content_boxed_layout' ) ); add_filter( 'astra_is_content_layout_boxed', array( $this, 'sc_shop_content_boxed_layout' ) );
@ -61,6 +62,37 @@ class Astra_SureCart {
add_action( 'admin_bar_menu', array( $this, 'customize_admin_bar' ), 999 ); add_action( 'admin_bar_menu', array( $this, 'customize_admin_bar' ), 999 );
} }
/**
* SureCart Compatibility Dynamic CSS
*
* @param string $dynamic_css Astra Dynamic CSS.
* @since 4.11.16
*/
public function surecart_compatibility_dynamic_css( $dynamic_css ) {
// Check if SureCart single product page.
if ( is_singular( 'sc_product' ) ) {
$dynamic_css .= <<<CSS
/**
* Reset padding for blocks when body has surecart class to avoid conflicts
*/
body[class*="surecart-"] .entry-content > .wp-block-group {
padding: 0;
}
/**
* Reset margin adjustments for alignwide on smaller screens when body has surecart class
*/
@media (max-width: 1200px) {
body[class*="surecart-"].ast-separate-container .entry-content[data-ast-blocks-layout] > .alignwide {
margin: 0 auto;
}
}
CSS;
}
return $dynamic_css;
}
/** /**
* Register Customizer sections and panel for SureCart. * Register Customizer sections and panel for SureCart.
* *

View File

@ -72,6 +72,9 @@ if ( ! class_exists( 'Astra_Woocommerce' ) ) {
add_action( 'wp', array( $this, 'shop_meta_option' ), 1 ); add_action( 'wp', array( $this, 'shop_meta_option' ), 1 );
add_action( 'wp', array( $this, 'cart_page_upselles' ) ); add_action( 'wp', array( $this, 'cart_page_upselles' ) );
// Quantity plus minus button placeholders.
add_action( 'wp', array( $this, 'init_quantity_placeholder_buttons' ) );
add_filter( 'loop_shop_columns', array( $this, 'shop_columns' ) ); add_filter( 'loop_shop_columns', array( $this, 'shop_columns' ) );
add_filter( 'loop_shop_per_page', array( $this, 'shop_no_of_products' ) ); add_filter( 'loop_shop_per_page', array( $this, 'shop_no_of_products' ) );
add_filter( 'body_class', array( $this, 'shop_page_products_item_class' ) ); add_filter( 'body_class', array( $this, 'shop_page_products_item_class' ) );
@ -171,6 +174,7 @@ if ( ! class_exists( 'Astra_Woocommerce' ) ) {
public function add_active_filter_widget_class( $block_content, $block ) { public function add_active_filter_widget_class( $block_content, $block ) {
if ( isset( $block['blockName'] ) && isset( $block['attrs']['displayStyle'] ) && 'chips' === $block['attrs']['displayStyle'] ) { if ( isset( $block['blockName'] ) && isset( $block['attrs']['displayStyle'] ) && 'chips' === $block['attrs']['displayStyle'] ) {
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, simple string replacement with quoted pattern
$block_content = preg_replace( $block_content = preg_replace(
'/' . preg_quote( 'class="', '/' ) . '/', '/' . preg_quote( 'class="', '/' ) . '/',
'class="ast-woo-active-filter-widget ', 'class="ast-woo-active-filter-widget ',
@ -735,6 +739,10 @@ if ( ! class_exists( 'Astra_Woocommerce' ) ) {
*/ */
public function woo_filter_style( $styles ) { public function woo_filter_style( $styles ) {
if ( ! Astra_Enqueue_Scripts::should_load_woocommerce_css() ) {
return array();
}
/* Directory and Extension */ /* Directory and Extension */
$file_prefix = '.min'; $file_prefix = '.min';
$dir_name = 'minified'; $dir_name = 'minified';
@ -1512,6 +1520,10 @@ if ( ! class_exists( 'Astra_Woocommerce' ) ) {
* @since 1.0.31 * @since 1.0.31
*/ */
public function add_scripts_styles() { public function add_scripts_styles() {
if ( ! Astra_Enqueue_Scripts::should_load_woocommerce_js() ) {
return;
}
if ( is_cart() ) { if ( is_cart() ) {
wp_enqueue_script( 'wc-cart-fragments' ); // Require for cart widget update on the cart page. wp_enqueue_script( 'wc-cart-fragments' ); // Require for cart widget update on the cart page.
} }
@ -2708,11 +2720,16 @@ if ( ! class_exists( 'Astra_Woocommerce' ) ) {
$add_to_cart_quantity_btn_css = ''; $add_to_cart_quantity_btn_css = '';
$add_to_cart_quantity_btn_css .= ' $add_to_cart_quantity_btn_css .= '
.woocommerce-js .quantity.buttons_added { .woocommerce-js .quantity {
display: inline-flex; display: inline-flex;
} }
.woocommerce-js .quantity.buttons_added + .button.single_add_to_cart_button { /* Quantity Plus Minus Button - Placeholder for CLS. */
.woocommerce .quantity .ast-qty-placeholder {
cursor: not-allowed;
}
.woocommerce-js .quantity + .button.single_add_to_cart_button {
margin-' . $ltr_left . ': unset; margin-' . $ltr_left . ': unset;
} }
@ -3894,6 +3911,94 @@ if ( ! class_exists( 'Astra_Woocommerce' ) ) {
return $value; return $value;
} }
/**
* Initialize quantity placeholder buttons.
*
* @since 4.11.11
*/
public function init_quantity_placeholder_buttons() {
if ( astra_add_to_cart_quantity_btn_enabled() ) {
add_filter( 'woocommerce_quantity_input_args', array( $this, 'maybe_add_quantity_buttons' ), 10, 2 );
}
}
/**
* Hook quantity placeholder buttons based on product type and stock.
*
* @since 4.11.16
*
* @param array $args Quantity input arguments.
* @param WC_Product $product Product object.
* @return array Modified quantity input arguments.
*/
public function maybe_add_quantity_buttons( $args, $product ) {
// Skip buttons for sold individually products.
if ( $product->is_sold_individually() ) {
return $args;
}
// Skip buttons for products with stock less than or equal to 1, only on single product pages.
if ( is_product() && $product->managing_stock() && $product->get_stock_quantity() <= 1 ) {
return $args;
}
add_action( 'woocommerce_before_quantity_input_field', array( $this, 'render_placeholder_minus_button' ), 5 );
add_action( 'woocommerce_after_quantity_input_field', array( $this, 'render_placeholder_plus_button' ), 15 );
return $args;
}
/**
* Get quantity button class based on option type.
*
* @since 4.11.11
*
* @return string
*/
public function get_quantity_btn_class() {
$quantity_btn_type = astra_get_option( 'cart-plus-minus-button-type', 'normal' );
switch ( $quantity_btn_type ) {
case 'vertical':
case 'vertical-icon':
return ' ast-vertical-icon';
case 'no-internal-border':
return ' no-internal-border';
default:
return '';
}
}
/**
* Render placeholder minus button.
*
* @since 4.11.11
*/
public function render_placeholder_minus_button() {
$btn_class = $this->get_quantity_btn_class();
echo '<a href="javascript:void(0)" class="ast-qty-placeholder minus' . esc_attr( $btn_class ) . '">-</a>';
// Remove action to prevent buttons on further quantity inputs in the cart area.
remove_action( 'woocommerce_before_quantity_input_field', array( $this, 'render_placeholder_minus_button' ), 5 );
}
/**
* Render placeholder plus button.
*
* @since 4.11.11
*/
public function render_placeholder_plus_button() {
$btn_class = $this->get_quantity_btn_class();
echo '<a href="javascript:void(0)" class="ast-qty-placeholder plus' . esc_attr( $btn_class ) . '">+</a>';
// Remove action to prevent buttons on further quantity inputs in the cart area.
remove_action( 'woocommerce_after_quantity_input_field', array( $this, 'render_placeholder_plus_button' ), 15 );
}
} }
} }

View File

@ -109,22 +109,32 @@ if ( ! class_exists( 'Astra_Woo_Shop_Cart_Layout_Configs' ) ) {
'control' => 'ast-upgrade', 'control' => 'ast-upgrade',
'campaign' => 'woocommerce', 'campaign' => 'woocommerce',
'choices' => array( 'choices' => array(
'two' => array( // 'two' => array(
'title' => __( 'Modern cart layout', 'astra' ), // 'title' => __( 'Modern cart layout', 'astra' ),
), // ),
// 'one' => array(
// 'title' => __( 'Sticky cart totals', 'astra' ),
// ),
// 'three' => array(
// 'title' => __( 'Real-time quantity updater', 'astra' ),
// ),
'one' => array( 'one' => array(
'title' => __( 'Sticky cart totals', 'astra' ), 'title' => __( 'Real-Time Quantity Updates', 'astra' ),
),
'two' => array(
'title' => __( 'Sticky Cart Totals for Better UX', 'astra' ),
), ),
'three' => array( 'three' => array(
'title' => __( 'Real-time quantity updater', 'astra' ), 'title' => __( 'Modern, Clean Cart Layout', 'astra' ),
), ),
), ),
'section' => 'section-woo-shop-cart', 'section' => 'section-woo-shop-cart',
'default' => '', 'default' => '',
'priority' => 999, 'priority' => 999,
'title' => __( 'Convert more, earn more with extensive cart conversion features', 'astra' ), 'title' => __( 'Optimize Your Cart for Sales', 'astra' ),
'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ),
'context' => array(), 'context' => array(),
'thumbnail' => ASTRA_THEME_URI . 'inc/assets/images/customizer/woo-cart.png',
); );
$_configs[] = array( $_configs[] = array(
@ -133,43 +143,53 @@ if ( ! class_exists( 'Astra_Woo_Shop_Cart_Layout_Configs' ) ) {
'control' => 'ast-upgrade', 'control' => 'ast-upgrade',
'campaign' => 'woocommerce', 'campaign' => 'woocommerce',
'choices' => array( 'choices' => array(
'two' => array( // 'two' => array(
'title' => __( 'Modern layout', 'astra' ), // 'title' => __( 'Modern layout', 'astra' ),
), // ),
// 'one' => array(
// 'title' => __( 'Multi-column layouts', 'astra' ),
// ),
// 'three' => array(
// 'title' => __( 'Modern order received layout', 'astra' ),
// ),
// 'four' => array(
// 'title' => __( 'Sticky order review', 'astra' ),
// ),
// 'five' => array(
// 'title' => __( 'Two-step checkout', 'astra' ),
// ),
// 'six' => array(
// 'title' => __( 'Order note, Coupon field control', 'astra' ),
// ),
// 'seven' => array(
// 'title' => __( 'Distraction free checkout', 'astra' ),
// ),
// 'eight' => array(
// 'title' => __( 'Persistent checkout form data', 'astra' ),
// ),
// 'nine' => array(
// 'title' => __( 'Text form options', 'astra' ),
// ),
// 'ten' => array(
// 'title' => __( 'Summary, Payment background', 'astra' ),
// ),
'one' => array( 'one' => array(
'title' => __( 'Multi-column layouts', 'astra' ), 'title' => __( 'Sticky Totals & Saved Form Data', 'astra' ),
),
'two' => array(
'title' => __( '2-Step & Distraction-Free Layouts', 'astra' ),
), ),
'three' => array( 'three' => array(
'title' => __( 'Modern order received layout', 'astra' ), 'title' => __( 'Full Control Over Notes, Coupons & Layouts', 'astra' ),
),
'four' => array(
'title' => __( 'Sticky order review', 'astra' ),
),
'five' => array(
'title' => __( 'Two-step checkout', 'astra' ),
),
'six' => array(
'title' => __( 'Order note, Coupon field control', 'astra' ),
),
'seven' => array(
'title' => __( 'Distraction free checkout', 'astra' ),
),
'eight' => array(
'title' => __( 'Persistent checkout form data', 'astra' ),
),
'nine' => array(
'title' => __( 'Text form options', 'astra' ),
),
'ten' => array(
'title' => __( 'Summary, Payment background', 'astra' ),
), ),
), ),
'section' => 'woocommerce_checkout', 'section' => 'woocommerce_checkout',
'default' => '', 'default' => '',
'priority' => 999, 'priority' => 999,
'title' => __( 'Encourage last-minute purchases with extra conversion options at checkout', 'astra' ), 'title' => __( 'Smarter Checkout. More Conversions', 'astra' ),
'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ),
'context' => array(), 'context' => array(),
'thumbnail' => ASTRA_THEME_URI . 'inc/assets/images/customizer/woo-checkout.png',
); );
} }

View File

@ -383,43 +383,56 @@ if ( ! class_exists( 'Astra_Woo_Shop_Layout_Configs' ) ) {
'control' => 'ast-upgrade', 'control' => 'ast-upgrade',
'campaign' => 'woocommerce', 'campaign' => 'woocommerce',
'choices' => array( 'choices' => array(
// 'two' => array(
// 'title' => __( 'More shop design layouts', 'astra' ),
// ),
// 'three' => array(
// 'title' => __( 'Shop toolbar structure', 'astra' ),
// ),
// 'five' => array(
// 'title' => __( 'Offcanvas product filters', 'astra' ),
// ),
// 'six' => array(
// 'title' => __( 'Products quick view', 'astra' ),
// ),
// 'seven' => array(
// 'title' => __( 'Shop pagination', 'astra' ),
// ),
// 'eight' => array(
// 'title' => __( 'More typography options', 'astra' ),
// ),
// 'nine' => array(
// 'title' => __( 'More color options', 'astra' ),
// ),
// 'ten' => array(
// 'title' => __( 'More spacing options', 'astra' ),
// ),
// 'four' => array(
// 'title' => __( 'Box shadow design options', 'astra' ),
// ),
// 'one' => array(
// 'title' => __( 'More design controls', 'astra' ),
// ),
'one' => array(
'title' => __( 'Multiple Shop Card Designs', 'astra' ),
),
'two' => array( 'two' => array(
'title' => __( 'More shop design layouts', 'astra' ), 'title' => __( 'Flexible Toolbar & Filter Layouts', 'astra' ),
), ),
'three' => array( 'three' => array(
'title' => __( 'Shop toolbar structure', 'astra' ), 'title' => __( 'Customizable Shop Structure Options', 'astra' ),
),
'five' => array(
'title' => __( 'Offcanvas product filters', 'astra' ),
),
'six' => array(
'title' => __( 'Products quick view', 'astra' ),
),
'seven' => array(
'title' => __( 'Shop pagination', 'astra' ),
),
'eight' => array(
'title' => __( 'More typography options', 'astra' ),
),
'nine' => array(
'title' => __( 'More color options', 'astra' ),
),
'ten' => array(
'title' => __( 'More spacing options', 'astra' ),
), ),
'four' => array( 'four' => array(
'title' => __( 'Box shadow design options', 'astra' ), 'title' => __( 'Stylish Pagination Options', 'astra' ),
),
'one' => array(
'title' => __( 'More design controls', 'astra' ),
), ),
), ),
'section' => 'woocommerce_product_catalog', 'section' => 'woocommerce_product_catalog',
'default' => '', 'default' => '',
'priority' => 999, 'priority' => 999,
'title' => __( 'Optimize your WooCommerce store for maximum profit with enhanced features', 'astra' ), 'title' => __( 'Get advanced product catalog controls', 'astra' ),
'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ),
'context' => array(), 'context' => array(),
'thumbnail' => ASTRA_THEME_URI . 'inc/assets/images/customizer/woo-catalog.png',
); );
} }

View File

@ -67,34 +67,44 @@ if ( ! class_exists( 'Astra_Woo_Shop_Misc_Layout_Configs' ) ) {
'control' => 'ast-upgrade', 'control' => 'ast-upgrade',
'campaign' => 'woocommerce', 'campaign' => 'woocommerce',
'choices' => array( 'choices' => array(
'two' => array( // 'two' => array(
'title' => __( 'Modern input style', 'astra' ), // 'title' => __( 'Modern input style', 'astra' ),
), // ),
// 'one' => array(
// 'title' => __( 'Sale badge modifications', 'astra' ),
// ),
// 'three' => array(
// 'title' => __( 'Ecommerce steps navigation', 'astra' ),
// ),
// 'four' => array(
// 'title' => __( 'Quantity updater designs', 'astra' ),
// ),
// 'five' => array(
// 'title' => __( 'Modern my-account page', 'astra' ),
// ),
// 'six' => array(
// 'title' => __( 'Downloads, Orders grid view', 'astra' ),
// ),
// 'seven' => array(
// 'title' => __( 'Modern thank-you page design', 'astra' ),
// ),
'one' => array( 'one' => array(
'title' => __( 'Sale badge modifications', 'astra' ), 'title' => __( 'Advanced Input Field Styles & Border Radius', 'astra' ),
),
'two' => array(
'title' => __( 'Custom Coupon Text & Step Navigation', 'astra' ),
), ),
'three' => array( 'three' => array(
'title' => __( 'Ecommerce steps navigation', 'astra' ), 'title' => __( 'Quantity Plus and Minus Buttons', 'astra' ),
),
'four' => array(
'title' => __( 'Quantity updater designs', 'astra' ),
),
'five' => array(
'title' => __( 'Modern my-account page', 'astra' ),
),
'six' => array(
'title' => __( 'Downloads, Orders grid view', 'astra' ),
),
'seven' => array(
'title' => __( 'Modern thank-you page design', 'astra' ),
), ),
), ),
'section' => 'section-woo-misc', 'section' => 'section-woo-misc',
'default' => '', 'default' => '',
'priority' => 999, 'priority' => 999,
'title' => __( 'Access extra conversion tools to make more profit from your eCommerce store', 'astra' ), 'title' => __( 'Get Sleek Storefront. Better UX', 'astra' ),
'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ),
'context' => array(), 'context' => array(),
'thumbnail' => ASTRA_THEME_URI . 'inc/assets/images/customizer/woo-misc.png',
); );
} }

View File

@ -612,37 +612,47 @@ if ( ! class_exists( 'Astra_Woo_Shop_Single_Layout_Configs' ) ) {
'control' => 'ast-upgrade', 'control' => 'ast-upgrade',
'campaign' => 'woocommerce', 'campaign' => 'woocommerce',
'choices' => array( 'choices' => array(
// 'two' => array(
// 'title' => __( 'More product galleries', 'astra' ),
// ),
// 'three' => array(
// 'title' => __( 'Sticky product summary', 'astra' ),
// ),
// 'five' => array(
// 'title' => __( 'Product description layouts', 'astra' ),
// ),
// 'six' => array(
// 'title' => __( 'Related, Upsell product controls', 'astra' ),
// ),
// 'seven' => array(
// 'title' => __( 'Extras option for product structure', 'astra' ),
// ),
// 'eight' => array(
// 'title' => __( 'More typography options', 'astra' ),
// ),
// 'nine' => array(
// 'title' => __( 'More color options', 'astra' ),
// ),
// 'one' => array(
// 'title' => __( 'More design controls', 'astra' ),
// ),
'one' => array(
'title' => __( ' Advanced Gallery Layouts', 'astra' ),
),
'two' => array( 'two' => array(
'title' => __( 'More product galleries', 'astra' ), 'title' => __( ' Smooth Zoom & Sticky Image Effects', 'astra' ),
), ),
'three' => array( 'three' => array(
'title' => __( 'Sticky product summary', 'astra' ), 'title' => __( ' Upsells, Related & Recently Viewed Products', 'astra' ),
),
'five' => array(
'title' => __( 'Product description layouts', 'astra' ),
),
'six' => array(
'title' => __( 'Related, Upsell product controls', 'astra' ),
),
'seven' => array(
'title' => __( 'Extras option for product structure', 'astra' ),
),
'eight' => array(
'title' => __( 'More typography options', 'astra' ),
),
'nine' => array(
'title' => __( 'More color options', 'astra' ),
),
'one' => array(
'title' => __( 'More design controls', 'astra' ),
), ),
), ),
'section' => 'section-woo-shop-single', 'section' => 'section-woo-shop-single',
'default' => '', 'default' => '',
'priority' => 999, 'priority' => 999,
'title' => __( 'Extra conversion options for store product pages means extra profit!', 'astra' ), 'title' => __( 'Get Full Control Over Product Pages', 'astra' ),
'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ),
'context' => array(), 'context' => array(),
'thumbnail' => ASTRA_THEME_URI . 'inc/assets/images/customizer/woo-single.png',
); );
} }
} }

View File

@ -100,6 +100,43 @@ if ( ! class_exists( 'Astra_Admin_Settings' ) ) {
} }
} }
/**
* Get the Astra onboarding link
* if the Starter Templates plugin version is >= 4.4.36.
*
* @return string Onboarding link URL if condition matches, otherwise empty string.
*/
public static function get_astra_onboarding_link() {
// Load plugin.php functions if not already available.
if ( ! function_exists( 'get_plugins' ) ) {
if ( ! defined( 'ABSPATH' ) ) {
return '';
}
require_once ABSPATH . '/wp-admin/includes/plugin.php';
}
$onboarding_link = admin_url( 'admin.php?page=astra-onboarding' );
$st_version = '';
$all_plugins = get_plugins();
// First check Premium Starter Templates.
if ( isset( $all_plugins['astra-pro-sites/astra-pro-sites.php'] ) ) {
$st_version = isset( $all_plugins['astra-pro-sites/astra-pro-sites.php']['Version'] ) ? $all_plugins['astra-pro-sites/astra-pro-sites.php']['Version'] : '';
}
// Otherwise check Starter Templates.
elseif ( isset( $all_plugins['astra-sites/astra-sites.php'] ) ) {
$st_version = isset( $all_plugins['astra-sites/astra-sites.php']['Version'] ) ? $all_plugins['astra-sites/astra-sites.php']['Version'] : '';
}
// If version is lower than 4.4.38, return empty.
if ( $st_version && version_compare( $st_version, '4.4.38', '<' ) ) {
return '';
}
return $onboarding_link;
}
/** /**
* Add custom megamenu fields data to the menu. * Add custom megamenu fields data to the menu.
* *
@ -141,6 +178,7 @@ if ( ! class_exists( 'Astra_Admin_Settings' ) ) {
$localize = array( $localize = array(
'ajaxUrl' => admin_url( 'admin-ajax.php' ), 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
'astraSitesLink' => admin_url( 'themes.php?page=starter-templates' ), 'astraSitesLink' => admin_url( 'themes.php?page=starter-templates' ),
'astraOnboardingLink' => self::get_astra_onboarding_link(),
'recommendedPluiginActivatingText' => __( 'Activating', 'astra' ) . '&hellip;', 'recommendedPluiginActivatingText' => __( 'Activating', 'astra' ) . '&hellip;',
'recommendedPluiginDeactivatingText' => __( 'Deactivating', 'astra' ) . '&hellip;', 'recommendedPluiginDeactivatingText' => __( 'Deactivating', 'astra' ) . '&hellip;',
'recommendedPluiginActivateText' => __( 'Activate', 'astra' ), 'recommendedPluiginActivateText' => __( 'Activate', 'astra' ),
@ -188,7 +226,7 @@ if ( ! class_exists( 'Astra_Admin_Settings' ) ) {
$ele_image_path = ASTRA_THEME_URI . 'inc/assets/images/ele-logo.svg'; $ele_image_path = ASTRA_THEME_URI . 'inc/assets/images/ele-logo.svg';
$ai_image_path = ASTRA_THEME_URI . 'inc/assets/images/ai-logo.svg'; $ai_image_path = ASTRA_THEME_URI . 'inc/assets/images/ai-logo.svg';
$ast_sites_notice_btn = self::astra_sites_notice_button(); $ast_sites_notice_btn = self::astra_sites_notice_button();
$ast_sites_notice_btn['button_text'] = __( 'Lets Get Started with Starter Templates', 'astra' ); $ast_sites_notice_btn['button_text'] = __( 'Start Building Now', 'astra' );
if ( file_exists( WP_PLUGIN_DIR . '/astra-sites/astra-sites.php' ) && is_plugin_inactive( 'astra-sites/astra-sites.php' ) && is_plugin_inactive( 'astra-pro-sites/astra-pro-sites.php' ) ) { if ( file_exists( WP_PLUGIN_DIR . '/astra-sites/astra-sites.php' ) && is_plugin_inactive( 'astra-sites/astra-sites.php' ) && is_plugin_inactive( 'astra-pro-sites/astra-pro-sites.php' ) ) {
$ast_sites_notice_btn['class'] .= ' button button-primary'; $ast_sites_notice_btn['class'] .= ' button button-primary';
@ -211,7 +249,7 @@ if ( ! class_exists( 'Astra_Admin_Settings' ) ) {
<div class="notice-actions"> <div class="notice-actions">
<button class="%4$s" %5$s %6$s %7$s %8$s %9$s %10$s> %11$s </button> <button class="%4$s" %5$s %6$s %7$s %8$s %9$s %10$s> %11$s </button>
</div> </div>
<p class="sub-notice-description astra-notice-close">%13$s</p> <p class="sub-notice-description">%13$s</p>
</div> </div>
<div class="ast-col-right"> <div class="ast-col-right">
<img src="%12$s" alt="Starter Templates" /> <img src="%12$s" alt="Starter Templates" />
@ -223,9 +261,9 @@ if ( ! class_exists( 'Astra_Admin_Settings' ) ) {
</div> </div>
</div> </div>
</div>', </div>',
__( 'Thank you for choosing the Astra theme!', 'astra' ), __( 'Thank you for choosing Astra!', 'astra' ),
__( 'Build Your Dream Site in Minutes With AI 🚀', 'astra' ), __( 'Your Website, Ready in Minutes - Lets Start!', 'astra' ),
__( 'Say goodbye to the days of spending weeks designing and building your website. With Astra and our Starter Templates plugin, you can now create professional-grade websites in minutes.', 'astra' ), __( 'No complicated setup, no waiting - just a smooth, hassle-free way to bring your website to life. Follow a few quick steps, and youll be up and running in no time!', 'astra' ),
esc_attr( $ast_sites_notice_btn['class'] ), esc_attr( $ast_sites_notice_btn['class'] ),
'href="' . astra_get_prop( $ast_sites_notice_btn, 'link', '' ) . '"', 'href="' . astra_get_prop( $ast_sites_notice_btn, 'link', '' ) . '"',
'data-slug="' . astra_get_prop( $ast_sites_notice_btn, 'data_slug', '' ) . '"', 'data-slug="' . astra_get_prop( $ast_sites_notice_btn, 'data_slug', '' ) . '"',
@ -235,7 +273,7 @@ if ( ! class_exists( 'Astra_Admin_Settings' ) ) {
'data-activating-text="' . astra_get_prop( $ast_sites_notice_btn, 'activating_text', '' ) . '"', 'data-activating-text="' . astra_get_prop( $ast_sites_notice_btn, 'activating_text', '' ) . '"',
esc_html( $ast_sites_notice_btn['button_text'] ), esc_html( $ast_sites_notice_btn['button_text'] ),
$image_path, $image_path,
__( 'I want to build this website from scratch', 'astra' ), __( 'By clicking <b>"Start Building Now,"</b> you agree to install and activate the <b>Starter Templates</b> plugin.', 'astra' ),
__( '300+ Templates', 'astra' ), __( '300+ Templates', 'astra' ),
$gb_image_path, $gb_image_path,
$ele_image_path, $ele_image_path,

View File

@ -189,7 +189,7 @@ if ( ! class_exists( 'Astra_Enqueue_Scripts' ) ) {
} }
if ( ( class_exists( 'Easy_Digital_Downloads' ) && Astra_Builder_Helper::is_component_loaded( 'edd-cart', 'header' ) ) || if ( ( class_exists( 'Easy_Digital_Downloads' ) && Astra_Builder_Helper::is_component_loaded( 'edd-cart', 'header' ) ) ||
( class_exists( 'WooCommerce' ) && Astra_Builder_Helper::is_component_loaded( 'woo-cart', 'header' ) ) ) { ( class_exists( 'WooCommerce' ) && Astra_Builder_Helper::is_component_loaded( 'woo-cart', 'header' ) && self::should_load_woocommerce_js() ) ) {
$default_assets['js']['astra-mobile-cart'] = 'mobile-cart'; $default_assets['js']['astra-mobile-cart'] = 'mobile-cart';
} }
@ -199,7 +199,7 @@ if ( ! class_exists( 'Astra_Enqueue_Scripts' ) ) {
$default_assets['js']['astra-live-search'] = 'live-search'; $default_assets['js']['astra-live-search'] = 'live-search';
} }
if ( class_exists( 'WooCommerce' ) ) { if ( class_exists( 'WooCommerce' ) && self::should_load_woocommerce_js() ) {
if ( is_product() && astra_get_option( 'single-product-sticky-add-to-cart' ) ) { if ( is_product() && astra_get_option( 'single-product-sticky-add-to-cart' ) ) {
$default_assets['js']['astra-sticky-add-to-cart'] = 'sticky-add-to-cart'; $default_assets['js']['astra-sticky-add-to-cart'] = 'sticky-add-to-cart';
} }
@ -247,6 +247,28 @@ if ( ! class_exists( 'Astra_Enqueue_Scripts' ) ) {
Astra_Fonts::add_font( $heading_font_family, $heading_font_variant ); Astra_Fonts::add_font( $heading_font_family, $heading_font_variant );
} }
/**
* Check if WooCommerce JS assets should be loaded based on filter settings
*
* @return bool Whether WooCommerce JS should be loaded
* @since 4.11.13
*/
public static function should_load_woocommerce_js() {
// Allow users to disable WooCommerce JS loading on specific pages/posts/post types
return apply_filters( 'astra_load_woocommerce_js', true );
}
/**
* Check if WooCommerce CSS assets should be loaded based on filter settings
*
* @return bool Whether WooCommerce CSS should be loaded
* @since 4.11.13
*/
public static function should_load_woocommerce_css() {
// Allow users to disable WooCommerce CSS loading on specific pages/posts/post types
return apply_filters( 'astra_load_woocommerce_css', true );
}
/** /**
* Enqueue Scripts * Enqueue Scripts
*/ */
@ -269,7 +291,6 @@ if ( ! class_exists( 'Astra_Enqueue_Scripts' ) ) {
// Flexibility.js for flexbox IE10 support. // Flexibility.js for flexbox IE10 support.
wp_enqueue_script( 'astra-flexibility', $js_uri . 'flexibility' . $file_prefix . '.js', array(), ASTRA_THEME_VERSION, false ); wp_enqueue_script( 'astra-flexibility', $js_uri . 'flexibility' . $file_prefix . '.js', array(), ASTRA_THEME_VERSION, false );
wp_add_inline_script( 'astra-flexibility', 'flexibility(document.documentElement);' ); wp_add_inline_script( 'astra-flexibility', 'flexibility(document.documentElement);' );
wp_script_add_data( 'astra-flexibility', 'conditional', 'IE' );
// Polyfill for CustomEvent for IE. // Polyfill for CustomEvent for IE.
wp_register_script( 'astra-customevent', $js_uri . 'custom-events-polyfill' . $file_prefix . '.js', array(), ASTRA_THEME_VERSION, false ); wp_register_script( 'astra-customevent', $js_uri . 'custom-events-polyfill' . $file_prefix . '.js', array(), ASTRA_THEME_VERSION, false );
@ -362,8 +383,14 @@ if ( ! class_exists( 'Astra_Enqueue_Scripts' ) ) {
// Register & Enqueue Scripts. // Register & Enqueue Scripts.
foreach ( $scripts as $key => $script ) { foreach ( $scripts as $key => $script ) {
// Set dependencies based on script type.
$dependencies = array();
if ( 'astra-mobile-cart' === $key && class_exists( 'WooCommerce' ) ) {
$dependencies = array( 'jquery', 'wc-add-to-cart' );
}
// Register. // Register.
wp_register_script( $key, $js_uri . $script . $file_prefix . '.js', array(), ASTRA_THEME_VERSION, true ); wp_register_script( $key, $js_uri . $script . $file_prefix . '.js', $dependencies, ASTRA_THEME_VERSION, true );
// Enqueue. // Enqueue.
wp_enqueue_script( $key ); wp_enqueue_script( $key );
@ -447,7 +474,7 @@ if ( ! class_exists( 'Astra_Enqueue_Scripts' ) ) {
wp_localize_script( 'astra-live-search', 'astra_search', apply_filters( 'astra_search_js_localize', $astra_live_search_localize_data ) ); wp_localize_script( 'astra-live-search', 'astra_search', apply_filters( 'astra_search_js_localize', $astra_live_search_localize_data ) );
} }
if ( class_exists( 'woocommerce' ) ) { if ( class_exists( 'woocommerce' ) && self::should_load_woocommerce_js() ) {
$is_astra_pro = function_exists( 'astra_has_pro_woocommerce_addon' ) ? astra_has_pro_woocommerce_addon() : false; $is_astra_pro = function_exists( 'astra_has_pro_woocommerce_addon' ) ? astra_has_pro_woocommerce_addon() : false;
$astra_shop_add_to_cart_localize_data = array( $astra_shop_add_to_cart_localize_data = array(
@ -492,6 +519,7 @@ if ( ! class_exists( 'Astra_Enqueue_Scripts' ) ) {
// Trim white space for faster page loading. // Trim white space for faster page loading.
if ( ! empty( $css ) ) { if ( ! empty( $css ) ) {
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, removes CSS comments only
$css = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css ); $css = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css );
$css = str_replace( array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' ' ), '', $css ); $css = str_replace( array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' ' ), '', $css );
$css = str_replace( ', ', ',', $css ); $css = str_replace( ', ', ',', $css );

View File

@ -63,12 +63,80 @@ class Astra_Icons {
'width' => array(), 'width' => array(),
'height' => array(), 'height' => array(),
'viewbox' => array(), 'viewbox' => array(),
'fill' => array(),
'stroke' => array(),
'stroke-width' => array(),
'stroke-linecap' => array(),
'stroke-linejoin' => array(),
), ),
'g' => array( 'fill' => array() ),
'title' => array( 'title' => array() ), 'title' => array( 'title' => array() ),
'g' => array(
'fill' => array(),
'stroke' => array(),
'transform' => array(),
),
'path' => array( 'path' => array(
'd' => array(), 'd' => array(),
'fill' => array(), 'fill' => array(),
'stroke' => array(),
'stroke-width' => array(),
'fill-rule' => array(),
),
'circle' => array(
'cx' => array(),
'cy' => array(),
'r' => array(),
'fill' => array(),
'stroke' => array(),
'stroke-width' => array(),
),
'rect' => array(
'x' => array(),
'y' => array(),
'width' => array(),
'height' => array(),
'rx' => array(),
'ry' => array(),
'fill' => array(),
'stroke' => array(),
'stroke-width' => array(),
),
'line' => array(
'x1' => array(),
'y1' => array(),
'x2' => array(),
'y2' => array(),
'stroke' => array(),
'stroke-width' => array(),
),
'polygon' => array(
'points' => array(),
'fill' => array(),
'stroke' => array(),
'stroke-width' => array(),
),
'polyline' => array(
'points' => array(),
'fill' => array(),
'stroke' => array(),
'stroke-width' => array(),
),
'ellipse' => array(
'cx' => array(),
'cy' => array(),
'rx' => array(),
'ry' => array(),
'fill' => array(),
'stroke' => array(),
'stroke-width' => array(),
),
'defs' => array(),
'clipPath' => array(
'id' => array(),
),
'use' => array(
'xlink:href' => array(),
'href' => array(), // modern SVG2.
), ),
); );
} }

View File

@ -82,10 +82,10 @@ if ( ! class_exists( 'Astra_Walker_Page' ) ) {
array( array(
'aria-expanded' => 'false', 'aria-expanded' => 'false',
'aria-haspopup' => 'true', 'aria-haspopup' => 'true',
'aria-label' => 'Toggle menu', 'aria-label' => __( 'Toggle menu', 'astra' ),
), ),
$page $page
) . '><span class="screen-reader-text">' . __( 'Menu Toggle', 'astra' ) . '</span>' . Astra_Icons::get_icons( 'arrow' ) . '</button>'; ) . Astra_Icons::get_icons( 'arrow' ) . '</button>';
} }
} else { } else {
if ( isset( $page->post_parent ) && 0 === $page->post_parent ) { if ( isset( $page->post_parent ) && 0 === $page->post_parent ) {
@ -94,10 +94,10 @@ if ( ! class_exists( 'Astra_Walker_Page' ) ) {
array( array(
'aria-expanded' => 'false', 'aria-expanded' => 'false',
'aria-haspopup' => 'true', 'aria-haspopup' => 'true',
'aria-label' => 'Toggle menu', 'aria-label' => __( 'Toggle menu', 'astra' ),
), ),
$page $page
) . '><span class="screen-reader-text">' . __( 'Menu Toggle', 'astra' ) . '</span>' . Astra_Icons::get_icons( 'arrow' ) . '</button>'; ) . Astra_Icons::get_icons( 'arrow' ) . '</button>';
} }
} }
} }

View File

@ -467,7 +467,7 @@ class Astra_WP_Editor_CSS {
'.wp-block-post-content' => array( '.wp-block-post-content' => array(
'color' => esc_attr( $text_color ), 'color' => esc_attr( $text_color ),
), ),
'.has-text-color .block-editor-block-list__block:not(:is(.wp-block-heading, .wp-block-button))' => array( '.has-text-color .block-editor-block-list__block:not(:is(.wp-block-heading, .wp-block-button, .wp-block-spectra-pro-form-link))' => array(
'color' => 'inherit', 'color' => 'inherit',
), ),
'.wp-block-cover:not(.has-text-color.has-link-color) .wp-block-cover__inner-container .block-editor-rich-text__editable.wp-block-paragraph' => array( '.wp-block-cover:not(.has-text-color.has-link-color) .wp-block-cover__inner-container .block-editor-rich-text__editable.wp-block-paragraph' => array(
@ -700,7 +700,7 @@ class Astra_WP_Editor_CSS {
} }
// Boxed, Content-Boxed, page title alignment with Spectra Container Blocks. // Boxed, Content-Boxed, page title alignment with Spectra Container Blocks.
$desktop_css['.ast-separate-container .editor-styles-wrapper .block-editor-block-list__layout.is-root-container > .uagb-is-root-container'] = array( $desktop_css['.ast-separate-container .editor-styles-wrapper .block-editor-block-list__layout.is-root-container > :is(.uagb-is-root-container, .spectra-is-root-container)'] = array(
'max-width' => 'var(--wp--custom--ast-content-width-size)', 'max-width' => 'var(--wp--custom--ast-content-width-size)',
); );
@ -930,7 +930,7 @@ class Astra_WP_Editor_CSS {
'text-decoration' => 'none', 'text-decoration' => 'none',
'font-size' => '1.25rem', 'font-size' => '1.25rem',
); );
$desktop_css['.ast-plain-container.ast-no-sidebar .editor-styles-wrapper .is-root-container.block-editor-block-list__layout > .alignwide.uagb-is-root-container '] = array( $desktop_css['.ast-plain-container.ast-no-sidebar .editor-styles-wrapper .is-root-container.block-editor-block-list__layout > .alignwide:is(.uagb-is-root-container, .spectra-is-root-container)'] = array(
'max-width' => $container_width_comp, 'max-width' => $container_width_comp,
); );
$desktop_css['.ast-separate-container .editor-styles-wrapper .block-editor-block-list__layout.is-root-container .alignwide, .ast-plain-container .editor-styles-wrapper .block-editor-block-list__layout.is-root-container .alignwide'] = array( $desktop_css['.ast-separate-container .editor-styles-wrapper .block-editor-block-list__layout.is-root-container .alignwide, .ast-plain-container .editor-styles-wrapper .block-editor-block-list__layout.is-root-container .alignwide'] = array(

View File

@ -40,6 +40,7 @@ if ( ! function_exists( 'astra_get_foreground_color' ) ) {
if ( strpos( $hex, 'rgba' ) !== false ) { if ( strpos( $hex, 'rgba' ) !== false ) {
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier.
$rgba = preg_replace( '/[^0-9,]/', '', $hex ); $rgba = preg_replace( '/[^0-9,]/', '', $hex );
$rgba = explode( ',', $rgba ); $rgba = explode( ',', $rgba );
@ -769,7 +770,14 @@ if ( ! function_exists( 'astra_get_post_id' ) ) {
if ( is_home() ) { if ( is_home() ) {
$post_id = get_option( 'page_for_posts' ); $post_id = get_option( 'page_for_posts' );
} elseif ( function_exists( 'is_shop' ) && is_shop() && function_exists( 'wc_get_page_id' ) ) { } elseif (
function_exists( 'wc_get_page_id' ) &&
(
( function_exists( 'is_shop' ) && is_shop() ) ||
( function_exists( 'is_product_category' ) && is_product_category() ) ||
( function_exists( 'is_product_tag' ) && is_product_tag() )
)
) {
$post_id = wc_get_page_id( 'shop' ); $post_id = wc_get_page_id( 'shop' );
} elseif ( is_archive() ) { } elseif ( is_archive() ) {
global $wp_query; global $wp_query;
@ -1944,6 +1952,7 @@ function astra_get_filter_svg( $filter_id, $color ) {
$svg = ob_get_clean(); $svg = ob_get_clean();
// Clean up the whitespace. // Clean up the whitespace.
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, normalizes whitespace in SVG output
$svg = preg_replace( "/[\r\n\t ]+/", ' ', $svg ); $svg = preg_replace( "/[\r\n\t ]+/", ' ', $svg );
$svg = str_replace( '> <', '><', $svg ); $svg = str_replace( '> <', '><', $svg );
return trim( $svg ); return trim( $svg );
@ -2267,3 +2276,28 @@ function astra_button_consistency_compatibility() {
$astra_settings = astra_get_options(); $astra_settings = astra_get_options();
return apply_filters( 'astra_get_option_btn-consist-comp', isset( $astra_settings['btn-consist-comp'] ) ? false : true ); return apply_filters( 'astra_get_option_btn-consist-comp', isset( $astra_settings['btn-consist-comp'] ) ? false : true );
} }
// Flip horizontal alignment for RTL so saved left/right mirror automatically.
if ( ! function_exists( 'astra_flip_rtl_alignment' ) ) {
/**
* Flip horizontal alignment for RTL so saved left/right mirror automatically.
*
* @param string $alignment The alignment value to flip (left, right, or other).
* @return string The flipped alignment value for RTL or original value.
* @since 4.11.11
*/
function astra_flip_rtl_alignment( $alignment ) {
if ( ! is_rtl() ) {
return $alignment;
}
switch ( $alignment ) {
case 'left':
return 'right';
case 'right':
return 'left';
default:
return $alignment;
}
}
}

View File

@ -114,8 +114,11 @@ if ( ! class_exists( 'Astra_Customizer_Sanitizes' ) ) {
} }
// Strip php tags. // Strip php tags.
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, sanitizes SVG by removing PHP tags
$content = preg_replace( '/<\?(=|php)(.+?)\?>/i', '', $original_content ); $content = preg_replace( '/<\?(=|php)(.+?)\?>/i', '', $original_content );
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, sanitizes SVG by removing PHP tags
$content = preg_replace( '/<\?(.*)\?>/Us', '', $content ); $content = preg_replace( '/<\?(.*)\?>/Us', '', $content );
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, sanitizes SVG by removing PHP tags
$content = preg_replace( '/<\%(.*)\%>/Us', '', $content ); $content = preg_replace( '/<\%(.*)\%>/Us', '', $content );
if ( false !== strpos( $content, '<?php' ) || ( false !== strpos( $content, '<%' ) ) ) { if ( false !== strpos( $content, '<?php' ) || ( false !== strpos( $content, '<%' ) ) ) {
@ -123,7 +126,9 @@ if ( ! class_exists( 'Astra_Customizer_Sanitizes' ) ) {
} }
// Strip comments. // Strip comments.
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, sanitizes SVG by removing PHP tags
$content = preg_replace( '/<!--(.*)-->/Us', '', $content ); $content = preg_replace( '/<!--(.*)-->/Us', '', $content );
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, sanitizes SVG by removing PHP tags
$content = preg_replace( '/\/\*(.*)\*\//Us', '', $content ); $content = preg_replace( '/\/\*(.*)\*\//Us', '', $content );
if ( false !== strpos( $content, '<!--' ) || ( false !== strpos( $content, '/*' ) ) ) { if ( false !== strpos( $content, '<!--' ) || ( false !== strpos( $content, '/*' ) ) ) {
@ -131,6 +136,7 @@ if ( ! class_exists( 'Astra_Customizer_Sanitizes' ) ) {
} }
// Strip line breaks. // Strip line breaks.
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, sanitizes SVG by removing PHP tags
$content = preg_replace( '/\r|\n/', '', $content ); $content = preg_replace( '/\r|\n/', '', $content );
// Find the start and end tags so we can cut out miscellaneous garbage. // Find the start and end tags so we can cut out miscellaneous garbage.
@ -626,6 +632,7 @@ if ( ! class_exists( 'Astra_Customizer_Sanitizes' ) ) {
// CSS variable value sanitize. // CSS variable value sanitize.
if ( 0 === strpos( $color, 'var(--' ) ) { if ( 0 === strpos( $color, 'var(--' ) ) {
// phpcs:ignore Generic.PHP.ForbiddenFunctions.FoundWithAlternative -- Safe usage: no /e modifier, sanitizes SVG by removing PHP tags
return preg_replace( '/[^A-Za-z0-9_)(\-,.]/', '', $color ); return preg_replace( '/[^A-Za-z0-9_)(\-,.]/', '', $color );
} }

View File

@ -142,8 +142,20 @@ if ( ! class_exists( 'Astra_Customizer' ) ) {
return false; return false;
} }
// Default to Astra customizer. // Bail early if it is the Email Customizer Pro plugin customizer.
return true; if ( isset( $_GET['sa_email_customizer'] ) && true == $_GET['sa_email_customizer'] ) { // phpcs:ignore WordPress.Security.NonceVerification
return false;
}
/**
* Allow third-party plugins to bail early from Astra customizer.
*
* @param bool $is_astra_customizer Whether the current request is for Astra customizer.
*
* @return bool True if it is Astra customizer, false otherwise.
* @since 4.11.16
*/
return apply_filters( 'astra_is_astra_customizer', true );
} }
/** /**
* Constructor * Constructor
@ -1160,7 +1172,7 @@ if ( ! class_exists( 'Astra_Customizer' ) ) {
'is_site_rtl' => is_rtl(), 'is_site_rtl' => is_rtl(),
'defaults' => $this->get_control_defaults(), 'defaults' => $this->get_control_defaults(),
'isWP_5_9' => astra_wp_version_compare( '5.8.99', '>=' ), 'isWP_5_9' => astra_wp_version_compare( '5.8.99', '>=' ),
'googleFonts' => Astra_Font_Families::get_google_fonts(), 'googleFonts' => array(),
'variantLabels' => Astra_Font_Families::font_variant_labels(), 'variantLabels' => Astra_Font_Families::font_variant_labels(),
'upgradeUrl' => array( 'upgradeUrl' => array(
'default' => astra_get_upgrade_url( 'customizer' ), 'default' => astra_get_upgrade_url( 'customizer' ),
@ -1202,6 +1214,24 @@ if ( ! class_exists( 'Astra_Customizer' ) ) {
array( 'wp-components' ), array( 'wp-components' ),
ASTRA_THEME_VERSION ASTRA_THEME_VERSION
); );
$dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified';
$file_prefix = SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script(
'astra-google-fonts-loader',
ASTRA_THEME_URI . 'assets/js/' . $dir_name . '/customizer-google-fonts' . $file_prefix . '.js',
array( 'jquery', 'customize-controls' ),
ASTRA_THEME_VERSION,
true
);
wp_localize_script(
'astra-google-fonts-loader',
'astraCustomizer',
array(
'customizer_nonce' => wp_create_nonce( 'astra_customizer_nonce' ),
)
);
} }
/** /**
@ -1481,6 +1511,7 @@ if ( ! class_exists( 'Astra_Customizer' ) ) {
wp_enqueue_script( 'astra-customizer-controls-toggle-js', ASTRA_THEME_URI . 'assets/js/' . $dir . '/customizer-controls-toggle' . $js_prefix, array(), ASTRA_THEME_VERSION, true ); wp_enqueue_script( 'astra-customizer-controls-toggle-js', ASTRA_THEME_URI . 'assets/js/' . $dir . '/customizer-controls-toggle' . $js_prefix, array(), ASTRA_THEME_VERSION, true );
wp_enqueue_script( 'astra-customizer-controls-js', ASTRA_THEME_URI . 'assets/js/' . $dir . '/customizer-controls' . $js_prefix, array( 'astra-customizer-controls-toggle-js' ), ASTRA_THEME_VERSION, true ); wp_enqueue_script( 'astra-customizer-controls-js', ASTRA_THEME_URI . 'assets/js/' . $dir . '/customizer-controls' . $js_prefix, array( 'astra-customizer-controls-toggle-js' ), ASTRA_THEME_VERSION, true );
// Extended Customizer Assets - Panel extended. // Extended Customizer Assets - Panel extended.
wp_enqueue_style( 'astra-extend-customizer-css', ASTRA_THEME_URI . 'assets/css/minified/extend-customizer' . $css_prefix, null, ASTRA_THEME_VERSION ); wp_enqueue_style( 'astra-extend-customizer-css', ASTRA_THEME_URI . 'assets/css/minified/extend-customizer' . $css_prefix, null, ASTRA_THEME_VERSION );
wp_enqueue_script( 'astra-extend-customizer-js', ASTRA_THEME_URI . 'assets/js/' . $dir . '/extend-customizer' . $js_prefix, array(), ASTRA_THEME_VERSION, true ); wp_enqueue_script( 'astra-extend-customizer-js', ASTRA_THEME_URI . 'assets/js/' . $dir . '/extend-customizer' . $js_prefix, array(), ASTRA_THEME_VERSION, true );
@ -1872,6 +1903,7 @@ if ( ! class_exists( 'Astra_Customizer' ) ) {
$js_prefix = '.min.js'; $js_prefix = '.min.js';
$dir = 'minified'; $dir = 'minified';
/** @psalm-suppress RedundantCondition */
if ( SCRIPT_DEBUG ) { if ( SCRIPT_DEBUG ) {
$js_prefix = '.js'; $js_prefix = '.js';
$dir = 'unminified'; $dir = 'unminified';

View File

@ -23,17 +23,35 @@ if ( ! class_exists( 'Astra_Fonts_Data' ) ) {
final class Astra_Fonts_Data { final class Astra_Fonts_Data {
/** /**
* Localize Fonts * Localize Fonts
*
* @param bool $skip_google_fonts Whether to skip Google Fonts loading for initial load optimization.
*/ */
public static function js() { public static function js( $skip_google_fonts = true ) {
$system = wp_json_encode( Astra_Font_Families::get_system_fonts() ); $system = wp_json_encode( Astra_Font_Families::get_system_fonts() );
$google = wp_json_encode( Astra_Font_Families::get_google_fonts() );
$custom = wp_json_encode( Astra_Font_Families::get_custom_fonts() ); $custom = wp_json_encode( Astra_Font_Families::get_custom_fonts() );
if ( ! empty( $custom ) ) {
return 'var AstFontFamilies = { system: ' . $system . ', custom: ' . $custom . ', google: ' . $google . ' };'; /** @psalm-suppress UndefinedVariable */
if ( $skip_google_fonts ) {
$custom = $custom ? $custom : '{}';
/** @psalm-suppress RedundantConditionGivenDocblockType */
if ( ! empty( $custom ) && '{}' !== $custom ) {
return 'var AstFontFamilies = { system: ' . ( $system ?: '{}' ) . ', custom: ' . $custom . ', google: {}, googleLoaded: false };';
}
return 'var AstFontFamilies = { system: ' . ( $system ?: '{}' ) . ', google: {}, googleLoaded: false };';
} }
return 'var AstFontFamilies = { system: ' . $system . ', google: ' . $google . ' };'; $google = wp_json_encode( Astra_Font_Families::get_google_fonts() );
$custom = $custom ? $custom : '{}';
$google = $google ? $google : '{}';
$system = $system ? $system : '{}';
/** @psalm-suppress RedundantConditionGivenDocblockType */
if ( ! empty( $custom ) && '{}' !== $custom ) {
return 'var AstFontFamilies = { system: ' . $system . ', custom: ' . $custom . ', google: ' . $google . ', googleLoaded: true };';
}
return 'var AstFontFamilies = { system: ' . $system . ', google: ' . $google . ', googleLoaded: true };';
} }
} }

View File

@ -295,28 +295,38 @@ function astra_builder_footer_configuration( $configurations = array() ) {
'control' => 'ast-upgrade', 'control' => 'ast-upgrade',
'campaign' => 'footer-builder', 'campaign' => 'footer-builder',
'choices' => array( 'choices' => array(
// 'two' => array(
// 'title' => __( 'Divider element', 'astra' ),
// ),
// 'three' => array(
// 'title' => __( 'Language Switcher element', 'astra' ),
// ),
// 'five' => array(
// 'title' => __( 'Clone, Delete element options', 'astra' ),
// ),
// 'six' => array(
// 'title' => __( 'Increased element count', 'astra' ),
// ),
// 'seven' => array(
// 'title' => __( 'More design options', 'astra' ),
// ),
'one' => array(
'title' => __( 'Advanced Customization Options', 'astra' ),
),
'two' => array( 'two' => array(
'title' => __( 'Divider element', 'astra' ), 'title' => __( 'Multiple Widgets, Buttons, Dividers', 'astra' ),
), ),
'three' => array( 'three' => array(
'title' => __( 'Language Switcher element', 'astra' ), 'title' => __( 'Color & Typography Options', 'astra' ),
),
'five' => array(
'title' => __( 'Clone, Delete element options', 'astra' ),
),
'six' => array(
'title' => __( 'Increased element count', 'astra' ),
),
'seven' => array(
'title' => __( 'More design options', 'astra' ),
), ),
), ),
'section' => 'section-footer-builder-layout', 'section' => 'section-footer-builder-layout',
'default' => '', 'default' => '',
'context' => array(), 'context' => array(),
'priority' => 999, 'priority' => 999,
'title' => __( 'Finish your page on a high with amazing website footers', 'astra' ), 'title' => __( 'Get Advanced Footer Controls', 'astra' ),
'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ),
'thumbnail' => ASTRA_THEME_URI . 'inc/assets/images/customizer/footer-builder.png',
); );
} }

View File

@ -696,31 +696,44 @@ function astra_header_header_builder_configuration( $configurations = array() )
'control' => 'ast-upgrade', 'control' => 'ast-upgrade',
'campaign' => 'header-builder', 'campaign' => 'header-builder',
'choices' => array( 'choices' => array(
// 'one' => array(
// 'title' => __( 'Sticky header', 'astra' ),
// ),
// 'two' => array(
// 'title' => __( 'Divider element', 'astra' ),
// ),
// 'three' => array(
// 'title' => __( 'Language Switcher', 'astra' ),
// ),
// 'four' => array(
// 'title' => __( 'Toggle Button element', 'astra' ),
// ),
// 'five' => array(
// 'title' => __( 'Clone, Delete options', 'astra' ),
// ),
// 'seven' => array(
// 'title' => __( 'More design options', 'astra' ),
// ),
'one' => array( 'one' => array(
'title' => __( 'Sticky header', 'astra' ), 'title' => __( 'Color switcher to add dark mode', 'astra' ),
), ),
'two' => array( 'two' => array(
'title' => __( 'Divider element', 'astra' ), 'title' => __( 'Mega-menus for better navigation', 'astra' ),
), ),
'three' => array( 'three' => array(
'title' => __( 'Language Switcher', 'astra' ), 'title' => __( 'Different menus for logged-in users', 'astra' ),
), ),
'four' => array( 'four' => array(
'title' => __( 'Toggle Button element', 'astra' ), 'title' => __( 'Advanced buttons, icons, search & more', 'astra' ),
),
'five' => array(
'title' => __( 'Clone, Delete options', 'astra' ),
),
'seven' => array(
'title' => __( 'More design options', 'astra' ),
), ),
), ),
'section' => 'section-header-builder-layout', 'section' => 'section-header-builder-layout',
'default' => '', 'default' => '',
'priority' => 999, 'priority' => 999,
'context' => array(), 'context' => array(),
'title' => __( 'Make an instant connection with amazing site headers', 'astra' ), 'title' => __( 'Better Header = Better UX = More clicks', 'astra' ),
'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ),
'thumbnail' => ASTRA_THEME_URI . 'inc/assets/images/customizer/header-builder.png',
); );
} }

View File

@ -45,7 +45,9 @@ if ( ! class_exists( 'Astra_Site_Layout_Configs' ) ) {
'operator' => '==', 'operator' => '==',
'value' => 'ast-full-width-layout', 'value' => 'ast-full-width-layout',
), ),
) : array(), ) : array(
Astra_Builder_Helper::$general_tab_config,
),
'suffix' => 'px', 'suffix' => 'px',
'input_attrs' => array( 'input_attrs' => array(
'min' => 768, 'min' => 768,

File diff suppressed because one or more lines are too long

View File

@ -419,8 +419,8 @@
display: block; display: block;
padding: 8px 18px; padding: 8px 18px;
border-radius: 30px; border-radius: 30px;
border: 1px solid var( --ast-customizer-color-1 ); border: 1px solid #5c2ede;
background-color: #5c2ede; background: linear-gradient(-90deg, #EB1B99 -23.83%, #321978 28.86%, #321978 49.67%, #321978 74.52%, #5810FF 109.73%);
color: var( --ast-customizer-color-9 ); color: var( --ast-customizer-color-9 );
font-size: 13px !important; font-size: 13px !important;
font-weight: 400; font-weight: 400;
@ -430,6 +430,12 @@
gap: 12px; gap: 12px;
} }
.ast-upgrade-pro-heading{
font-size: 13px;
font-weight: 700;
text-align: center;
}
.customize-control-ast-button-link .ast-button-link:hover, .customize-control-ast-button-link .ast-button-link:hover,
.ast-upgrade-pro-wrap .ast-button-link:hover { .ast-upgrade-pro-wrap .ast-button-link:hover {
background-color: var( --ast-customizer-color-9 ); background-color: var( --ast-customizer-color-9 );
@ -1390,8 +1396,8 @@ section.ast-palette-presets-inner-wrap {
} }
.ast-field-settings-modal .astra-color-picker-wrap { .ast-field-settings-modal .astra-color-picker-wrap {
position: relative; position: absolute;
top: 10px; top: 25px;
} }
.ast-color-palette .components-circular-option-picker__option-wrapper { .ast-color-palette .components-circular-option-picker__option-wrapper {
@ -1770,6 +1776,14 @@ li#customize-control-astra-settings-transparent-content-section-text-color-respo
margin-top: 8px; margin-top: 8px;
} }
#astra-settings-related-posts-colors-group-tabs .ast-control-wrap {
display: block;
}
#astra-settings-related-posts-colors-group-tabs .astra-color-picker-wrap.picker-open .astra-popover-color {
margin: 5px -5px 0;
}
/* Global customizer color palette */ /* Global customizer color palette */
:root { :root {
@ -2982,6 +2996,11 @@ li.customize-control.ast-top-section-spacing {
#customize-control-astra-settings-blog-filter-taxonomy-text-colors { #customize-control-astra-settings-blog-filter-taxonomy-text-colors {
margin-top: 0; margin-top: 0;
} }
#customize-control-astra-settings-blog-filter-taxonomy-bg-colors{
margin-top: 0;
margin-bottom: 16px;
}
.ast-typo-presets { .ast-typo-presets {
width: 100%; width: 100%;
display: flex; display: flex;
@ -4912,7 +4931,6 @@ li#customize-control-astra-settings-header-preset-style .customizer-text {
.customize-control-ast-slider .ast-slider-wrap, .customize-control-ast-slider .ast-slider-wrap,
.customize-control-ast-responsive-slider .ast-slider-wrap { .customize-control-ast-responsive-slider .ast-slider-wrap {
position: relative; position: relative;
z-index: 1;
} }
.components-range-control__wrapper .components-range-control__track { .components-range-control__wrapper .components-range-control__track {
@ -5497,7 +5515,7 @@ li#customize-control-astra-settings-header-preset-style .customizer-text {
} }
.ast-group-tabs .ui-widget-content { .ast-group-tabs .ui-widget-content {
overflow: hidden; overflow: visible;
/*padding-top: 15px;*/ /*padding-top: 15px;*/
} }
@ -6755,18 +6773,38 @@ a.ast-upgrade-trigger:active {
} }
.ast-upgrade-list-items { .ast-upgrade-list-items {
margin-bottom: 1.8em; display: flex;
flex-direction: column;
gap: 12px;
margin: 2em 0;
} }
.ast-upgrade-list-wrapper .ast-upgrade-list-section-title { .ast-upgrade-list-items .ast-upgrade-list-items-title-wrapper {
margin: 0.5em auto 1.8em; display: flex;
max-width: 240px; gap: 7px;
}
.ast-upgrade-list-items .ast-upgrade-list-items-title-wrapper svg {
flex: none;
}
.ast-upgrade-list-items .ast-upgrade-list-items-title {
font-size: 14px;
line-height: 18px;
font-weight: 500;
color: #8843E1;
margin: 0;
}
.ast-brand-logo img{
width:100% !important;
} }
.ast-pro-upgrade-item { .ast-pro-upgrade-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 5px; gap: 5px;
margin: 0;
} }
.ast-pro-upgrade-item svg { .ast-pro-upgrade-item svg {
@ -6775,6 +6813,7 @@ a.ast-upgrade-trigger:active {
.ast-pro-upgrade-item span { .ast-pro-upgrade-item span {
display: inline; display: inline;
font-size: 12px;
} }
.ast-pro-upgrade-item > span:first-child { .ast-pro-upgrade-item > span:first-child {
@ -6821,10 +6860,6 @@ a.ast-upgrade-trigger:active {
line-height: 1; line-height: 1;
} }
.ast-upgrade-list-items .ast-pro-upgrade-item:not( :last-child ) {
border-bottom: 1px dashed #d4d4d4;
}
li#customize-control-astra-settings-header-builder-pro-items .ast-upgrade-pro-wrap:not( :has( .ast-upgrade-modal-view-wrapper ) ), li#customize-control-astra-settings-header-builder-pro-items .ast-upgrade-pro-wrap:not( :has( .ast-upgrade-modal-view-wrapper ) ),
li#customize-control-astra-settings-footer-builder-pro-items .ast-upgrade-pro-wrap:not( :has( .ast-upgrade-modal-view-wrapper ) ) { li#customize-control-astra-settings-footer-builder-pro-items .ast-upgrade-pro-wrap:not( :has( .ast-upgrade-modal-view-wrapper ) ) {
padding-right: 12px; padding-right: 12px;

View File

@ -419,8 +419,8 @@
display: block; display: block;
padding: 8px 18px; padding: 8px 18px;
border-radius: 30px; border-radius: 30px;
border: 1px solid var( --ast-customizer-color-1 ); border: 1px solid #5c2ede;
background-color: #5c2ede; background: linear-gradient(90deg, #EB1B99 -23.83%, #321978 28.86%, #321978 49.67%, #321978 74.52%, #5810FF 109.73%);
color: var( --ast-customizer-color-9 ); color: var( --ast-customizer-color-9 );
font-size: 13px !important; font-size: 13px !important;
font-weight: 400; font-weight: 400;
@ -430,6 +430,12 @@
gap: 12px; gap: 12px;
} }
.ast-upgrade-pro-heading{
font-size: 13px;
font-weight: 700;
text-align: center;
}
.customize-control-ast-button-link .ast-button-link:hover, .customize-control-ast-button-link .ast-button-link:hover,
.ast-upgrade-pro-wrap .ast-button-link:hover { .ast-upgrade-pro-wrap .ast-button-link:hover {
background-color: var( --ast-customizer-color-9 ); background-color: var( --ast-customizer-color-9 );
@ -1390,8 +1396,8 @@ section.ast-palette-presets-inner-wrap {
} }
.ast-field-settings-modal .astra-color-picker-wrap { .ast-field-settings-modal .astra-color-picker-wrap {
position: relative; position: absolute;
top: 10px; top: 25px;
} }
.ast-color-palette .components-circular-option-picker__option-wrapper { .ast-color-palette .components-circular-option-picker__option-wrapper {
@ -1770,6 +1776,14 @@ li#customize-control-astra-settings-transparent-content-section-text-color-respo
margin-top: 8px; margin-top: 8px;
} }
#astra-settings-related-posts-colors-group-tabs .ast-control-wrap {
display: block;
}
#astra-settings-related-posts-colors-group-tabs .astra-color-picker-wrap.picker-open .astra-popover-color {
margin: 5px -5px 0;
}
/* Global customizer color palette */ /* Global customizer color palette */
:root { :root {
@ -2982,6 +2996,11 @@ li.customize-control.ast-top-section-spacing {
#customize-control-astra-settings-blog-filter-taxonomy-text-colors { #customize-control-astra-settings-blog-filter-taxonomy-text-colors {
margin-top: 0; margin-top: 0;
} }
#customize-control-astra-settings-blog-filter-taxonomy-bg-colors{
margin-top: 0;
margin-bottom: 16px;
}
.ast-typo-presets { .ast-typo-presets {
width: 100%; width: 100%;
display: flex; display: flex;
@ -4912,7 +4931,6 @@ li#customize-control-astra-settings-header-preset-style .customizer-text {
.customize-control-ast-slider .ast-slider-wrap, .customize-control-ast-slider .ast-slider-wrap,
.customize-control-ast-responsive-slider .ast-slider-wrap { .customize-control-ast-responsive-slider .ast-slider-wrap {
position: relative; position: relative;
z-index: 1;
} }
.components-range-control__wrapper .components-range-control__track { .components-range-control__wrapper .components-range-control__track {
@ -5497,7 +5515,7 @@ li#customize-control-astra-settings-header-preset-style .customizer-text {
} }
.ast-group-tabs .ui-widget-content { .ast-group-tabs .ui-widget-content {
overflow: hidden; overflow: visible;
/*padding-top: 15px;*/ /*padding-top: 15px;*/
} }
@ -6755,18 +6773,38 @@ a.ast-upgrade-trigger:active {
} }
.ast-upgrade-list-items { .ast-upgrade-list-items {
margin-bottom: 1.8em; display: flex;
flex-direction: column;
gap: 12px;
margin: 2em 0;
} }
.ast-upgrade-list-wrapper .ast-upgrade-list-section-title { .ast-upgrade-list-items .ast-upgrade-list-items-title-wrapper {
margin: 0.5em auto 1.8em; display: flex;
max-width: 240px; gap: 7px;
}
.ast-upgrade-list-items .ast-upgrade-list-items-title-wrapper svg {
flex: none;
}
.ast-upgrade-list-items .ast-upgrade-list-items-title {
font-size: 14px;
line-height: 18px;
font-weight: 500;
color: #8843E1;
margin: 0;
}
.ast-brand-logo img{
width:100% !important;
} }
.ast-pro-upgrade-item { .ast-pro-upgrade-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 5px; gap: 5px;
margin: 0;
} }
.ast-pro-upgrade-item svg { .ast-pro-upgrade-item svg {
@ -6775,6 +6813,7 @@ a.ast-upgrade-trigger:active {
.ast-pro-upgrade-item span { .ast-pro-upgrade-item span {
display: inline; display: inline;
font-size: 12px;
} }
.ast-pro-upgrade-item > span:first-child { .ast-pro-upgrade-item > span:first-child {
@ -6821,10 +6860,6 @@ a.ast-upgrade-trigger:active {
line-height: 1; line-height: 1;
} }
.ast-upgrade-list-items .ast-pro-upgrade-item:not( :last-child ) {
border-bottom: 1px dashed #d4d4d4;
}
li#customize-control-astra-settings-header-builder-pro-items .ast-upgrade-pro-wrap:not( :has( .ast-upgrade-modal-view-wrapper ) ), li#customize-control-astra-settings-header-builder-pro-items .ast-upgrade-pro-wrap:not( :has( .ast-upgrade-modal-view-wrapper ) ),
li#customize-control-astra-settings-footer-builder-pro-items .ast-upgrade-pro-wrap:not( :has( .ast-upgrade-modal-view-wrapper ) ) { li#customize-control-astra-settings-footer-builder-pro-items .ast-upgrade-pro-wrap:not( :has( .ast-upgrade-modal-view-wrapper ) ) {
padding-left: 12px; padding-left: 12px;

View File

@ -116,7 +116,7 @@
// Check if the cleaned font exists in the Google fonts array. // Check if the cleaned font exists in the Google fonts array.
var googleFontValue = splitFont[0].replace(pattern, ''); var googleFontValue = splitFont[0].replace(pattern, '');
if ( 'undefined' != typeof AstFontFamilies.google[ googleFontValue ] ) { if ( 'undefined' != typeof AstFontFamilies && 'undefined' != typeof AstFontFamilies.google && 'undefined' != typeof AstFontFamilies.google[ googleFontValue ] ) {
fontValue = googleFontValue; fontValue = googleFontValue;
} }
@ -138,14 +138,14 @@
var weightObject = [ '400', '600' ]; var weightObject = [ '400', '600' ];
if ( fontValue == 'inherit' ) { if ( fontValue == 'inherit' ) {
weightObject = [ '100','200','300','400','normal','500','600','700','800','900' ]; weightObject = [ '100','200','300','400','normal','500','600','700','800','900' ];
} else if ( 'undefined' != typeof AstFontFamilies.system[ fontValue ] ) { } else if ( 'undefined' != typeof AstFontFamilies && 'undefined' != typeof AstFontFamilies.system && 'undefined' != typeof AstFontFamilies.system[ fontValue ] ) {
weightObject = AstFontFamilies.system[ fontValue ].weights; weightObject = AstFontFamilies.system[ fontValue ].weights;
} else if ( 'undefined' != typeof AstFontFamilies.google[ fontValue ] ) { } else if ( 'undefined' != typeof AstFontFamilies && 'undefined' != typeof AstFontFamilies.google && 'undefined' != typeof AstFontFamilies.google[ fontValue ] ) {
weightObject = AstFontFamilies.google[ fontValue ][0]; weightObject = AstFontFamilies.google[ fontValue ][0];
weightObject = Object.keys(weightObject).map(function(k) { weightObject = Object.keys(weightObject).map(function(k) {
return weightObject[k]; return weightObject[k];
}); });
} else if ( 'undefined' != typeof AstFontFamilies.custom[ fontValue ] ) { } else if ( 'undefined' != typeof AstFontFamilies && 'undefined' != typeof AstFontFamilies.custom && 'undefined' != typeof AstFontFamilies.custom[ fontValue ] ) {
weightObject = AstFontFamilies.custom[ fontValue ].weights; weightObject = AstFontFamilies.custom[ fontValue ].weights;
} }

View File

@ -0,0 +1,12 @@
module.exports = {
presets: ['@wordpress/babel-preset-default'],
plugins: [
[
'@babel/plugin-transform-react-jsx',
{
pragma: 'React.createElement',
pragmaFrag: 'React.Fragment'
}
]
]
};

File diff suppressed because one or more lines are too long

View File

@ -387,17 +387,17 @@ function astra_load_modern_block_editor_ui( $dynamic_css ) {
margin-top: 12px; margin-top: 12px;
margin-bottom: 12px; margin-bottom: 12px;
} }
.ast-page-builder-template .entry-content[data-ast-blocks-layout] > *, .ast-page-builder-template .entry-content[data-ast-blocks-layout] > .alignfull:not(.wp-block-group):not(.uagb-is-root-container) > * { .ast-page-builder-template .entry-content[data-ast-blocks-layout] > .alignwide:where(:not(.uagb-is-root-container):not(.spectra-is-root-container)) > * {
max-width: none;
}
.ast-page-builder-template .entry-content[data-ast-blocks-layout] > .alignwide:not(.uagb-is-root-container) > * {
max-width: var(--wp--custom--ast-wide-width-size); max-width: var(--wp--custom--ast-wide-width-size);
} }
.ast-page-builder-template .entry-content[data-ast-blocks-layout] > .inherit-container-width > *, .ast-page-builder-template .entry-content[data-ast-blocks-layout] > *:not(.wp-block-group):not(.uagb-is-root-container) > *, .entry-content[data-ast-blocks-layout] > .wp-block-cover .wp-block-cover__inner-container { .ast-page-builder-template .entry-content[data-ast-blocks-layout] > .inherit-container-width > *, .ast-page-builder-template .entry-content[data-ast-blocks-layout] > *:not(.wp-block-group):where(:not(.uagb-is-root-container):not(.spectra-is-root-container)) > *, .entry-content[data-ast-blocks-layout] > .wp-block-cover .wp-block-cover__inner-container {
max-width: ' . $heading_width_comp . ' ; max-width: ' . $heading_width_comp . ' ;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.ast-page-builder-template .entry-content[data-ast-blocks-layout] > *, .ast-page-builder-template .entry-content[data-ast-blocks-layout] > .alignfull:where(:not(.wp-block-group):not(.uagb-is-root-container):not(.spectra-is-root-container)) > * {
max-width: none;
}
.entry-content[data-ast-blocks-layout] .wp-block-cover:not(.alignleft):not(.alignright) { .entry-content[data-ast-blocks-layout] .wp-block-cover:not(.alignleft):not(.alignright) {
width: auto; width: auto;
} }

File diff suppressed because one or more lines are too long

View File

@ -125,6 +125,9 @@ if ( ! class_exists( 'Astra_Nps_Notice' ) ) {
'plugin_rating_title' => __( 'Thank you for your feedback', 'astra' ), 'plugin_rating_title' => __( 'Thank you for your feedback', 'astra' ),
'plugin_rating_content' => __( 'We value your input. How can we improve your experience?', 'astra' ), 'plugin_rating_content' => __( 'We value your input. How can we improve your experience?', 'astra' ),
), ),
'privacy_policy' => array(
'disable' => true, // Enable when we have a privacy policy url.
),
) )
); );
} }

View File

@ -1,3 +1,8 @@
Version 1.0.15 - 11-09-2025
- New:
- Added `privacy_policy` option with configurable link and custom content.
- Added `popup.placement` option to customize popup position.
Version 1.0.14 - 18-08-2025 Version 1.0.14 - 18-08-2025
- Improvement: - Improvement:
- Added `rating_min_label` and `rating_max_label` text options for customizable rating labels. - Added `rating_min_label` and `rating_max_label` text options for customizable rating labels.

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '24399096f39e4ad5d954'); <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '747a09817c61fd382747');

Some files were not shown because too many files have changed in this diff Show More