[wp-trac] [WordPress Trac] #45037: Improve the WordPress Post editing experience
WordPress Trac
noreply at wordpress.org
Sat Oct 20 13:01:38 UTC 2018
#45037: Improve the WordPress Post editing experience
-------------------------------------------------+-------------------------
Reporter: jorbin | Owner: pento
Type: task (blessed) | Status: assigned
Priority: highest omg bbq | Milestone: 5.0
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: early needs-unit-tests has-patch | Focuses:
needs-testing |
-------------------------------------------------+-------------------------
Comment (by birgire):
[attachment:"45037.2.diff"] is a little adjustment on
[attachment:"45037.diff"] that:
- Adds inline filter documentation for:
- {{{apply_filters( 'enter_title_here', __( 'Add title', 'gutenberg' ),
$post )}}}
- {{{apply_filters( 'write_your_story', __( 'Write your story',
'gutenberg' ), $post )}}}
- {{{apply_filters( 'default_page_template_title', __( 'Default
template', 'gutenberg' ), 'rest-api' )}}}
- Removes the {{{'gutenberg'}}} text domain.
- Changes {{{@since 3.7.0}}} to {{{@since 5.0.0}}}
- Adds space in: {{{// Ensure the global $post remains the same afterAPI
data is preloaded.}}}
- Inline documents the global {{{$editor_styles}}};
Some other notes on [attachment:"45037.diff"] :
- Would be nice to explain this in more detail: {{{// It hurts to do
this.}}}
- Check if we can use {{{get_avatar_url()}}} instead of:
{{{
$avatar = get_avatar( $user_id, 64 );
if ( $avatar ) {
if ( preg_match( "|src='([^']+)'|", $avatar, $matches ) ) {
$user_details['avatar'] = $matches[1];
}
}
}}}
- It's not clear to me how the global {{{$post}}} can be modified here:
{{{
// Ensure the global $post remains the same after API data is preloaded.
$backup_global_post = $post;
$preload_data = array_reduce(
$preload_paths,
'rest_preload_api_request',
array()
);
// Restore the global $post as it was before API preloading.
$post = $backup_global_post;
}}}
- Can we move inline CSS style into an existing CSS file: {{{<div
id="metaboxes" style="display: none;">}}} or maybe there's an existing CSS
class for the closed state?
- Both {{{json_encode()}}} and {{{wp_json_encode()}}} used.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45037#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list