[wp-trac] [WordPress Trac] #43715: Popup notification for Privacy Policy page

WordPress Trac noreply at wordpress.org
Wed Apr 18 08:06:56 UTC 2018


#43715: Popup notification for Privacy Policy page
-------------------------+------------------------------
 Reporter:  xkon         |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  gdpr         |     Focuses:  ui
-------------------------+------------------------------

Comment (by xkon):

 [attachment:43715.diff] is a first pass to create the `[privacy-policy-
 page]` shortcode.

 It checks if a Privacy Policy page is set in the Privacy tool & if it is
 Published to return the page link.

 The shortcode accepts 2 parameters at the moment:

 - text = The links text so a user can easily alter it
 - divider = a divider in front of the link just in case they want to use
 it in a sentence etc

 Example:

 `[privacy-policy-page text="Read our Privacy Policy" divider=" - "]`

 would output

 ` - <a href="http://dev.oo/src/privacy-policy/">Read our Privacy
 Policy</a>`

 I have some questions though to finalize it:

 1] I've put this into `wp-includes/shortcodes.php` as I don't know if
 there's a better place atm to add this since we can't create new files etc
 as well.

 2] Should we sanitize the params somehow? I couldn't figure out a good way
 as there could be different use cases since some people might want to put
 html etc in it as well for example a `•` divider.

 3] Should we better add 2 dividers? For the use of 'in-between' text? For
 example `left-divider=" - " right-divider=" | "` to give us `- Privacy
 Policy |`

 --

 When the shortcode is finalized I can easily make a pass into the bundled
 themes and add the link along the footer.

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


More information about the wp-trac mailing list