Documentation
Documentation
figure-shortlinks.php
Table of Contents
Functions
- graphic_data_add_figure_shortlink_rewrite() : array<string|int, mixed>
- Force figure shortlinks to the beginning of WordPress rewrite rules.
- graphic_data_add_figure_query_var() : array<string|int, mixed>
- Register the custom figure shortlink query variable.
- graphic_data_redirect_figure_shortlink() : void
- Redirect a figure shortlink to its actual location.
Functions
graphic_data_add_figure_shortlink_rewrite()
Force figure shortlinks to the beginning of WordPress rewrite rules.
graphic_data_add_figure_shortlink_rewrite(array<string|int, mixed> $rules) : array<string|int, mixed>
This prevents the generic:
([^/]+)/([^/]+)/?$
rule from capturing:
/f/127/
before the figure shortlink rule can process it.
Parameters
- $rules : array<string|int, mixed>
-
Existing WordPress rewrite rules.
Return values
array<string|int, mixed>graphic_data_add_figure_query_var()
Register the custom figure shortlink query variable.
graphic_data_add_figure_query_var(array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
- $vars : array<string|int, mixed>
-
Existing WordPress query variables.
Return values
array<string|int, mixed>graphic_data_redirect_figure_shortlink()
Redirect a figure shortlink to its actual location.
graphic_data_redirect_figure_shortlink() : void