[wp-trac] [WordPress Trac] #44413: Privacy policy page select is not up-to-date if the options is setted in another than using the select in wp-admin/privacy.php

WordPress Trac noreply at wordpress.org
Wed Jun 20 14:34:14 UTC 2018


#44413: Privacy policy page select is not up-to-date if the options is setted in
another than using the select in wp-admin/privacy.php
--------------------------+------------------------------
 Reporter:  f2cmb         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Privacy       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by f2cmb):

 Replying to [comment:1 subrataemfluence]:
 > Would you please mind to describe the exact steps to reproduce the
 issue?
 > Thank you!

 Hello there !

 After updating the post ID, via an update_option(), or directly in the
 wp_options field, the select stays empty. Here is the way id do it in my
 plugin (assuming the post with this slug exist) :

 {{{#!php
 <?php
 //set the regular policy page in wp-admin privacy.php

 function register_policy_post() {
     $post = get_page_by_path('politique-de-confidentialite', OBJECT,
 'page-systeme');
     if ( $post ) {
         update_option( 'wp_page_for_privacy_policy', $post->ID );
     }
 }
 }}}

 Only the choice made in wp-admin/privacy.php is displayed, even if the
 post selected is a regular page. I guess a patch would be not to loop for
 populating the dropdown through all existing posts, but at least display
 the one registered in the option field in database.

 Best regards.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44413#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list