[wp-trac] [WordPress Trac] #45529: Correct phpdoc example for Internal Pointers

WordPress Trac noreply at wordpress.org
Fri Feb 22 01:35:46 UTC 2019


#45529: Correct phpdoc example for Internal Pointers
-------------------------------------+------------------------------
 Reporter:  daleharrison             |       Owner:  garrett-eclipse
     Type:  defect (bug)             |      Status:  accepted
 Priority:  normal                   |   Milestone:  5.2
Component:  Administration           |     Version:  3.3
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:  docs
-------------------------------------+------------------------------

Comment (by garrett-eclipse):

 Thanks @desrosj 5.2 sounds good.

 I'm not sure the best approach there as the example will also become
 outdated once the pointer in the example is deprecated. Do you know of any
 other instances where a code sample is provided in the phpdoc block?

 Possibly the example should be moved into a codex page or somewhere we can
 then use a permalink to replace the code example with?

 I did look at how we would note the action hook and priority but was hard
 to come up with something understandable as it's a double function and the
 remove action uses an array to define the WP_Internal_Pointers class. What
 I was left with on my attempt to write something was;
 "Individual pointers can be disabled by wrapping an add_action for
 `admin_enqueue_scripts` with a priority of 11 around a remove_action for
 `admin_print_footer_scripts` to remove the pointer function name with
 `point_` prefix from the WP_Internal_Pointers class"
 *I tried to rewrite the function using the above and was hard pressed, I
 feel the example is worth 1000 words in this case as it clearly shows
 something that can be copy pasted.

 Would love to get your thoughts and can refresh accordingly.

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


More information about the wp-trac mailing list