Changeset 56603
- Timestamp:
- 09/18/2023 12:28:24 AM (10 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/misc.php
r56549 r56603 1659 1659 * @type string $id Optional. The value of the admin notice's ID attribute. Default empty string. 1660 1660 * @type string[] $additional_classes Optional. A string array of class names. Default empty array. 1661 1661 1662 * @type bool $paragraph_wrap Optional. Whether to wrap the message in paragraph tags. Default true. 1662 1663 * } … … 1669 1670 'id' => '', 1670 1671 'additional_classes' => array(), 1672 1671 1673 'paragraph_wrap' => true, 1672 1674 ); … … 1682 1684 * @param string $message The message for the admin notice. 1683 1685 */ 1684 $args = apply_filters( 'wp_admin_notice_args', $args, $message ); 1685 $id = ''; 1686 $classes = 'notice'; 1686 $args = apply_filters( 'wp_admin_notice_args', $args, $message ); 1687 $id = ''; 1688 $classes = 'notice'; 1689 $attributes = ''; 1687 1690 1688 1691 if ( is_string( $args['id'] ) ) { … … 1722 1725 } 1723 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1724 1740 if ( false !== $args['paragraph_wrap'] ) { 1725 1741 $message = "<p>$message</p>"; 1726 1742 } 1727 1743 1728 $markup = sprintf( '<div %1$sclass="%2$s" >%3$s</div>', $id, $classes, $message );1744 $markup = sprintf( '<div %1$sclass="%2$s"es, $message ); 1729 1745 1730 1746 /** -
trunk/src/wp-includes/kses.php
r56559 r56603 2646 2646 'aria-details' => true, 2647 2647 'aria-expanded' => true, 2648 2648 2649 'aria-label' => true, 2649 2650 'aria-labelledby' => true, 2650 'aria- hidden'=> true,2651 'aria- => true, 2651 2652 'class' => true, 2652 2653 'data-*' => true, 2653 2654 'dir' => true, 2655 2654 2656 'id' => true, 2655 2657 'lang' => true, -
trunk/tests/phpunit/tests/admin/wpAdminNotice.php
r56408 r56603 212 212 ), 213 213 'expected' => '<div class="notice"><p>A notice with additional classes that are not an array.</p></div>', 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 214 279 ), 215 280 'paragraph wrapping as a falsy value rather than (bool) false' => array( -
trunk/tests/phpunit/tests/admin/wpGetAdminNotice.php
r56408 r56603 209 209 'expected' => '<div class="notice"><p>A notice with additional classes that are not an array.</p></div>', 210 210 ), 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 211 269 'paragraph wrapping as a falsy value rather than (bool) false' => array( 212 270 'message' => 'A notice with paragraph wrapping as a falsy value rather than (bool) false.',
Note: See TracChangeset
for help on using the changeset viewer.