Make WordPress Core


Ignore:
Timestamp:
06/27/2023 06:00:59 AM (3 years ago)
Author:
isabel_brison
Message:

Editor: fix post edit navigation link.

Adds a custom link for navigation post types.

Props get_dave, spacedmonkey, ramonopoly.
Fixes #58589.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r56043 r56053  
    492492        );
    493493
     494        $navigation_post_edit_link = 'site-editor.php?' . build_query(
     495                array(
     496                        'postId'   => '%s',
     497                        'postType' => 'wp_navigation',
     498                        'canvas'   => 'edit',
     499                )
     500        );
     501
    494502        register_post_type(
    495503                'wp_navigation',
    … …  
    518526                        'public'                => false,
    519527                        '_builtin'              => true, /* internal use only. don't use this when registering your own post type. */
     528                        '_edit_link'            => $navigation_post_edit_link, /* internal use only. don't use this when registering your own post type. */
    520529                        'has_archive'           => false,
    521530                        'show_ui'               => true,
Note: See TracChangeset for help on using the changeset viewer.