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

WordPress Trac noreply at wordpress.org
Thu Feb 22 13:00:45 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 cbravobernal):

 Replying to [comment:10 swissspidy]:
 > Alright, so maybe instead of `wp_interactivity_encode_context()` what if
 we call it `wp_interactivity_get_context_directive()`? Any other
 suggestions?
 >
 > When we make this change, we'll also need to update the two core blocks
 in the Gutenberg repo to use the new function. Ideally so that it doesn't
 break when using the plugin with an older beta. Who can help with that?
 >
 > We should aim to fix this for beta 3.

 I can make a compat fallback for Gutenberg.

 For me it is not yet clear what to do:
  - Only rename the function to: `wp_interactivity_get_context_directive`
  - Edit the function to return the attribute content instead of the entire
 directive.

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


More information about the wp-trac mailing list