Documentation

modal-shortlinks.php

Stable modal links that open the modal in its parent scene.

Table of Contents

Functions

graphic_data_add_modal_shortlink_rewrite()  : array<string, string>
Keep modal shortlinks ahead of generic instance/scene rules.
graphic_data_add_modal_query_var()  : array<string|int, string>
Register the modal shortlink query variable.
graphic_data_parse_modal_shortlink()  : void
Support existing installations before their next rewrite-rule refresh.
graphic_data_get_modal_shortlink_destination()  : string
Resolve a publicly available modal and its parent scene.
graphic_data_redirect_modal_shortlink()  : void
Redirect before WordPress attempts to canonicalize the shortlink.
graphic_data_admin_bar_content_shortlink()  : void
Point the editor toolbar's View action at the frontend scene.

Functions

Keep modal shortlinks ahead of generic instance/scene rules.

graphic_data_add_modal_shortlink_rewrite(array<string, string> $rules) : array<string, string>
Parameters
$rules : array<string, string>

Rewrite rules, regex => query string.

Return values
array<string, string>

graphic_data_add_modal_query_var()

Register the modal shortlink query variable.

graphic_data_add_modal_query_var(array<string|int, string> $vars) : array<string|int, string>
Parameters
$vars : array<string|int, string>

Public query variables.

Return values
array<string|int, string>

Support existing installations before their next rewrite-rule refresh.

graphic_data_parse_modal_shortlink(WP $wp) : void
Parameters
$wp : WP

The current WordPress environment instance.

Resolve a publicly available modal and its parent scene.

graphic_data_get_modal_shortlink_destination(int $modal_id) : string
Parameters
$modal_id : int

The modal post ID.

Return values
string —

The scene URL with the modal's hash, or '' when the modal can't be linked.

Redirect before WordPress attempts to canonicalize the shortlink.

graphic_data_redirect_modal_shortlink() : void

Point the editor toolbar's View action at the frontend scene.

graphic_data_admin_bar_content_shortlink(WP_Admin_Bar $admin_bar) : void
Parameters
$admin_bar : WP_Admin_Bar

The admin bar instance.

On this page

Search results