- Timestamp:
- 07/24/2018 05:05:56 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/schema.php
r43525 r43531 536 536 // 4.9.6 537 537 'wp_page_for_privacy_policy' => 0, 538 539 // 4.9.8 540 'show_comments_cookies_opt_in' => 0, 538 541 ); 539 542 -
trunk/src/wp-admin/options-discussion.php
r43525 r43531 86 86 </label> 87 87 <br /> 88 89 <label for="show_comments_cookies_opt_in"> 90 <input name="show_comments_cookies_opt_in" type="checkbox" id="show_comments_cookies_opt_in" value="1" <?php checked( '1', get_option( 'show_comments_cookies_opt_in' ) ); ?> /> 91 <?php _e( 'Show comments cookies opt-in checkbox.' ); ?> 92 </label> 93 <br /> 94 88 95 <label for="thread_comments"> 89 96 <input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked( '1', get_option( 'thread_comments' ) ); ?> /> -
trunk/src/wp-admin/options.php
r43525 r43531 117 117 'comment_order', 118 118 'comment_registration', 119 'show_comments_cookies_opt_in', 119 120 ), 120 121 'media' => array( -
trunk/src/wp-includes/comment-template.php
r43525 r43531 2272 2272 ); 2273 2273 2274 if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) ) {2274 if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) && get_option( 'show_comments_cookies_opt_in' ) ) { 2275 2275 $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; 2276 2276 $fields['cookies'] = '<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' . -
trunk/tests/phpunit/tests/comment/commentForm.php
r43525 r43531 88 88 $p = self::factory()->post->create(); 89 89 90 add_filter( 'option_show_comments_cookies_opt_in', '__return_true' ); 91 90 92 $args = array( 91 93 'fields' => array( … … 95 97 $form = get_echo( 'comment_form', array( $args, $p ) ); 96 98 99 remove_filter( 'option_show_comments_cookies_opt_in', '__return_true' ); 100 97 101 $this->assertRegExp( '|<p class="comment\-form\-cookies\-consent">.*?</p>|', $form ); 98 102 }
Note: See TracChangeset
for help on using the changeset viewer.