Merged in feature/102-dev-dev01 (pull request #6)
auto-patch 102-dev-dev01-2023-12-11T19_15_32 * auto-patch 102-dev-dev01-2023-12-11T19_15_32
This commit is contained in:
@@ -45,7 +45,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
|
||||
<div class="about__section changelog has-subtle-background-color">
|
||||
<div class="column">
|
||||
<h2><?php _e( 'Maintenance Release' ); ?></h2>
|
||||
<h2><?php _e( 'Maintenance and Security Releases' ); ?></h2>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
@@ -53,7 +53,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
_n(
|
||||
'<strong>Version %1$s</strong> addressed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed %2$s bugs.',
|
||||
10
|
||||
4
|
||||
),
|
||||
'6.4.1',
|
||||
'4'
|
||||
@@ -71,6 +71,31 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: WordPress version number, 2: Plural number of bugs. */
|
||||
_n(
|
||||
'<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.',
|
||||
7
|
||||
),
|
||||
'6.4.2',
|
||||
'7'
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: HelpHub URL. */
|
||||
__( 'For more information, see <a href="%s">the release notes</a>.' ),
|
||||
sprintf(
|
||||
/* translators: %s: WordPress version. */
|
||||
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
|
||||
sanitize_title( '6.4.2' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -272,7 +297,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
<p style="margin-top:calc(var(--gap) / 2);">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress Field Guide link. */
|
||||
/* translators: 1: WordPress Field Guide link, 2: WordPress version number. */
|
||||
__( 'Explore the <a href="%1$s">WordPress %2$s Field Guide</a>. Learn about the changes in this release with detailed developer notes to help you build with WordPress.' ),
|
||||
__( 'https://make.wordpress.org/core/2023/10/23/wordpress-6-4-field-guide/' ),
|
||||
'6.4'
|
||||
|
||||
@@ -535,8 +535,8 @@
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
justify-content: end;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
padding: var(--gap) 0;
|
||||
height: clamp(12.5rem, -1.25rem + 36.67vw, 26.25rem);
|
||||
@@ -1127,7 +1127,7 @@
|
||||
}
|
||||
|
||||
.about-wrap .is-vertically-aligned-top {
|
||||
align-self: start;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.about-wrap .is-vertically-aligned-center {
|
||||
|
||||
2
wp/wp-admin/css/about-rtl.min.css
vendored
2
wp/wp-admin/css/about-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -534,8 +534,8 @@
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
justify-content: end;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
padding: var(--gap) 0;
|
||||
height: clamp(12.5rem, -1.25rem + 36.67vw, 26.25rem);
|
||||
@@ -1126,7 +1126,7 @@
|
||||
}
|
||||
|
||||
.about-wrap .is-vertically-aligned-top {
|
||||
align-self: start;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.about-wrap .is-vertically-aligned-center {
|
||||
|
||||
2
wp/wp-admin/css/about.min.css
vendored
2
wp/wp-admin/css/about.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1,258 +1,258 @@
|
||||
<?php
|
||||
/**
|
||||
* BSF analytics stat class file.
|
||||
*
|
||||
* @package bsf-analytics
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_Analytics_Stats' ) ) {
|
||||
/**
|
||||
* BSF analytics stat class.
|
||||
*/
|
||||
class BSF_Analytics_Stats {
|
||||
|
||||
/**
|
||||
* Active plugins.
|
||||
*
|
||||
* Holds the sites active plugins list.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $plugins;
|
||||
|
||||
/**
|
||||
* Instance of BSF_Analytics_Stats.
|
||||
*
|
||||
* Holds only the first object of class.
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
private static $instance = null;
|
||||
|
||||
/**
|
||||
* Create only once instance of a class.
|
||||
*
|
||||
* @return object
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function instance() {
|
||||
if ( null === self::$instance ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stats.
|
||||
*
|
||||
* @return array stats data.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function get_stats() {
|
||||
return apply_filters( 'bsf_core_stats', $this->get_default_stats() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve stats for site.
|
||||
*
|
||||
* @return array stats data.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_default_stats() {
|
||||
return array(
|
||||
'graupi_version' => defined( 'BSF_UPDATER_VERSION' ) ? BSF_UPDATER_VERSION : false,
|
||||
'domain_name' => get_site_url(),
|
||||
'php_os' => PHP_OS,
|
||||
'server_software' => isset( $_SERVER['SERVER_SOFTWARE'] ) ? filter_var( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), FILTER_SANITIZE_STRING ) : '',
|
||||
'mysql_version' => $this->get_mysql_version(),
|
||||
'php_version' => $this->get_php_version(),
|
||||
'php_max_input_vars' => ini_get( 'max_input_vars' ), // phpcs:ignore:PHPCompatibility.IniDirectives.NewIniDirectives.max_input_varsFound
|
||||
'php_post_max_size' => ini_get( 'post_max_size' ),
|
||||
'php_max_execution_time' => ini_get( 'max_execution_time' ),
|
||||
'php_memory_limit' => ini_get( 'memory_limit' ),
|
||||
'zip_installed' => extension_loaded( 'zip' ),
|
||||
'imagick_availabile' => extension_loaded( 'imagick' ),
|
||||
'xmlreader_exists' => class_exists( 'XMLReader' ),
|
||||
'gd_available' => extension_loaded( 'gd' ),
|
||||
'curl_version' => $this->get_curl_version(),
|
||||
'curl_ssl_version' => $this->get_curl_ssl_version(),
|
||||
'is_writable' => $this->is_content_writable(),
|
||||
|
||||
'wp_version' => get_bloginfo( 'version' ),
|
||||
'user_count' => $this->get_user_count(),
|
||||
'posts_count' => wp_count_posts()->publish,
|
||||
'page_count' => wp_count_posts( 'page' )->publish,
|
||||
'site_language' => get_locale(),
|
||||
'timezone' => wp_timezone_string(),
|
||||
'is_ssl' => is_ssl(),
|
||||
'is_multisite' => is_multisite(),
|
||||
'network_url' => network_site_url(),
|
||||
'external_object_cache' => (bool) wp_using_ext_object_cache(),
|
||||
'wp_debug' => WP_DEBUG,
|
||||
'wp_debug_display' => WP_DEBUG_DISPLAY,
|
||||
'script_debug' => SCRIPT_DEBUG,
|
||||
|
||||
'active_plugins' => $this->get_active_plugins(),
|
||||
|
||||
'active_theme' => get_template(),
|
||||
'active_stylesheet' => get_stylesheet(),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get installed PHP version.
|
||||
*
|
||||
* @return float PHP version.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_php_version() {
|
||||
if ( defined( 'PHP_MAJOR_VERSION' ) && defined( 'PHP_MINOR_VERSION' ) && defined( 'PHP_RELEASE_VERSION' ) ) { // phpcs:ignore
|
||||
return PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION;
|
||||
}
|
||||
|
||||
return phpversion();
|
||||
}
|
||||
|
||||
/**
|
||||
* User count on site.
|
||||
*
|
||||
* @return int User count.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_user_count() {
|
||||
if ( is_multisite() ) {
|
||||
$user_count = get_user_count();
|
||||
} else {
|
||||
$count = count_users();
|
||||
$user_count = $count['total_users'];
|
||||
}
|
||||
|
||||
return $user_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get active plugin's data.
|
||||
*
|
||||
* @return array active plugin's list.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_active_plugins() {
|
||||
if ( ! $this->plugins ) {
|
||||
// Ensure get_plugin_data function is loaded.
|
||||
if ( ! function_exists( 'get_plugin_data' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
}
|
||||
|
||||
$plugins = wp_get_active_and_valid_plugins();
|
||||
$plugins = array_map( 'get_plugin_data', $plugins );
|
||||
$this->plugins = array_map( array( $this, 'format_plugin' ), $plugins );
|
||||
}
|
||||
|
||||
return $this->plugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format plugin data.
|
||||
*
|
||||
* @param string $plugin plugin.
|
||||
* @return array formatted plugin data.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function format_plugin( $plugin ) {
|
||||
return array(
|
||||
'name' => html_entity_decode( $plugin['Name'], ENT_COMPAT, 'UTF-8' ),
|
||||
'url' => $plugin['PluginURI'],
|
||||
'version' => $plugin['Version'],
|
||||
'slug' => $plugin['TextDomain'],
|
||||
'author_name' => html_entity_decode( wp_strip_all_tags( $plugin['Author'] ), ENT_COMPAT, 'UTF-8' ),
|
||||
'author_url' => $plugin['AuthorURI'],
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Curl SSL version.
|
||||
*
|
||||
* @return float SSL version.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_curl_ssl_version() {
|
||||
$curl = array();
|
||||
if ( function_exists( 'curl_version' ) ) {
|
||||
$curl = curl_version(); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_version
|
||||
}
|
||||
|
||||
return isset( $curl['ssl_version'] ) ? $curl['ssl_version'] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cURL version.
|
||||
*
|
||||
* @return float cURL version.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_curl_version() {
|
||||
if ( function_exists( 'curl_version' ) ) {
|
||||
$curl = curl_version(); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_version
|
||||
}
|
||||
|
||||
return isset( $curl['version'] ) ? $curl['version'] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get MySQL version.
|
||||
*
|
||||
* @return float MySQL version.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_mysql_version() {
|
||||
global $wpdb;
|
||||
return $wpdb->db_version();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if content directory is writable.
|
||||
*
|
||||
* @return bool
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function is_content_writable() {
|
||||
$upload_dir = wp_upload_dir();
|
||||
return wp_is_writable( $upload_dir['basedir'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill for sites using WP version less than 5.3
|
||||
*/
|
||||
if ( ! function_exists( 'wp_timezone_string' ) ) {
|
||||
/**
|
||||
* Get timezone string.
|
||||
*
|
||||
* @return string timezone string.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function wp_timezone_string() {
|
||||
$timezone_string = get_option( 'timezone_string' );
|
||||
|
||||
if ( $timezone_string ) {
|
||||
return $timezone_string;
|
||||
}
|
||||
|
||||
$offset = (float) get_option( 'gmt_offset' );
|
||||
$hours = (int) $offset;
|
||||
$minutes = ( $offset - $hours );
|
||||
|
||||
$sign = ( $offset < 0 ) ? '-' : '+';
|
||||
$abs_hour = abs( $hours );
|
||||
$abs_mins = abs( $minutes * 60 );
|
||||
$tz_offset = sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins );
|
||||
|
||||
return $tz_offset;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* BSF analytics stat class file.
|
||||
*
|
||||
* @package bsf-analytics
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_Analytics_Stats' ) ) {
|
||||
/**
|
||||
* BSF analytics stat class.
|
||||
*/
|
||||
class BSF_Analytics_Stats {
|
||||
|
||||
/**
|
||||
* Active plugins.
|
||||
*
|
||||
* Holds the sites active plugins list.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $plugins;
|
||||
|
||||
/**
|
||||
* Instance of BSF_Analytics_Stats.
|
||||
*
|
||||
* Holds only the first object of class.
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
private static $instance = null;
|
||||
|
||||
/**
|
||||
* Create only once instance of a class.
|
||||
*
|
||||
* @return object
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function instance() {
|
||||
if ( null === self::$instance ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stats.
|
||||
*
|
||||
* @return array stats data.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function get_stats() {
|
||||
return apply_filters( 'bsf_core_stats', $this->get_default_stats() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve stats for site.
|
||||
*
|
||||
* @return array stats data.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_default_stats() {
|
||||
return array(
|
||||
'graupi_version' => defined( 'BSF_UPDATER_VERSION' ) ? BSF_UPDATER_VERSION : false,
|
||||
'domain_name' => get_site_url(),
|
||||
'php_os' => PHP_OS,
|
||||
'server_software' => isset( $_SERVER['SERVER_SOFTWARE'] ) ? filter_var( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), FILTER_SANITIZE_STRING ) : '',
|
||||
'mysql_version' => $this->get_mysql_version(),
|
||||
'php_version' => $this->get_php_version(),
|
||||
'php_max_input_vars' => ini_get( 'max_input_vars' ), // phpcs:ignore:PHPCompatibility.IniDirectives.NewIniDirectives.max_input_varsFound
|
||||
'php_post_max_size' => ini_get( 'post_max_size' ),
|
||||
'php_max_execution_time' => ini_get( 'max_execution_time' ),
|
||||
'php_memory_limit' => ini_get( 'memory_limit' ),
|
||||
'zip_installed' => extension_loaded( 'zip' ),
|
||||
'imagick_availabile' => extension_loaded( 'imagick' ),
|
||||
'xmlreader_exists' => class_exists( 'XMLReader' ),
|
||||
'gd_available' => extension_loaded( 'gd' ),
|
||||
'curl_version' => $this->get_curl_version(),
|
||||
'curl_ssl_version' => $this->get_curl_ssl_version(),
|
||||
'is_writable' => $this->is_content_writable(),
|
||||
|
||||
'wp_version' => get_bloginfo( 'version' ),
|
||||
'user_count' => $this->get_user_count(),
|
||||
'posts_count' => wp_count_posts()->publish,
|
||||
'page_count' => wp_count_posts( 'page' )->publish,
|
||||
'site_language' => get_locale(),
|
||||
'timezone' => wp_timezone_string(),
|
||||
'is_ssl' => is_ssl(),
|
||||
'is_multisite' => is_multisite(),
|
||||
'network_url' => network_site_url(),
|
||||
'external_object_cache' => (bool) wp_using_ext_object_cache(),
|
||||
'wp_debug' => WP_DEBUG,
|
||||
'wp_debug_display' => WP_DEBUG_DISPLAY,
|
||||
'script_debug' => SCRIPT_DEBUG,
|
||||
|
||||
'active_plugins' => $this->get_active_plugins(),
|
||||
|
||||
'active_theme' => get_template(),
|
||||
'active_stylesheet' => get_stylesheet(),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get installed PHP version.
|
||||
*
|
||||
* @return float PHP version.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_php_version() {
|
||||
if ( defined( 'PHP_MAJOR_VERSION' ) && defined( 'PHP_MINOR_VERSION' ) && defined( 'PHP_RELEASE_VERSION' ) ) { // phpcs:ignore
|
||||
return PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION;
|
||||
}
|
||||
|
||||
return phpversion();
|
||||
}
|
||||
|
||||
/**
|
||||
* User count on site.
|
||||
*
|
||||
* @return int User count.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_user_count() {
|
||||
if ( is_multisite() ) {
|
||||
$user_count = get_user_count();
|
||||
} else {
|
||||
$count = count_users();
|
||||
$user_count = $count['total_users'];
|
||||
}
|
||||
|
||||
return $user_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get active plugin's data.
|
||||
*
|
||||
* @return array active plugin's list.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_active_plugins() {
|
||||
if ( ! $this->plugins ) {
|
||||
// Ensure get_plugin_data function is loaded.
|
||||
if ( ! function_exists( 'get_plugin_data' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
}
|
||||
|
||||
$plugins = wp_get_active_and_valid_plugins();
|
||||
$plugins = array_map( 'get_plugin_data', $plugins );
|
||||
$this->plugins = array_map( array( $this, 'format_plugin' ), $plugins );
|
||||
}
|
||||
|
||||
return $this->plugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format plugin data.
|
||||
*
|
||||
* @param string $plugin plugin.
|
||||
* @return array formatted plugin data.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function format_plugin( $plugin ) {
|
||||
return array(
|
||||
'name' => html_entity_decode( $plugin['Name'], ENT_COMPAT, 'UTF-8' ),
|
||||
'url' => $plugin['PluginURI'],
|
||||
'version' => $plugin['Version'],
|
||||
'slug' => $plugin['TextDomain'],
|
||||
'author_name' => html_entity_decode( wp_strip_all_tags( $plugin['Author'] ), ENT_COMPAT, 'UTF-8' ),
|
||||
'author_url' => $plugin['AuthorURI'],
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Curl SSL version.
|
||||
*
|
||||
* @return float SSL version.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_curl_ssl_version() {
|
||||
$curl = array();
|
||||
if ( function_exists( 'curl_version' ) ) {
|
||||
$curl = curl_version(); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_version
|
||||
}
|
||||
|
||||
return isset( $curl['ssl_version'] ) ? $curl['ssl_version'] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cURL version.
|
||||
*
|
||||
* @return float cURL version.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_curl_version() {
|
||||
if ( function_exists( 'curl_version' ) ) {
|
||||
$curl = curl_version(); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_version
|
||||
}
|
||||
|
||||
return isset( $curl['version'] ) ? $curl['version'] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get MySQL version.
|
||||
*
|
||||
* @return float MySQL version.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function get_mysql_version() {
|
||||
global $wpdb;
|
||||
return $wpdb->db_version();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if content directory is writable.
|
||||
*
|
||||
* @return bool
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function is_content_writable() {
|
||||
$upload_dir = wp_upload_dir();
|
||||
return wp_is_writable( $upload_dir['basedir'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill for sites using WP version less than 5.3
|
||||
*/
|
||||
if ( ! function_exists( 'wp_timezone_string' ) ) {
|
||||
/**
|
||||
* Get timezone string.
|
||||
*
|
||||
* @return string timezone string.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function wp_timezone_string() {
|
||||
$timezone_string = get_option( 'timezone_string' );
|
||||
|
||||
if ( $timezone_string ) {
|
||||
return $timezone_string;
|
||||
}
|
||||
|
||||
$offset = (float) get_option( 'gmt_offset' );
|
||||
$hours = (int) $offset;
|
||||
$minutes = ( $offset - $hours );
|
||||
|
||||
$sign = ( $offset < 0 ) ? '-' : '+';
|
||||
$abs_hour = abs( $hours );
|
||||
$abs_mins = abs( $minutes * 60 );
|
||||
$tz_offset = sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins );
|
||||
|
||||
return $tz_offset;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,7 @@
|
||||
v2.7.11
|
||||
# Improvement: Added new required properties in Course Schema - offers, courseWorkload / courseSchedule.
|
||||
# Fix: Corrected syntax for FAQ schema type.
|
||||
|
||||
v2.7.10
|
||||
# Improvement: Improved codebase for improved security.
|
||||
# Improvement: Added Clip and SeekToAction fields in Video Object schema.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -605,6 +605,12 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
||||
'default' => 'create-field',
|
||||
'description' => esc_html__( 'The organization that publishes the source content of the course. For example, UC Berkeley.', 'wp-schema-pro' ),
|
||||
),
|
||||
'offer-category' => array(
|
||||
'label' => esc_html__( 'Offer Category', 'wp-schema-pro' ),
|
||||
'type' => 'text',
|
||||
'default' => 'none',
|
||||
'description' => esc_html__( 'The pricing category of the course.(e.g. Free, Partially Free, Subscription, Paid).', 'wp-schema-pro' ),
|
||||
),
|
||||
'course-instance' => array(
|
||||
'label' => esc_html__( 'Course Instance', 'wp-schema-pro' ),
|
||||
'type' => 'repeater',
|
||||
@@ -662,6 +668,25 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema' ) ) {
|
||||
'type' => 'date',
|
||||
'default' => 'none',
|
||||
),
|
||||
'repeat-count' => array(
|
||||
'label' => esc_html__( 'Repeat Count', 'wp-schema-pro' ),
|
||||
'type' => 'number',
|
||||
'default' => 'none',
|
||||
'attrs' => array(
|
||||
'min' => '0',
|
||||
'step' => 'any',
|
||||
),
|
||||
),
|
||||
'repeat-frequency' => array(
|
||||
'label' => esc_html__( 'Repeat Frequency', 'wp-schema-pro' ),
|
||||
'type' => 'text',
|
||||
'default' => 'none',
|
||||
),
|
||||
'course-workload' => array(
|
||||
'label' => esc_html__( 'Course Workload', 'wp-schema-pro' ),
|
||||
'type' => 'text',
|
||||
'default' => 'none',
|
||||
),
|
||||
'previous-date' => array(
|
||||
'label' => esc_html__( 'Course Previous Start Date', 'wp-schema-pro' ),
|
||||
'type' => 'datetime-local',
|
||||
|
||||
@@ -34,6 +34,9 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Course' ) ) {
|
||||
|
||||
$schema['description'] = ! empty( $data['description'] ) ? wp_strip_all_tags( (string) $data['description'] ) : null;
|
||||
|
||||
$schema['offers']['@type'] = 'Offer';
|
||||
$schema['offers']['category'] = ! empty( $data['offer-category'] ) ? wp_strip_all_tags( (string) $data['offer-category'] ) : null;;
|
||||
|
||||
if ( isset( $data['course-instance'] ) && ! empty( $data['course-instance'] ) ) {
|
||||
|
||||
foreach ( $data['course-instance'] as $key => $value ) {
|
||||
@@ -50,6 +53,25 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Course' ) ) {
|
||||
|
||||
$schema['hasCourseInstance'][ $key ]['courseMode'] = ! empty( $value['course-mode'] ) ? wp_strip_all_tags( (string) $value['course-mode'] ) : null;
|
||||
|
||||
if ( ! empty( $value['course-workload'] ) ) {
|
||||
$schema['hasCourseInstance'][ $key ]['courseWorkload'] = ! empty( $value['course-workload'] ) ? wp_strip_all_tags( (string) $value['course-workload'] ) : null;
|
||||
} else if ( ! empty( $value['repeat-count'] ) && ! empty( $value['repeat-frequency'] ) ) {
|
||||
$schema['hasCourseInstance'][ $key ]['courseSchedule']['@type'] = 'Schedule';
|
||||
$schema['hasCourseInstance'][ $key ]['courseSchedule']['repeatCount'] = ! empty( $value['repeat-count'] ) ? wp_strip_all_tags( (string) $value['repeat-count'] ) : null;
|
||||
$schema['hasCourseInstance'][ $key ]['courseSchedule']['repeatFrequency'] = ! empty( $value['repeat-frequency'] ) ? wp_strip_all_tags( (string) $value['repeat-frequency'] ) : null;
|
||||
if ( ! empty( $value['start-date'] ) ) {
|
||||
if ( 'OfflineEventAttendanceMode' !== isset( $value['event-attendance-mode'] ) ) {
|
||||
$start_date = gmdate( DATE_ISO8601, strtotime( $value['start-date'] ) );
|
||||
$schema['hasCourseInstance'][ $key ]['courseSchedule']['startDate'] = wp_strip_all_tags( (string) $start_date );
|
||||
} else {
|
||||
$schema['hasCourseInstance'][ $key ]['courseSchedule']['startDate'] = wp_strip_all_tags( (string) $value['start-date'] );
|
||||
}
|
||||
}
|
||||
if ( ! empty( $value['end-date'] ) ) {
|
||||
$schema['hasCourseInstance'][ $key ]['courseSchedule']['endDate'] = ! empty( $value['end-date'] ) ? wp_strip_all_tags( (string) $value['end-date'] ) : null;
|
||||
}
|
||||
}
|
||||
|
||||
$schema['hasCourseInstance'][ $key ]['eventStatus'] = ! empty( $value['event-status'] ) ? wp_strip_all_tags( (string) $value['event-status'] ) : null;
|
||||
|
||||
$schema['hasCourseInstance'][ $key ]['eventAttendanceMode'] = ! empty( $value['event-attendance-mode'] ) ? wp_strip_all_tags( (string) $value['event-attendance-mode'] ) : null;
|
||||
|
||||
@@ -28,7 +28,7 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_FAQ' ) ) {
|
||||
if ( isset( $data['question-answer'][0]['question'] ) && ! empty( $data['question-answer'][0]['question'] ) ) {
|
||||
|
||||
$schema['@context'] = 'https://schema.org';
|
||||
$schema['type'] = 'FAQPage';
|
||||
$schema['@type'] = 'FAQPage';
|
||||
foreach ( $data['question-answer'] as $key => $value ) {
|
||||
if ( isset( $value['question'] ) && ! empty( $value['question'] ) ) {
|
||||
$schema['mainEntity'][ $key ]['@type'] = 'Question';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
* Author: Brainstorm Force
|
||||
* Author URI: https://www.brainstormforce.com
|
||||
* Description: Schema Pro is the go-to plugin to adding Schema Markup on your website with ease. Enables you to display rich snippets on search engines and improve your overall page SEO.
|
||||
* Version: 2.7.10
|
||||
* Version: 2.7.11
|
||||
* Text Domain: wp-schema-pro
|
||||
* License: GPL2
|
||||
*
|
||||
@@ -70,7 +70,7 @@ define( 'BSF_AIOSRS_PRO_FILE', __FILE__ );
|
||||
define( 'BSF_AIOSRS_PRO_BASE', plugin_basename( BSF_AIOSRS_PRO_FILE ) );
|
||||
define( 'BSF_AIOSRS_PRO_DIR', plugin_dir_path( BSF_AIOSRS_PRO_FILE ) );
|
||||
define( 'BSF_AIOSRS_PRO_URI', plugins_url( '/', BSF_AIOSRS_PRO_FILE ) );
|
||||
define( 'BSF_AIOSRS_PRO_VER', '2.7.10' );
|
||||
define( 'BSF_AIOSRS_PRO_VER', '2.7.11' );
|
||||
define( 'BSF_AIOSRS_PRO_CACHE_KEY', 'wp_schema_pro_optimized_structured_data' );
|
||||
define( 'BSF_AIOSRS_PRO_WEBSITE_URL', 'https://wpschema.com/' );
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -324,7 +324,7 @@ function _register_remote_theme_patterns() {
|
||||
* @since 6.0.0
|
||||
* @since 6.1.0 The `postTypes` property was added.
|
||||
* @since 6.2.0 The `templateTypes` property was added.
|
||||
* @since 6.4.0 Uses the `_wp_get_block_patterns` function.
|
||||
* @since 6.4.0 Uses the `WP_Theme::get_block_patterns` method.
|
||||
* @access private
|
||||
*/
|
||||
function _register_theme_block_patterns() {
|
||||
|
||||
@@ -518,12 +518,12 @@ function _remove_theme_attribute_from_template_part_block( &$block ) {
|
||||
*/
|
||||
function _build_block_template_result_from_file( $template_file, $template_type ) {
|
||||
$default_template_types = get_default_block_template_types();
|
||||
$template_content = file_get_contents( $template_file['path'] );
|
||||
$theme = get_stylesheet();
|
||||
|
||||
$template = new WP_Block_Template();
|
||||
$template->id = $theme . '//' . $template_file['slug'];
|
||||
$template->theme = $theme;
|
||||
$template->content = file_get_contents( $template_file['path'] );
|
||||
$template->slug = $template_file['slug'];
|
||||
$template->source = 'theme';
|
||||
$template->type = $template_type;
|
||||
@@ -554,7 +554,7 @@ function _build_block_template_result_from_file( $template_file, $template_type
|
||||
$before_block_visitor = make_before_block_visitor( $hooked_blocks, $template );
|
||||
$after_block_visitor = make_after_block_visitor( $hooked_blocks, $template );
|
||||
}
|
||||
$blocks = parse_blocks( $template_content );
|
||||
$blocks = parse_blocks( $template->content );
|
||||
$template->content = traverse_and_serialize_blocks( $blocks, $before_block_visitor, $after_block_visitor );
|
||||
|
||||
return $template;
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* if ( $tags->next_tag( array( 'class' => 'wp-group-block' ) ) ) {
|
||||
* if ( $tags->next_tag( array( 'class_name' => 'wp-group-block' ) ) ) {
|
||||
* $tags->set_attribute( 'title', 'This groups the contained content.' );
|
||||
* $tags->remove_attribute( 'data-test-id' );
|
||||
* }
|
||||
|
||||
@@ -94,4 +94,13 @@ class WP_HTML_Token {
|
||||
call_user_func( $this->on_destroy, $this->bookmark_name );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wakeup magic method.
|
||||
*
|
||||
* @since 6.4.2
|
||||
*/
|
||||
public function __wakeup() {
|
||||
throw new \LogicException( __CLASS__ . ' should never be unserialized' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,8 +491,6 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) {
|
||||
* @global array $_wp_switched_stack
|
||||
* @global bool $switched
|
||||
* @global string $table_prefix
|
||||
* @global string $wp_template_path
|
||||
* @global string $wp_stylesheet_path
|
||||
* @global WP_Object_Cache $wp_object_cache
|
||||
*
|
||||
* @param int $new_blog_id The ID of the blog to switch to. Default: current blog.
|
||||
@@ -534,10 +532,8 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) {
|
||||
}
|
||||
|
||||
$wpdb->set_blog_id( $new_blog_id );
|
||||
$GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
|
||||
$GLOBALS['blog_id'] = $new_blog_id;
|
||||
$GLOBALS['wp_template_path'] = null;
|
||||
$GLOBALS['wp_stylesheet_path'] = null;
|
||||
$GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
|
||||
$GLOBALS['blog_id'] = $new_blog_id;
|
||||
|
||||
if ( function_exists( 'wp_cache_switch_to_blog' ) ) {
|
||||
wp_cache_switch_to_blog( $new_blog_id );
|
||||
@@ -604,8 +600,6 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) {
|
||||
* @global int $blog_id
|
||||
* @global bool $switched
|
||||
* @global string $table_prefix
|
||||
* @global string $wp_template_path
|
||||
* @global string $wp_stylesheet_path
|
||||
* @global WP_Object_Cache $wp_object_cache
|
||||
*
|
||||
* @return bool True on success, false if we're already on the current blog.
|
||||
@@ -631,10 +625,8 @@ function restore_current_blog() {
|
||||
}
|
||||
|
||||
$wpdb->set_blog_id( $new_blog_id );
|
||||
$GLOBALS['blog_id'] = $new_blog_id;
|
||||
$GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
|
||||
$GLOBALS['wp_template_path'] = null;
|
||||
$GLOBALS['wp_stylesheet_path'] = null;
|
||||
$GLOBALS['blog_id'] = $new_blog_id;
|
||||
$GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
|
||||
|
||||
if ( function_exists( 'wp_cache_switch_to_blog' ) ) {
|
||||
wp_cache_switch_to_blog( $new_blog_id );
|
||||
|
||||
@@ -1294,6 +1294,13 @@ class WP_REST_Server {
|
||||
$this->add_active_theme_link_to_index( $response );
|
||||
$this->add_site_logo_to_index( $response );
|
||||
$this->add_site_icon_to_index( $response );
|
||||
} else {
|
||||
if ( rest_is_field_included( 'site_logo', $fields ) ) {
|
||||
$this->add_site_logo_to_index( $response );
|
||||
}
|
||||
if ( rest_is_field_included( 'site_icon', $fields ) || rest_is_field_included( 'site_icon_url', $fields ) ) {
|
||||
$this->add_site_icon_to_index( $response );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -188,39 +188,25 @@ function get_stylesheet() {
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 6.4.0 Memoizes filter execution so that it only runs once for the current theme.
|
||||
*
|
||||
* @global string $wp_stylesheet_path Current theme stylesheet directory path.
|
||||
* @since 6.4.2 Memoization removed.
|
||||
*
|
||||
* @return string Path to active theme's stylesheet directory.
|
||||
*/
|
||||
function get_stylesheet_directory() {
|
||||
global $wp_stylesheet_path;
|
||||
$stylesheet = get_stylesheet();
|
||||
$theme_root = get_theme_root( $stylesheet );
|
||||
$stylesheet_dir = "$theme_root/$stylesheet";
|
||||
|
||||
if ( null === $wp_stylesheet_path ) {
|
||||
$stylesheet = get_stylesheet();
|
||||
$theme_root = get_theme_root( $stylesheet );
|
||||
$stylesheet_dir = "$theme_root/$stylesheet";
|
||||
|
||||
/**
|
||||
* Filters the stylesheet directory path for the active theme.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param string $stylesheet_dir Absolute path to the active theme.
|
||||
* @param string $stylesheet Directory name of the active theme.
|
||||
* @param string $theme_root Absolute path to themes directory.
|
||||
*/
|
||||
$stylesheet_dir = apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root );
|
||||
|
||||
// If there are filter callbacks, force the logic to execute on every call.
|
||||
if ( has_filter( 'stylesheet' ) || has_filter( 'theme_root' ) || has_filter( 'stylesheet_directory' ) ) {
|
||||
return $stylesheet_dir;
|
||||
}
|
||||
|
||||
$wp_stylesheet_path = $stylesheet_dir;
|
||||
}
|
||||
|
||||
return $wp_stylesheet_path;
|
||||
/**
|
||||
* Filters the stylesheet directory path for the active theme.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param string $stylesheet_dir Absolute path to the active theme.
|
||||
* @param string $stylesheet Directory name of the active theme.
|
||||
* @param string $theme_root Absolute path to themes directory.
|
||||
*/
|
||||
return apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -338,39 +324,25 @@ function get_template() {
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 6.4.0 Memoizes filter execution so that it only runs once for the current theme.
|
||||
*
|
||||
* @global string $wp_template_path Current theme template directory path.
|
||||
* @since 6.4.1 Memoization removed.
|
||||
*
|
||||
* @return string Path to active theme's template directory.
|
||||
*/
|
||||
function get_template_directory() {
|
||||
global $wp_template_path;
|
||||
$template = get_template();
|
||||
$theme_root = get_theme_root( $template );
|
||||
$template_dir = "$theme_root/$template";
|
||||
|
||||
if ( null === $wp_template_path ) {
|
||||
$template = get_template();
|
||||
$theme_root = get_theme_root( $template );
|
||||
$template_dir = "$theme_root/$template";
|
||||
|
||||
/**
|
||||
* Filters the active theme directory path.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param string $template_dir The path of the active theme directory.
|
||||
* @param string $template Directory name of the active theme.
|
||||
* @param string $theme_root Absolute path to the themes directory.
|
||||
*/
|
||||
$template_dir = apply_filters( 'template_directory', $template_dir, $template, $theme_root );
|
||||
|
||||
// If there are filter callbacks, force the logic to execute on every call.
|
||||
if ( has_filter( 'template' ) || has_filter( 'theme_root' ) || has_filter( 'template_directory' ) ) {
|
||||
return $template_dir;
|
||||
}
|
||||
|
||||
$wp_template_path = $template_dir;
|
||||
}
|
||||
|
||||
return $wp_template_path;
|
||||
/**
|
||||
* Filters the active theme directory path.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param string $template_dir The path of the active theme directory.
|
||||
* @param string $template Directory name of the active theme.
|
||||
* @param string $theme_root Absolute path to the themes directory.
|
||||
*/
|
||||
return apply_filters( 'template_directory', $template_dir, $template, $theme_root );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -776,13 +748,11 @@ function locale_stylesheet() {
|
||||
* @global WP_Customize_Manager $wp_customize
|
||||
* @global array $sidebars_widgets
|
||||
* @global array $wp_registered_sidebars
|
||||
* @global string $wp_stylesheet_path
|
||||
* @global string $wp_template_path
|
||||
*
|
||||
* @param string $stylesheet Stylesheet name.
|
||||
*/
|
||||
function switch_theme( $stylesheet ) {
|
||||
global $wp_theme_directories, $wp_customize, $sidebars_widgets, $wp_registered_sidebars, $wp_stylesheet_path, $wp_template_path;
|
||||
global $wp_theme_directories, $wp_customize, $sidebars_widgets, $wp_registered_sidebars;
|
||||
|
||||
$requirements = validate_theme_requirements( $stylesheet );
|
||||
if ( is_wp_error( $requirements ) ) {
|
||||
@@ -866,13 +836,6 @@ function switch_theme( $stylesheet ) {
|
||||
|
||||
update_option( 'theme_switched', $old_theme->get_stylesheet() );
|
||||
|
||||
/*
|
||||
* Reset globals to force refresh the next time these directories are
|
||||
* accessed via `get_stylesheet_directory()` / `get_template_directory()`.
|
||||
*/
|
||||
$wp_stylesheet_path = null;
|
||||
$wp_template_path = null;
|
||||
|
||||
// Clear pattern caches.
|
||||
$new_theme->delete_pattern_cache();
|
||||
$old_theme->delete_pattern_cache();
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.4.1';
|
||||
$wp_version = '6.4.2';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user