Skip to content

Commit

Permalink
Replace n.e.x.t in Speculation Rules with the actual version numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Feb 28, 2024
1 parent 6fb35a4 commit 3c4a347
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions plugins/speculation-rules/class-plsr-url-pattern-prefixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
* Class 'PLSR_URL_Pattern_Prefixer'.
*
* @package speculation-rules
* @since n.e.x.t
* @since 1.0.0
*/

/**
* Class for prefixing URL patterns.
*
* @since n.e.x.t
* @since 1.0.0
*/
class PLSR_URL_Pattern_Prefixer {

/**
* Map of `$context_string => $base_path` pairs.
*
* @since n.e.x.t
* @since 1.0.0
* @var array
*/
private $contexts;

/**
* Constructor.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param array $contexts Optional. Map of `$context_string => $base_path` pairs. Default is the contexts returned
* by the {@see PLSR_URL_Pattern_Prefixer::get_default_contexts()} method.
Expand All @@ -50,7 +50,7 @@ static function ( string $str ): string {
*
* The given URL path pattern is only prefixed if it does not already include the expected prefix.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param string $path_pattern URL pattern starting with the path segment.
* @param string $context Optional. Either 'home' (any frontend content) or 'site' (content relative to the
Expand All @@ -69,7 +69,7 @@ public function prefix_path_pattern( string $path_pattern, string $context = 'ho
$context
)
),
'Performance Lab n.e.x.t'
'Performance Lab 1.0.0'
);
return $path_pattern;
}
Expand All @@ -96,7 +96,7 @@ public function prefix_path_pattern( string $path_pattern, string $context = 'ho
/**
* Returns the default contexts used by the class.
*
* @since n.e.x.t
* @since 1.0.0
*
* @return array Map of `$context_string => $base_path` pairs.
*/
Expand All @@ -111,7 +111,7 @@ public static function get_default_contexts(): array {
* Escapes a string for use in a URL pattern component.
*
* @link https://urlpattern.spec.whatwg.org/#escape-a-pattern-string
* @since n.e.x.t
* @since 1.0.1
*
* @param string $str String to be escaped.
* @return string String with backslashes added where required.
Expand Down
6 changes: 3 additions & 3 deletions plugins/speculation-rules/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Helper functions used for Speculation Rules.
*
* @package speculation-rules
* @since n.e.x.t
* @since 1.0.0
*/

/**
Expand All @@ -12,7 +12,7 @@
* Plugins with features that rely on frontend URLs to exclude from prefetching or prerendering should use the
* {@see 'plsr_speculation_rules_href_exclude_paths'} filter to ensure those URL patterns are excluded.
*
* @since n.e.x.t
* @since 1.0.0
*
* @return array Associative array of speculation rules by type.
*/
Expand All @@ -33,7 +33,7 @@ function plsr_get_speculation_rules() {
*
* If the WordPress site is in a subdirectory, the exclude paths will automatically be prefixed as necessary.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param array $href_exclude_paths Paths to disable speculative prerendering for.
*/
Expand Down
4 changes: 2 additions & 2 deletions plugins/speculation-rules/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Hook callbacks used for Speculation Rules.
*
* @package speculation-rules
* @since n.e.x.t
* @since 1.0.0
*/

/**
* Prints the speculation rules.
*
* For browsers that do not support speculation rules yet, the `script[type="speculationrules"]` tag will be ignored.
*
* @since n.e.x.t
* @since 1.0.0
*/
function plsr_print_speculation_rules() {
$rules = plsr_get_speculation_rules();
Expand Down
16 changes: 8 additions & 8 deletions plugins/speculation-rules/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Settings functions used for Speculation Rules.
*
* @package speculation-rules
* @since n.e.x.t
* @since 1.0.0
*/

/**
* Returns the available options for the Speculation Rules mode and their labels.
*
* @since n.e.x.t
* @since 1.0.0
*
* @return array<string, string> Associative array of `$mode => $label` pairs.
*/
Expand All @@ -23,7 +23,7 @@ function plsr_get_mode_labels() {
/**
* Returns the available options for the Speculation Rules eagerness and their labels.
*
* @since n.e.x.t
* @since 1.0.0
*
* @return array<string, string> Associative array of `$eagerness => $label` pairs.
*/
Expand All @@ -38,7 +38,7 @@ function plsr_get_eagerness_labels() {
/**
* Returns the default setting value for Speculation Rules configuration.
*
* @since n.e.x.t
* @since 1.0.0
*
* @return array<string, string> {
* Default setting value.
Expand All @@ -57,7 +57,7 @@ function plsr_get_setting_default() {
/**
* Sanitizes the setting for Speculation Rules configuration.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param mixed $input Setting to sanitize.
* @return array<string, string> {
Expand Down Expand Up @@ -94,7 +94,7 @@ function plsr_sanitize_setting( $input ) {
/**
* Registers setting to control Speculation Rules configuration.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*/
function plsr_register_setting() {
Expand Down Expand Up @@ -130,7 +130,7 @@ function plsr_register_setting() {
/**
* Adds the settings sections and fields for the Speculation Rules configuration.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*/
function plsr_add_setting_ui() {
Expand Down Expand Up @@ -176,7 +176,7 @@ static function () {
/**
* Renders a settings field for the Speculation Rules configuration.
*
* @since n.e.x.t
* @since 1.0.0
* @access private
*
* @param array<string, string> $args {
Expand Down

0 comments on commit 3c4a347

Please sign in to comment.