A WordPress-centric search engine for devs and theme authors



get_default_link_to_edit ›

Since2.0.0
Deprecatedn/a
get_default_link_to_edit ( No parameters )
Returns:
  • (stdClass) Default link object.
Defined at:
Codex:

Retrieves the default link for editing.



Source

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;
}