wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



register_site_editor_wp_admin_route › WordPress Function

Seitn/v
Veraltetn/v
register_site_editor_wp_admin_route ( $path, $content_module = null, $route_module = null )
Parameter: (3)
  • (string) $path Route path (e.g., '/types/$type/edit/$id').
    Erforderlich: Ja
  • (string|null) $content_module Script module ID for content (stage/inspector).
    Erforderlich: Nein
    Standard: null
  • (string|null) $route_module Script module ID for route lifecycle hooks.
    Erforderlich: Nein
    Standard: null
Definiert in:
Codex:

Register a route for the site-editor-wp-admin page.



Quellcode

function register_site_editor_wp_admin_route( $path, $content_module = null, $route_module = null ) {
		global $wp_site_editor_wp_admin_routes;

		$route = array( 'path' => $path );
		if ( ! empty( $content_module ) ) {
			$route['content_module'] = $content_module;
		}
		if ( ! empty( $route_module ) ) {
			$route['route_module'] = $route_module;
		}

		$wp_site_editor_wp_admin_routes[] = $route;
	}
}