From 1821be57751d21b923fbfa7a54b62f67032a4e94 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 17 May 2021 21:20:15 -0700 Subject: [PATCH] Bump 2.1.2 and regenerate docs --- amp.php | 4 +- docs/docs.json | 189 ++++++++++-------- docs/hook/amp_custom_paired_url_structure.md | 2 +- .../amp_customizer_enqueue_preview_scripts.md | 2 +- docs/hook/amp_customizer_enqueue_scripts.md | 2 +- docs/hook/amp_customizer_init.md | 2 +- docs/hook/amp_customizer_post_type.md | 2 +- docs/hook/amp_customizer_register_settings.md | 2 +- docs/hook/amp_customizer_register_ui.md | 2 +- docs/hook/amp_enable_optimizer.md | 2 +- .../hook/amp_featured_image_minimum_height.md | 2 +- docs/hook/amp_featured_image_minimum_width.md | 2 +- docs/hook/amp_options_menu_is_enabled.md | 2 +- docs/hook/amp_post_template_analytics.md | 2 +- docs/hook/amp_supportable_templates.md | 2 +- docs/hook/amp_validation_error_sanitized.md | 2 +- 16 files changed, 121 insertions(+), 100 deletions(-) diff --git a/amp.php b/amp.php index f7844a1fbf6..b495432d7ea 100644 --- a/amp.php +++ b/amp.php @@ -5,7 +5,7 @@ * Plugin URI: https://amp-wp.org * Author: AMP Project Contributors * Author URI: https://github.com/ampproject/amp-wp/graphs/contributors - * Version: 2.1.2-RC1 + * Version: 2.1.2 * License: GPLv2 or later * Requires at least: 4.9 * Requires PHP: 5.6 @@ -15,7 +15,7 @@ define( 'AMP__FILE__', __FILE__ ); define( 'AMP__DIR__', dirname( __FILE__ ) ); -define( 'AMP__VERSION', '2.1.2-RC1' ); +define( 'AMP__VERSION', '2.1.2' ); /** * Errors encountered while loading the plugin. diff --git a/docs/docs.json b/docs/docs.json index 571a57d54aa..fc45ed7c973 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -80,17 +80,17 @@ "includes": [ { "name": "", - "line": 167, + "line": 172, "type": "Require" }, { "name": "", - "line": 240, + "line": 245, "type": "Require" }, { "name": "", - "line": 366, + "line": 371, "type": "Include" } ], @@ -98,8 +98,8 @@ "hooks": [ { "name": "amp_featured_image_minimum_height", - "line": 310, - "end_line": 310, + "line": 315, + "end_line": 315, "type": "filter", "arguments": [ "$default_height" @@ -125,8 +125,8 @@ }, { "name": "amp_featured_image_minimum_width", - "line": 320, - "end_line": 320, + "line": 325, + "end_line": 325, "type": "filter", "arguments": [ "$default_width" @@ -168,17 +168,17 @@ "includes": [ { "name": "", - "line": 327, + "line": 349, "type": "Require" }, { "name": "", - "line": 582, + "line": 604, "type": "Require" }, { "name": "", - "line": 650, + "line": 672, "type": "Require" } ], @@ -186,8 +186,8 @@ "hooks": { "0": { "name": "amp_customizer_init", - "line": 105, - "end_line": 105, + "line": 108, + "end_line": 108, "type": "action", "arguments": [ "$self" @@ -213,8 +213,8 @@ }, "1": { "name": "amp_customizer_register_ui", - "line": 280, - "end_line": 280, + "line": 302, + "end_line": 302, "type": "action", "arguments": [ "$this->wp_customize" @@ -240,8 +240,8 @@ }, "2": { "name": "amp_customizer_register_settings", - "line": 316, - "end_line": 316, + "line": 338, + "end_line": 338, "type": "action", "arguments": [ "$this->wp_customize" @@ -267,8 +267,8 @@ }, "9": { "name": "amp_customizer_enqueue_scripts", - "line": 632, - "end_line": 632, + "line": 654, + "end_line": 654, "type": "action", "arguments": [ "$this->wp_customize" @@ -294,8 +294,8 @@ }, "11": { "name": "amp_customizer_enqueue_preview_scripts", - "line": 723, - "end_line": 723, + "line": 745, + "end_line": 745, "type": "action", "arguments": [ "$this->wp_customize" @@ -335,11 +335,11 @@ "path": "includes\/admin\/functions.php", "root": "\/app\/public\/content\/plugins\/amp", "functions": [], - "hooks": { - "0": { + "hooks": [ + { "name": "amp_customizer_post_type", - "line": 43, - "end_line": 43, + "line": 45, + "end_line": 45, "type": "filter", "arguments": [ "'post'" @@ -348,6 +348,10 @@ "description": "Filter the post type to retrieve the latest for use in the AMP template customizer.", "long_description": "", "tags": [ + { + "name": "todo", + "content": "This filter doesn't actually do anything at present. Instead of array_unique() below, an array_intersect() should have been used." + }, { "name": "param", "content": "Post type slug. Default 'post'.", @@ -358,44 +362,8 @@ } ] } - }, - "2": { - "name": "amp_post_template_analytics", - "line": 159, - "end_line": 159, - "type": "filter", - "arguments": [ - "$analytics", - "get_queried_object()" - ], - "doc": { - "description": "Add amp-analytics tags.", - "long_description": "This filter allows you to easily insert any amp-analytics tags without needing much heavy lifting. This filter should be used to alter entries for legacy AMP templates.", - "tags": [ - { - "name": "since", - "content": "0.4" - }, - { - "name": "param", - "content": "An associative array of the analytics entries we want to output. Each array entry must have a unique key, and the value should be an array with the following keys: `type`, `attributes`, `script_data`. See readme for more details.", - "types": [ - "array" - ], - "variable": "$analytics" - }, - { - "name": "param", - "content": "The current post.", - "types": [ - "\\WP_Post" - ], - "variable": "$post" - } - ] - } } - } + ] }, "15": { "file": { @@ -2620,6 +2588,59 @@ } } }, + "17": { + "file": { + "description": "Callbacks for adding content to an AMP template.", + "long_description": "", + "tags": [ + { + "name": "package", + "content": "AMP" + } + ] + }, + "path": "includes\/amp-post-template-functions.php", + "root": "\/app\/public\/content\/plugins\/amp", + "functions": [], + "hooks": [ + { + "name": "amp_post_template_analytics", + "line": 154, + "end_line": 154, + "type": "filter", + "arguments": [ + "$analytics", + "get_queried_object()" + ], + "doc": { + "description": "Add amp-analytics tags.", + "long_description": "This filter allows you to easily insert any amp-analytics tags without needing much heavy lifting. This filter should be used to alter entries for legacy AMP templates.", + "tags": [ + { + "name": "since", + "content": "0.4" + }, + { + "name": "param", + "content": "An associative array of the analytics entries we want to output. Each array entry must have a unique key, and the value should be an array with the following keys: `type`, `attributes`, `script_data`. See readme for more details.", + "types": [ + "array" + ], + "variable": "$analytics" + }, + { + "name": "param", + "content": "The current post.", + "types": [ + "\\WP_Post" + ], + "variable": "$post" + } + ] + } + } + ] + }, "21": { "file": { "description": "Class AMP_HTTP", @@ -2807,8 +2828,8 @@ "hooks": { "1": { "name": "amp_supportable_templates", - "line": 785, - "end_line": 785, + "line": 794, + "end_line": 794, "type": "filter", "arguments": [ "$templates" @@ -2834,8 +2855,8 @@ }, "9": { "name": "amp_enable_optimizer", - "line": 2001, - "end_line": 2001, + "line": 2013, + "end_line": 2013, "type": "filter", "arguments": [ "$enable_optimizer" @@ -7783,12 +7804,12 @@ "includes": [ { "name": "", - "line": 949, + "line": 950, "type": "Require" }, { "name": "", - "line": 990, + "line": 991, "type": "Require" } ], @@ -7796,8 +7817,8 @@ "hooks": [ { "name": "amp_validation_error_sanitized", - "line": 527, - "end_line": 527, + "line": 528, + "end_line": 528, "type": "filter", "arguments": [ "null", @@ -8021,12 +8042,12 @@ "includes": [ { "name": "", - "line": 138, + "line": 142, "type": "Require Once" }, { "name": "", - "line": 189, + "line": 191, "type": "Require" } ], @@ -8034,8 +8055,8 @@ "hooks": [ { "name": "amp_options_menu_is_enabled", - "line": 79, - "end_line": 79, + "line": 81, + "end_line": 81, "type": "filter", "arguments": [ "true" @@ -8198,7 +8219,7 @@ } ] }, - "134": { + "135": { "file": { "description": "Class UserAccess.", "long_description": "", @@ -8255,7 +8276,7 @@ } ] }, - "168": { + "169": { "file": { "description": "Class MobileRedirection.", "long_description": "", @@ -8407,7 +8428,7 @@ } } }, - "170": { + "171": { "file": { "description": "Class AmpWPConfiguration.", "long_description": "", @@ -8478,7 +8499,7 @@ } ] }, - "178": { + "179": { "file": { "description": "Class PairedRouting.", "long_description": "", @@ -8495,8 +8516,8 @@ "hooks": [ { "name": "amp_custom_paired_url_structure", - "line": 238, - "end_line": 238, + "line": 249, + "end_line": 249, "type": "filter", "arguments": [ "null" @@ -8518,7 +8539,7 @@ } ] }, - "179": { + "180": { "file": { "description": "Class PairedUrl.", "long_description": "", @@ -8985,7 +9006,7 @@ ], "hooks": [] }, - "180": { + "181": { "file": { "description": "Class LegacyReaderUrlStructure.", "long_description": "", @@ -9084,7 +9105,7 @@ } ] }, - "184": { + "185": { "file": { "description": "Abstract class PairedUrlStructure.", "long_description": "", @@ -9311,7 +9332,7 @@ ], "hooks": [] }, - "196": { + "197": { "file": { "description": "Provides settings to be used in site scanning.", "long_description": "", @@ -9359,7 +9380,7 @@ } ] }, - "197": { + "198": { "file": { "description": "WP cron process to validate URLs in the background.", "long_description": "", diff --git a/docs/hook/amp_custom_paired_url_structure.md b/docs/hook/amp_custom_paired_url_structure.md index c689ef034aa..1adc861bad8 100644 --- a/docs/hook/amp_custom_paired_url_structure.md +++ b/docs/hook/amp_custom_paired_url_structure.md @@ -12,7 +12,7 @@ Filters to allow a custom paired URL structure to be used. ### Source -:link: [src/PairedRouting.php:238](/src/PairedRouting.php#L238) +:link: [src/PairedRouting.php:249](/src/PairedRouting.php#L249)
Show Code diff --git a/docs/hook/amp_customizer_enqueue_preview_scripts.md b/docs/hook/amp_customizer_enqueue_preview_scripts.md index 4a6d2ab0659..d4a76abfe4c 100644 --- a/docs/hook/amp_customizer_enqueue_preview_scripts.md +++ b/docs/hook/amp_customizer_enqueue_preview_scripts.md @@ -12,7 +12,7 @@ Fires when plugins should enqueue their own scripts for the AMP Customizer previ ### Source -:link: [includes/admin/class-amp-template-customizer.php:723](/includes/admin/class-amp-template-customizer.php#L723) +:link: [includes/admin/class-amp-template-customizer.php:745](/includes/admin/class-amp-template-customizer.php#L745)
Show Code diff --git a/docs/hook/amp_customizer_enqueue_scripts.md b/docs/hook/amp_customizer_enqueue_scripts.md index bcb75bcd796..0c7f6366a52 100644 --- a/docs/hook/amp_customizer_enqueue_scripts.md +++ b/docs/hook/amp_customizer_enqueue_scripts.md @@ -14,7 +14,7 @@ In practice the `customize_controls_enqueue_scripts` hook should be used instead ### Source -:link: [includes/admin/class-amp-template-customizer.php:632](/includes/admin/class-amp-template-customizer.php#L632) +:link: [includes/admin/class-amp-template-customizer.php:654](/includes/admin/class-amp-template-customizer.php#L654)
Show Code diff --git a/docs/hook/amp_customizer_init.md b/docs/hook/amp_customizer_init.md index 9415107de7d..d2b54b1d9cf 100644 --- a/docs/hook/amp_customizer_init.md +++ b/docs/hook/amp_customizer_init.md @@ -14,7 +14,7 @@ In practice the `customize_register` hook should be used instead. ### Source -:link: [includes/admin/class-amp-template-customizer.php:105](/includes/admin/class-amp-template-customizer.php#L105) +:link: [includes/admin/class-amp-template-customizer.php:108](/includes/admin/class-amp-template-customizer.php#L108)
Show Code diff --git a/docs/hook/amp_customizer_post_type.md b/docs/hook/amp_customizer_post_type.md index 9392368c4d8..99fa69105e1 100644 --- a/docs/hook/amp_customizer_post_type.md +++ b/docs/hook/amp_customizer_post_type.md @@ -12,7 +12,7 @@ Filter the post type to retrieve the latest for use in the AMP template customiz ### Source -:link: [includes/admin/functions.php:43](/includes/admin/functions.php#L43) +:link: [includes/admin/functions.php:45](/includes/admin/functions.php#L45)
Show Code diff --git a/docs/hook/amp_customizer_register_settings.md b/docs/hook/amp_customizer_register_settings.md index d1994d086ed..c5085186a19 100644 --- a/docs/hook/amp_customizer_register_settings.md +++ b/docs/hook/amp_customizer_register_settings.md @@ -14,7 +14,7 @@ In practice the `customize_register` hook should be used instead. ### Source -:link: [includes/admin/class-amp-template-customizer.php:316](/includes/admin/class-amp-template-customizer.php#L316) +:link: [includes/admin/class-amp-template-customizer.php:338](/includes/admin/class-amp-template-customizer.php#L338)
Show Code diff --git a/docs/hook/amp_customizer_register_ui.md b/docs/hook/amp_customizer_register_ui.md index eb2fcbbb192..4c5a278f818 100644 --- a/docs/hook/amp_customizer_register_ui.md +++ b/docs/hook/amp_customizer_register_ui.md @@ -14,7 +14,7 @@ In practice the `customize_register` hook should be used instead. ### Source -:link: [includes/admin/class-amp-template-customizer.php:280](/includes/admin/class-amp-template-customizer.php#L280) +:link: [includes/admin/class-amp-template-customizer.php:302](/includes/admin/class-amp-template-customizer.php#L302)
Show Code diff --git a/docs/hook/amp_enable_optimizer.md b/docs/hook/amp_enable_optimizer.md index e0cf6d72eaf..45690de5b1f 100644 --- a/docs/hook/amp_enable_optimizer.md +++ b/docs/hook/amp_enable_optimizer.md @@ -12,7 +12,7 @@ Filter whether the generated HTML output should be run through the AMP Optimizer ### Source -:link: [includes/class-amp-theme-support.php:2001](/includes/class-amp-theme-support.php#L2001) +:link: [includes/class-amp-theme-support.php:2013](/includes/class-amp-theme-support.php#L2013)
Show Code diff --git a/docs/hook/amp_featured_image_minimum_height.md b/docs/hook/amp_featured_image_minimum_height.md index f9a262a5fe5..7370240486e 100644 --- a/docs/hook/amp_featured_image_minimum_height.md +++ b/docs/hook/amp_featured_image_minimum_height.md @@ -12,7 +12,7 @@ Filters the minimum height required for a featured image. ### Source -:link: [includes/admin/class-amp-post-meta-box.php:310](/includes/admin/class-amp-post-meta-box.php#L310) +:link: [includes/admin/class-amp-post-meta-box.php:315](/includes/admin/class-amp-post-meta-box.php#L315)
Show Code diff --git a/docs/hook/amp_featured_image_minimum_width.md b/docs/hook/amp_featured_image_minimum_width.md index e481c07362f..cf112d9bf59 100644 --- a/docs/hook/amp_featured_image_minimum_width.md +++ b/docs/hook/amp_featured_image_minimum_width.md @@ -12,7 +12,7 @@ Filters the minimum width required for a featured image. ### Source -:link: [includes/admin/class-amp-post-meta-box.php:320](/includes/admin/class-amp-post-meta-box.php#L320) +:link: [includes/admin/class-amp-post-meta-box.php:325](/includes/admin/class-amp-post-meta-box.php#L325)
Show Code diff --git a/docs/hook/amp_options_menu_is_enabled.md b/docs/hook/amp_options_menu_is_enabled.md index 1713cdb5af7..5976238c192 100644 --- a/docs/hook/amp_options_menu_is_enabled.md +++ b/docs/hook/amp_options_menu_is_enabled.md @@ -12,7 +12,7 @@ Filter whether to enable the AMP settings. ### Source -:link: [src/Admin/OptionsMenu.php:79](/src/Admin/OptionsMenu.php#L79) +:link: [src/Admin/OptionsMenu.php:81](/src/Admin/OptionsMenu.php#L81)
Show Code diff --git a/docs/hook/amp_post_template_analytics.md b/docs/hook/amp_post_template_analytics.md index 6e4561addd3..3a0b2bc2a0f 100644 --- a/docs/hook/amp_post_template_analytics.md +++ b/docs/hook/amp_post_template_analytics.md @@ -15,7 +15,7 @@ This filter allows you to easily insert any amp-analytics tags without needing m ### Source -:link: [includes/admin/functions.php:159](/includes/admin/functions.php#L159) +:link: [includes/amp-post-template-functions.php:154](/includes/amp-post-template-functions.php#L154)
Show Code diff --git a/docs/hook/amp_supportable_templates.md b/docs/hook/amp_supportable_templates.md index 921a6873bc5..6d0f1d155e3 100644 --- a/docs/hook/amp_supportable_templates.md +++ b/docs/hook/amp_supportable_templates.md @@ -14,7 +14,7 @@ Each array item should have a key that corresponds to a template conditional fun ### Source -:link: [includes/class-amp-theme-support.php:785](/includes/class-amp-theme-support.php#L785) +:link: [includes/class-amp-theme-support.php:794](/includes/class-amp-theme-support.php#L794)
Show Code diff --git a/docs/hook/amp_validation_error_sanitized.md b/docs/hook/amp_validation_error_sanitized.md index fff83b51885..8ec4be489e3 100644 --- a/docs/hook/amp_validation_error_sanitized.md +++ b/docs/hook/amp_validation_error_sanitized.md @@ -16,7 +16,7 @@ Returning true this indicates that the validation error is acceptable and should ### Source -:link: [includes/validation/class-amp-validation-error-taxonomy.php:527](/includes/validation/class-amp-validation-error-taxonomy.php#L527) +:link: [includes/validation/class-amp-validation-error-taxonomy.php:528](/includes/validation/class-amp-validation-error-taxonomy.php#L528)
Show Code