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

WordPress Trac noreply at wordpress.org
Mon Feb 26 09:17:32 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 luisherranz):

 > what's your take on simply renaming the function for more consistency?

 I know you that you mean consistency with other WordPress functions, but
 to me it's more important to keep consistency with what the function is
 replacing: `data-wp-context`. So `data_wp_context` is the most consistent
 name in my opinion. It's also the only one where people don't need to
 remember one extra concept because it's a direct mental link `data-wp-
 context` <-> `data_wp_context`.

 I know that's not the answer that you're looking for, so just to
 understand the issue better, may I know what type of problems do you
 envision if we follow that path and use `data_wp_directivename` for these
 helpers?

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


More information about the wp-trac mailing list