theme_version = WOODMART_VERSION; } /** * Get count patches map. * * @return string */ public function get_count_patches_map() { global $pagenow; $patches_maps = get_transient( $this->transient_name ); if ( 'admin.php' === $pagenow && isset( $_GET['page'] ) && ( 'xts_dashboard' === $_GET['page'] || 'xts_theme_settings' === $_GET['page'] ) ) { //phpcs:ignore $patches_maps = $this->get_patches_maps(); } if ( ! $patches_maps || ! is_array( $patches_maps ) ) { return ''; } $patches_installed = get_option( 'xts_successfully_installed_patches', array() ); if ( isset( $patches_installed[ $this->theme_version ] ) ) { $patches_maps = array_diff_key( $patches_maps, $patches_installed[ $this->theme_version ] ); } $count = count( $patches_maps ); if ( 0 === $count ) { return ''; } ob_start(); ?> get_patches_maps_from_server(); $patch_installed = get_option( 'xts_successfully_installed_patches' ); ?>