get_default_link_to_edit(): stdClass

In this article

Retrieves the default link for editing.

Return

stdClass Default link object.

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

Changelog

VersionDescription
2.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.