[wp-trac] [WordPress Trac] #57908: No reference for hook "logout-link" in Documentation

WordPress Trac noreply at wordpress.org
Sun Mar 12 03:38:43 UTC 2023


#57908: No reference for hook "logout-link" in Documentation
--------------------------+----------------------
 Reporter:  mlheyd        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Shortcodes    |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by costdev):

 * status:  new => closed
 * component:  General => Shortcodes
 * version:  6.1.1 =>
 * milestone:  Awaiting Review =>
 * keywords:  needs-user-docs =>
 * resolution:   => invalid


Comment:

 Hi @mlheyd, welcome to Trac!

 In this context, `logout-link` is not a hook, but a shortcode tag, used
 like so: `[logout-link]`. This is a user-defined string, so you could, for
 example, have written `add_shortcode( 'logout_link',
 'logout_link_shortcode' );`, and then used this with `[logout_link]`
 instead.

 As this is a user-defined string, there's no documentation for `logout-
 link` specifically. However, you can view the documentation for
 [https://developer.wordpress.org/reference/functions/add_shortcode/
 add_shortcode], and read about the
 [https://codex.wordpress.org/Shortcode_API Shortcode API].

 Hooks, on the other hand, refer to **Actions** and **Filters**.
 [https://learn.wordpress.org/ Learn WordPress] has a tutorial on
 [https://learn.wordpress.org/tutorial/wordpress-action-hooks/ Actions] and
 [https://learn.wordpress.org/tutorial/wordpress-filter-hooks/ Filters]
 that you might find very useful for finding out more about these.

 Trac itself is for the development of WordPress Core, rather than for
 discussion and/or support. You can find out more from the resources on
 [https://learn.wordpress.org/ Learn WordPress], and you can also ask
 questions on [https://wordpress.org/support/forum/wp-advanced/ the
 "Developing with WordPress" forum].

 As this ticket doesn't report a bug, or request an enhancement or feature
 in WordPress Core, I'll close this ticket as `invalid`.

 Have a great time developing with WordPress!

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


More information about the wp-trac mailing list