Changeset 3435099
- Timestamp:
- 01/08/2026 12:07:33 PM (3 months ago)
- Location:
- user-registration
- Files:
-
- 10 edited
- 1 copied
-
tags/4.4.9 (copied) (copied from user-registration/trunk)
-
tags/4.4.9/CHANGELOG.txt (modified) (1 diff)
-
tags/4.4.9/includes/abstracts/abstract-ur-list-table.php (modified) (3 diffs)
-
tags/4.4.9/languages/user-registration.pot (modified) (5 diffs)
-
tags/4.4.9/readme.txt (modified) (2 diffs)
-
tags/4.4.9/user-registration.php (modified) (6 diffs)
-
trunk/CHANGELOG.txt (modified) (1 diff)
-
trunk/includes/abstracts/abstract-ur-list-table.php (modified) (3 diffs)
-
trunk/languages/user-registration.pot (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/user-registration.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
user-registration/tags/4.4.9/CHANGELOG.txt
r3413561 r3435099 1 = 4.4.9 - 08/01/2026 = 2 * Security - Fixed XSS vulnerability for delete users. 3 1 4 = 4.4.8 - 07/12/2025 = 2 5 * Tweak - Fixed empty sdk url. -
user-registration/tags/4.4.9/includes/abstracts/abstract-ur-list-table.php
r3095484 r3435099 264 264 case 'bulk_trash': 265 265 case 'trash': 266 check_admin_referer( 'bulk-' . $this->_args['plural'] ); 267 266 268 if ( ! current_user_can( 'delete_posts' ) ) { 267 269 wp_die( esc_html__( 'You do not have permission to trash posts!', 'user-registration' ) ); … … 270 272 $this->bulk_trash( $post_ids ); 271 273 } 274 272 275 break; 273 276 274 277 case 'bulk_untrash': 275 278 case 'untrash': 279 check_admin_referer( 'bulk-' . $this->_args['plural'] ); 280 276 281 if ( ! current_user_can( 'edit_posts' ) ) { 277 282 wp_die( esc_html__( 'You do not have permission to untrash posts!', 'user-registration' ) ); … … 280 285 $this->bulk_untrash( $post_ids ); 281 286 } 287 282 288 break; 283 289 284 290 case 'bulk_delete': 285 291 case 'delete': 292 check_admin_referer( 'bulk-' . $this->_args['plural'] ); 293 286 294 if ( ! current_user_can( 'delete_posts' ) ) { 287 295 wp_die( esc_html__( 'You do not have permission to delete posts!', 'user-registration' ) ); -
user-registration/tags/4.4.9/languages/user-registration.pot
r3413561 r3435099 1 # Copyright (C) 202 5WPEverest1 # Copyright (C) 2026 WPEverest 2 2 # This file is distributed under the same license as the User Registration & Membership plugin. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: User Registration & Membership 4.4. 8\n"5 "Project-Id-Version: User Registration & Membership 4.4.9\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-registration\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-12-07T15:35:51+00:00\n"12 "POT-Creation-Date: 2026-01-08T12:06:21+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 481 481 482 482 #: includes/abstracts/abstract-ur-list-table.php:258 483 #: includes/abstracts/abstract-ur-list-table.php: 298483 #: includes/abstracts/abstract-ur-list-table.php:306 484 484 #: includes/admin/class-ur-admin-export-users.php:51 485 485 #: includes/admin/class-ur-admin-import-export-forms.php:51 … … 493 493 msgstr "" 494 494 495 #: includes/abstracts/abstract-ur-list-table.php:26 7495 #: includes/abstracts/abstract-ur-list-table.php:269 496 496 msgid "You do not have permission to trash posts!" 497 497 msgstr "" 498 498 499 #: includes/abstracts/abstract-ur-list-table.php:2 77499 #: includes/abstracts/abstract-ur-list-table.php:282 500 500 msgid "You do not have permission to untrash posts!" 501 501 msgstr "" 502 502 503 #: includes/abstracts/abstract-ur-list-table.php:2 87504 #: includes/abstracts/abstract-ur-list-table.php: 296503 #: includes/abstracts/abstract-ur-list-table.php:295 504 #: includes/abstracts/abstract-ur-list-table.php:304 505 505 msgid "You do not have permission to delete posts!" 506 506 msgstr "" 507 507 508 #: includes/abstracts/abstract-ur-list-table.php:34 0508 #: includes/abstracts/abstract-ur-list-table.php:348 509 509 msgid "Copy of " 510 510 msgstr "" 511 511 512 #: includes/abstracts/abstract-ur-list-table.php:4 87512 #: includes/abstracts/abstract-ur-list-table.php:495 513 513 msgid "Empty trash" 514 514 msgstr "" 515 515 516 #: includes/abstracts/abstract-ur-list-table.php:5 64516 #: includes/abstracts/abstract-ur-list-table.php:572 517 517 msgid "Y/m/d g:i:s A" 518 518 msgstr "" 519 519 520 520 #. translators: %s - Human readable time 521 #: includes/abstracts/abstract-ur-list-table.php:5 77521 #: includes/abstracts/abstract-ur-list-table.php:585 522 522 msgid "%s ago" 523 523 msgstr "" 524 524 525 #: includes/abstracts/abstract-ur-list-table.php:58 1525 #: includes/abstracts/abstract-ur-list-table.php:589 526 526 msgid "Y/m/d" 527 527 msgstr "" 528 528 529 #: includes/abstracts/abstract-ur-list-table.php:6 64529 #: includes/abstracts/abstract-ur-list-table.php:672 530 530 #: includes/admin/settings/class-ur-users-list-table.php:670 531 531 #: includes/admin/views/html-admin-page-form-templates.php:47 … … 11828 11828 msgstr "" 11829 11829 11830 #: user-registration.php:6 4311830 #: user-registration.php:659 11831 11831 msgid "As <strong>User Registration & Membership Pro</strong> is active, <strong>User Registration Free</strong> is now not needed." 11832 11832 msgstr "" -
user-registration/tags/4.4.9/readme.txt
r3413561 r3435099 5 5 Requires PHP: 7.2 6 6 Tested up to: 6.9 7 Stable tag: 4.4. 87 Stable tag: 4.4.9 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 258 258 259 259 == Changelog == 260 261 = 4.4.9 - 08/01/2026 = 262 * Security - Fixed XSS vulnerability for delete users. 260 263 261 264 = 4.4.8 - 07/12/2025 = -
user-registration/tags/4.4.9/user-registration.php
r3413561 r3435099 4 4 * Plugin URI: https://wpuserregistration.com/ 5 5 * Description: The most flexible User Registration and Membership plugin for WordPress. 6 * Version: 4.4. 86 * Version: 4.4.9 7 7 * Author: WPEverest 8 8 * Author URI: https://wpuserregistration.com … … 36 36 * @var string 37 37 */ 38 public $version = '4.4. 8';38 public $version = '4.4.9'; 39 39 40 40 /** … … 113 113 $this->init_hooks(); 114 114 add_action( 'plugins_loaded', array( $this, 'objects' ), 1 ); 115 add_action( 'in_plugin_update_message-' . UR_PLUGIN_BASENAME, array( __CLASS__, 'in_plugin_update_message' ) );115 add_action( 'in_plugin_update_message-' . UR_PLUGIN_BASENAME, array( __CLASS__, 'in_plugin_update_message' ), 10, 2 ); 116 116 117 117 do_action( 'user_registration_loaded' ); … … 481 481 * @param array $args Plugin args. 482 482 */ 483 public static function in_plugin_update_message( $args ) { 484 $transient_name = 'ur_upgrade_notice_' . $args['Version']; 483 public static function in_plugin_update_message( $plugin_data, $response ) { 484 if ( empty( $response ) || empty( $response->new_version ) ) { 485 return; 486 } 487 $new_version = (string) $response->new_version; 488 489 $transient_name = 'ur_upgrade_notice_' . $new_version; 485 490 $upgrade_notice = get_transient( $transient_name ); 486 491 487 492 if ( false === $upgrade_notice ) { 488 $ response = wp_safe_remote_get( 'https://plugins.svn.wordpress.org/user-registration/trunk/readme.txt' );489 490 if ( ! is_wp_error( $ response ) && ! empty( $response['body'] ) ) {491 $upgrade_notice = self::parse_update_notice( $ response['body'], $args['new_version']);492 set_transient( $transient_name, $upgrade_notice, DAY_IN_SECONDS );493 $http_response = wp_safe_remote_get( 'https://plugins.svn.wordpress.org/user-registration/trunk/readme.txt' ); 494 495 if ( ! is_wp_error( $http_response ) && ! empty( $http_response['body'] ) ) { 496 $upgrade_notice = self::parse_update_notice( $http_response['body'], $new_version ); 497 set_transient( $transient_name, $upgrade_notice, 3 * DAY_IN_SECONDS ); 493 498 } 494 499 } … … 504 509 */ 505 510 private static function parse_update_notice( $content, $new_version ) { 506 // Output Upgrade Notice.507 $matches = null;508 $regexp = '~==\s*Upgrade Notice\s*==\s*=\s*(.*)\s*=(.*)(=\s*' . preg_quote( UR_VERSION ) . '\s*=|$)~Uis';509 511 $upgrade_notice = ''; 510 512 511 if ( preg_match( $regexp, $content, $matches ) ) { 512 513 $version = trim( $matches[1] ); 514 $notices = (array) preg_split( '~[\r\n]+~', trim( $matches[2] ) ); 515 516 // Check the latest stable version and ignore trunk. 517 if ( $version === $new_version && version_compare( UR_VERSION, $version, '<' ) ) { 513 // Match all version blocks under "== Upgrade Notice ==" 514 $blocks_regex = '~=\s*([\d\.]+)\s*=(.*?)(?==\s*[\d\.]+\s*=|$)~s'; 515 if ( preg_match_all( $blocks_regex, $content, $matches, PREG_SET_ORDER ) ) { 516 foreach ( $matches as $match ) { 517 $version_line = trim( $match[1] ); 518 $block_text = trim( $match[2] ); 519 520 // Only process the block if it matches $new_version 521 if ( $version_line !== $new_version ) { 522 continue; 523 } 524 525 $notices = (array) preg_split( '~[\r\n]+~', $block_text ); 518 526 519 527 $upgrade_notice .= '<div class="ur_plugin_upgrade_notice">'; … … 521 529 522 530 foreach ( $notices as $line ) { 523 524 $line = trim( $line ); // Remove extra whitespace 525 531 $line = trim( $line ); 526 532 if ( empty( $line ) ) { 527 continue; // Skip empty lines533 continue; 528 534 } 529 535 530 $line = preg_replace( '~\[([^\]]*)\]\(([^\)]*)\)~', '<a href="$2">$1</a>', $line ); 531 532 $line = preg_replace( '~^###\s*(.*)~', '<p class="upgrade-title" style="font-size: 14px;font-weight: 600" >$1</p>', $line ); 533 534 if ( ! preg_match( '~^<h3>|<p>|<a |<ul>|<ol>|<li>~', $line ) ) { 535 $line = '<p style="font-size: 12px;>' . $line . '</p>'; 536 $line = preg_replace( 537 '~\[\s*([^\]]+)\s*\]\s*\(\s*([^\)]+)\s*\)~', 538 '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>', 539 $line 540 ); 541 542 // Convert headings 543 if ( preg_match( '~^###\s*(.*)~', $line, $heading ) ) { 544 $line = '<p class="upgrade-title" style="font-size:13px;font-weight:600;">' . $heading[1] . '</p>'; 545 } elseif ( preg_match( '~^##\s*(.*)~', $line, $heading ) ) { 546 $line = '<p class="upgrade-heading" style="font-size:14px;font-weight:600;">' . $heading[1] . '</p>'; 547 } else { 548 $line = '<p style="font-size:12px;">' . $line . '</p>'; 536 549 } 537 550 538 $upgrade_notice .= wp_kses_post( trim( $line ));551 $upgrade_notice .= wp_kses_post( $line ); 539 552 } 540 553 541 $upgrade_notice .= '</div> '; 542 $upgrade_notice .= '</div> '; 554 $upgrade_notice .= '</div>'; 555 $upgrade_notice .= '</div>'; 556 557 break; 543 558 } 544 559 } 560 545 561 return wp_kses_post( $upgrade_notice ); 546 562 } -
user-registration/trunk/CHANGELOG.txt
r3413561 r3435099 1 = 4.4.9 - 08/01/2026 = 2 * Security - Fixed XSS vulnerability for delete users. 3 1 4 = 4.4.8 - 07/12/2025 = 2 5 * Tweak - Fixed empty sdk url. -
user-registration/trunk/includes/abstracts/abstract-ur-list-table.php
r3095484 r3435099 264 264 case 'bulk_trash': 265 265 case 'trash': 266 check_admin_referer( 'bulk-' . $this->_args['plural'] ); 267 266 268 if ( ! current_user_can( 'delete_posts' ) ) { 267 269 wp_die( esc_html__( 'You do not have permission to trash posts!', 'user-registration' ) ); … … 270 272 $this->bulk_trash( $post_ids ); 271 273 } 274 272 275 break; 273 276 274 277 case 'bulk_untrash': 275 278 case 'untrash': 279 check_admin_referer( 'bulk-' . $this->_args['plural'] ); 280 276 281 if ( ! current_user_can( 'edit_posts' ) ) { 277 282 wp_die( esc_html__( 'You do not have permission to untrash posts!', 'user-registration' ) ); … … 280 285 $this->bulk_untrash( $post_ids ); 281 286 } 287 282 288 break; 283 289 284 290 case 'bulk_delete': 285 291 case 'delete': 292 check_admin_referer( 'bulk-' . $this->_args['plural'] ); 293 286 294 if ( ! current_user_can( 'delete_posts' ) ) { 287 295 wp_die( esc_html__( 'You do not have permission to delete posts!', 'user-registration' ) ); -
user-registration/trunk/languages/user-registration.pot
r3413561 r3435099 1 # Copyright (C) 202 5WPEverest1 # Copyright (C) 2026 WPEverest 2 2 # This file is distributed under the same license as the User Registration & Membership plugin. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: User Registration & Membership 4.4. 8\n"5 "Project-Id-Version: User Registration & Membership 4.4.9\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-registration\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-12-07T15:35:51+00:00\n"12 "POT-Creation-Date: 2026-01-08T12:06:21+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 481 481 482 482 #: includes/abstracts/abstract-ur-list-table.php:258 483 #: includes/abstracts/abstract-ur-list-table.php: 298483 #: includes/abstracts/abstract-ur-list-table.php:306 484 484 #: includes/admin/class-ur-admin-export-users.php:51 485 485 #: includes/admin/class-ur-admin-import-export-forms.php:51 … … 493 493 msgstr "" 494 494 495 #: includes/abstracts/abstract-ur-list-table.php:26 7495 #: includes/abstracts/abstract-ur-list-table.php:269 496 496 msgid "You do not have permission to trash posts!" 497 497 msgstr "" 498 498 499 #: includes/abstracts/abstract-ur-list-table.php:2 77499 #: includes/abstracts/abstract-ur-list-table.php:282 500 500 msgid "You do not have permission to untrash posts!" 501 501 msgstr "" 502 502 503 #: includes/abstracts/abstract-ur-list-table.php:2 87504 #: includes/abstracts/abstract-ur-list-table.php: 296503 #: includes/abstracts/abstract-ur-list-table.php:295 504 #: includes/abstracts/abstract-ur-list-table.php:304 505 505 msgid "You do not have permission to delete posts!" 506 506 msgstr "" 507 507 508 #: includes/abstracts/abstract-ur-list-table.php:34 0508 #: includes/abstracts/abstract-ur-list-table.php:348 509 509 msgid "Copy of " 510 510 msgstr "" 511 511 512 #: includes/abstracts/abstract-ur-list-table.php:4 87512 #: includes/abstracts/abstract-ur-list-table.php:495 513 513 msgid "Empty trash" 514 514 msgstr "" 515 515 516 #: includes/abstracts/abstract-ur-list-table.php:5 64516 #: includes/abstracts/abstract-ur-list-table.php:572 517 517 msgid "Y/m/d g:i:s A" 518 518 msgstr "" 519 519 520 520 #. translators: %s - Human readable time 521 #: includes/abstracts/abstract-ur-list-table.php:5 77521 #: includes/abstracts/abstract-ur-list-table.php:585 522 522 msgid "%s ago" 523 523 msgstr "" 524 524 525 #: includes/abstracts/abstract-ur-list-table.php:58 1525 #: includes/abstracts/abstract-ur-list-table.php:589 526 526 msgid "Y/m/d" 527 527 msgstr "" 528 528 529 #: includes/abstracts/abstract-ur-list-table.php:6 64529 #: includes/abstracts/abstract-ur-list-table.php:672 530 530 #: includes/admin/settings/class-ur-users-list-table.php:670 531 531 #: includes/admin/views/html-admin-page-form-templates.php:47 … … 11828 11828 msgstr "" 11829 11829 11830 #: user-registration.php:6 4311830 #: user-registration.php:659 11831 11831 msgid "As <strong>User Registration & Membership Pro</strong> is active, <strong>User Registration Free</strong> is now not needed." 11832 11832 msgstr "" -
user-registration/trunk/readme.txt
r3413561 r3435099 5 5 Requires PHP: 7.2 6 6 Tested up to: 6.9 7 Stable tag: 4.4. 87 Stable tag: 4.4.9 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 258 258 259 259 == Changelog == 260 261 = 4.4.9 - 08/01/2026 = 262 * Security - Fixed XSS vulnerability for delete users. 260 263 261 264 = 4.4.8 - 07/12/2025 = -
user-registration/trunk/user-registration.php
r3413561 r3435099 4 4 * Plugin URI: https://wpuserregistration.com/ 5 5 * Description: The most flexible User Registration and Membership plugin for WordPress. 6 * Version: 4.4. 86 * Version: 4.4.9 7 7 * Author: WPEverest 8 8 * Author URI: https://wpuserregistration.com … … 36 36 * @var string 37 37 */ 38 public $version = '4.4. 8';38 public $version = '4.4.9'; 39 39 40 40 /** … … 113 113 $this->init_hooks(); 114 114 add_action( 'plugins_loaded', array( $this, 'objects' ), 1 ); 115 add_action( 'in_plugin_update_message-' . UR_PLUGIN_BASENAME, array( __CLASS__, 'in_plugin_update_message' ) );115 add_action( 'in_plugin_update_message-' . UR_PLUGIN_BASENAME, array( __CLASS__, 'in_plugin_update_message' ), 10, 2 ); 116 116 117 117 do_action( 'user_registration_loaded' ); … … 481 481 * @param array $args Plugin args. 482 482 */ 483 public static function in_plugin_update_message( $args ) { 484 $transient_name = 'ur_upgrade_notice_' . $args['Version']; 483 public static function in_plugin_update_message( $plugin_data, $response ) { 484 if ( empty( $response ) || empty( $response->new_version ) ) { 485 return; 486 } 487 $new_version = (string) $response->new_version; 488 489 $transient_name = 'ur_upgrade_notice_' . $new_version; 485 490 $upgrade_notice = get_transient( $transient_name ); 486 491 487 492 if ( false === $upgrade_notice ) { 488 $ response = wp_safe_remote_get( 'https://plugins.svn.wordpress.org/user-registration/trunk/readme.txt' );489 490 if ( ! is_wp_error( $ response ) && ! empty( $response['body'] ) ) {491 $upgrade_notice = self::parse_update_notice( $ response['body'], $args['new_version']);492 set_transient( $transient_name, $upgrade_notice, DAY_IN_SECONDS );493 $http_response = wp_safe_remote_get( 'https://plugins.svn.wordpress.org/user-registration/trunk/readme.txt' ); 494 495 if ( ! is_wp_error( $http_response ) && ! empty( $http_response['body'] ) ) { 496 $upgrade_notice = self::parse_update_notice( $http_response['body'], $new_version ); 497 set_transient( $transient_name, $upgrade_notice, 3 * DAY_IN_SECONDS ); 493 498 } 494 499 } … … 504 509 */ 505 510 private static function parse_update_notice( $content, $new_version ) { 506 // Output Upgrade Notice.507 $matches = null;508 $regexp = '~==\s*Upgrade Notice\s*==\s*=\s*(.*)\s*=(.*)(=\s*' . preg_quote( UR_VERSION ) . '\s*=|$)~Uis';509 511 $upgrade_notice = ''; 510 512 511 if ( preg_match( $regexp, $content, $matches ) ) { 512 513 $version = trim( $matches[1] ); 514 $notices = (array) preg_split( '~[\r\n]+~', trim( $matches[2] ) ); 515 516 // Check the latest stable version and ignore trunk. 517 if ( $version === $new_version && version_compare( UR_VERSION, $version, '<' ) ) { 513 // Match all version blocks under "== Upgrade Notice ==" 514 $blocks_regex = '~=\s*([\d\.]+)\s*=(.*?)(?==\s*[\d\.]+\s*=|$)~s'; 515 if ( preg_match_all( $blocks_regex, $content, $matches, PREG_SET_ORDER ) ) { 516 foreach ( $matches as $match ) { 517 $version_line = trim( $match[1] ); 518 $block_text = trim( $match[2] ); 519 520 // Only process the block if it matches $new_version 521 if ( $version_line !== $new_version ) { 522 continue; 523 } 524 525 $notices = (array) preg_split( '~[\r\n]+~', $block_text ); 518 526 519 527 $upgrade_notice .= '<div class="ur_plugin_upgrade_notice">'; … … 521 529 522 530 foreach ( $notices as $line ) { 523 524 $line = trim( $line ); // Remove extra whitespace 525 531 $line = trim( $line ); 526 532 if ( empty( $line ) ) { 527 continue; // Skip empty lines533 continue; 528 534 } 529 535 530 $line = preg_replace( '~\[([^\]]*)\]\(([^\)]*)\)~', '<a href="$2">$1</a>', $line ); 531 532 $line = preg_replace( '~^###\s*(.*)~', '<p class="upgrade-title" style="font-size: 14px;font-weight: 600" >$1</p>', $line ); 533 534 if ( ! preg_match( '~^<h3>|<p>|<a |<ul>|<ol>|<li>~', $line ) ) { 535 $line = '<p style="font-size: 12px;>' . $line . '</p>'; 536 $line = preg_replace( 537 '~\[\s*([^\]]+)\s*\]\s*\(\s*([^\)]+)\s*\)~', 538 '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>', 539 $line 540 ); 541 542 // Convert headings 543 if ( preg_match( '~^###\s*(.*)~', $line, $heading ) ) { 544 $line = '<p class="upgrade-title" style="font-size:13px;font-weight:600;">' . $heading[1] . '</p>'; 545 } elseif ( preg_match( '~^##\s*(.*)~', $line, $heading ) ) { 546 $line = '<p class="upgrade-heading" style="font-size:14px;font-weight:600;">' . $heading[1] . '</p>'; 547 } else { 548 $line = '<p style="font-size:12px;">' . $line . '</p>'; 536 549 } 537 550 538 $upgrade_notice .= wp_kses_post( trim( $line ));551 $upgrade_notice .= wp_kses_post( $line ); 539 552 } 540 553 541 $upgrade_notice .= '</div> '; 542 $upgrade_notice .= '</div> '; 554 $upgrade_notice .= '</div>'; 555 $upgrade_notice .= '</div>'; 556 557 break; 543 558 } 544 559 } 560 545 561 return wp_kses_post( $upgrade_notice ); 546 562 }
Note: See TracChangeset
for help on using the changeset viewer.