Changeset 43532
- Timestamp:
- 07/24/2018 05:07:19 PM (6 years ago)
- Location:
- branches/4.9
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-admin/includes/schema.php
r43526 r43532 520 520 // 4.9.6 521 521 'wp_page_for_privacy_policy' => 0, 522 523 // 4.9.8 524 'show_comments_cookies_opt_in' => 0, 522 525 ); 523 526 -
branches/4.9/src/wp-admin/options-discussion.php
r43526 r43532 78 78 </label> 79 79 <br /> 80 81 <label for="show_comments_cookies_opt_in"> 82 <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' ) ); ?> /> 83 <?php _e( 'Show comments cookies opt-in checkbox.' ); ?> 84 </label> 85 <br /> 86 80 87 <label for="thread_comments"> 81 88 <input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> /> -
branches/4.9/src/wp-admin/options.php
r43526 r43532 117 117 'comment_order', 118 118 'comment_registration', 119 'show_comments_cookies_opt_in', 119 120 ), 120 121 'media' => array( -
branches/4.9/src/wp-includes/comment-template.php
r43526 r43532 2206 2206 ); 2207 2207 2208 if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) ) {2208 if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) && get_option( 'show_comments_cookies_opt_in' ) ) { 2209 2209 $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; 2210 2210 $fields['cookies'] = '<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' . -
branches/4.9/tests/phpunit/tests/comment/commentForm.php
r43526 r43532 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.