Changeset 50841
- Timestamp:
- 05/11/2021 06:24:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php
r49930 r50841 388 388 * 389 389 * @since Twenty Twenty-One 1.0 390 * 391 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. 390 * @since Twenty Twenty-One 1.4 Corrected parameter name for `$output`, 391 * added the `$post` parameter. 392 * 393 * @param string $output The password form HTML output. 394 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. 392 395 * @return string HTML content for password form for password protected post. 393 396 */ 394 function twenty_twenty_one_password_form( $ post = 0 ) {397 function twenty_twenty_one_password_form( $output, $post = 0 ) { 395 398 $post = get_post( $post ); 396 399 $label = 'pwbox-' . ( empty( $post->ID ) ? wp_rand() : $post->ID ); … … 401 404 return $output; 402 405 } 403 add_filter( 'the_password_form', 'twenty_twenty_one_password_form' );406 add_filter( 'the_password_form', 'twenty_twenty_one_password_form', 10, 2 ); 404 407 405 408 /**
Note: See TracChangeset
for help on using the changeset viewer.