[wp-trac] [WordPress Trac] #57337: Docs: WP Theme class reference properties don't match code

WordPress Trac noreply at wordpress.org
Sat Dec 17 23:31:58 UTC 2022


#57337: Docs: WP Theme class reference properties don't match code
---------------------------+------------------------------
 Reporter:  bertvandepoel  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Themes         |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  docs
---------------------------+------------------------------

Comment (by costdev):

 Making the change I suggested
 [https://core.trac.wordpress.org/ticket/57337#comment:4 here] would change
 [https://developer.wordpress.org/reference/classes/wp_theme/__get/ this
 page].

 {{{#!diff
 get() magic method for properties formerly returned by
 current_theme_info()
 }}}

 Would become:

 {{{#!diff
 get() magic method for properties formerly returned by
 current_theme_info()

 For 'Author' and 'Description', this will return values with markup.
 To get the raw, unformatted values, use the get() method.
 To get the values for display, use the display() method.
 }}}

 Regarding [https://developer.wordpress.org/reference/classes/wp_theme/
 this page], I don't see any reference to this part in the codebase:

 {{{#!diff
 You shouldn’t alter the properties directly, but instead use the methods
 to interact
 with them. For complete list of methods and properties, refer the source
 code.
 }}}

 So this part might be edited another way. @SergeyBiryukov, do you have any
 idea about this, and do you have any thoughts on this ticket?

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


More information about the wp-trac mailing list