[wp-trac] [WordPress Trac] #60575: Refactor: `data_wp_context` function does not follow WP standards.

WordPress Trac noreply at wordpress.org
Tue Feb 27 12:50:10 UTC 2024


#60575: Refactor: `data_wp_context` function does not follow WP standards.
--------------------------------------+---------------------
 Reporter:  cbravobernal              |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  6.5
Component:  Editor                    |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  needs-patch dev-feedback  |     Focuses:
--------------------------------------+---------------------

Comment (by darerodz):

 My two cents.

 I would choose `wp_interactivity_data_wp_context`, as Luis just proposed.
 I think it's clear that the function belongs to the Interactivity API and
 is related to the `data-wp-context` directive, without adding other words
 to the name (e.g., `directive`, `attr`).

 In my opinion, other terms mentioned in the discussion wouldn't be
 necessary, as their meaning would be implicit, like `encode` (because devs
 are not going to `decode` the context), or `get` (similar case with
 `set`).

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


More information about the wp-trac mailing list