get_default_link_to_edit() WordPress Function
The get_default_link_to_edit() function is used to get the default link to edit for a given post type. This function will return the edit link for the first post type with the capability to edit_posts.
get_default_link_to_edit() #
Retrieves the default link for editing.
Return
(stdClass) Default link object.
Source
File: wp-admin/includes/bookmark.php
function get_default_link_to_edit() { $link = new stdClass; if ( isset( $_GET['linkurl'] ) ) { $link->link_url = esc_url( wp_unslash( $_GET['linkurl'] ) ); } else { $link->link_url = ''; } if ( isset( $_GET['name'] ) ) { $link->link_name = esc_attr( wp_unslash( $_GET['name'] ) ); } else { $link->link_name = ''; } $link->link_visible = 'Y'; return $link; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |