View amp-cover-block-fix.php
<?php | |
/** | |
* AMP Cover Block Fix plugin bootstrap. | |
* | |
* @package Google\AMP_Cover_Block_Fix | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2021 Google Inc. | |
* | |
* @wordpress-plugin |
View amp-domain-checker.php
<?php | |
/** | |
* Check domains for the status of AMP on the homepage. | |
* | |
* The input file needs to have one domain per line. | |
* | |
* USAGE: | |
* | |
* wp eval-file amp-domain-checker.php domains.txt | |
* cat domains.txt | wp eval-file amp-domain-checker.php - |
View amp-responsive-image-preload-link-srcset-opt-in.php
<?php | |
/** | |
* AMP Responsive Hero Image Preload Link Opt-In plugin bootstrap. | |
* | |
* @package Google\AMP_Responsive_Hero_Image_Link_Opt_In | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2021 Google Inc. | |
* | |
* @wordpress-plugin |
View amp-mobile-server-side-redirection.php
<?php | |
/** | |
* AMP Mobile Server-Side Redirection plugin bootstrap. | |
* | |
* @package Google\AMP_Mobile_Server_Side_Redirection | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2021 Google Inc. | |
* | |
* @wordpress-plugin |
View jetpack-amp-contact-form-submission-fix.php
<?php | |
/** | |
* Jetpack AMP Contact Form Submission Fix plugin bootstrap. | |
* | |
* @package Google\Jetpack_AMP_Contact_Form_Submission_Fix | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2021 Google Inc. | |
* | |
* @wordpress-plugin |
View Sanitizer.php
<?php | |
/** | |
* Sanitizer file. | |
* | |
* @package Google\AMP_Auto_Lightbox_Disable | |
*/ | |
namespace Google\AMP_Auto_Lightbox_Disable; | |
use AMP_Base_Sanitizer; |
View amp-update-supported-post-types-cli-command.php
<?php | |
/** | |
* AMP Update Supported Post Types WP-CLI Command | |
* | |
* @package Google\AMP_Update_Supported_Post_Types_CLI_Command | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2021 Google Inc. | |
* | |
* @wordpress-plugin |
View amp-collect-spec-names.php
<?php | |
$spec_names = []; | |
foreach ( AMP_Allowed_Tags_Generated::get_allowed_tags() as $tag => $tag_rules ) { | |
foreach ( $tag_rules as $tag_rule ) { | |
if ( isset( $tag_rule['tag_spec']['spec_name'] ) ) { | |
$spec_name = strtolower( $tag_rule['tag_spec']['spec_name'] ); | |
} elseif ( isset( $tag_rule['tag_spec']['extension_spec']['name'] ) ) { | |
$spec_name = sprintf( | |
'script[%s=%s]', |
View amp-suppress-eager-loading-images.php
<?php | |
/** | |
* AMP Suppress Eager Loading Images plugin bootstrap. | |
* | |
* @package Google\AMP_Suppress_Eager_Loading_Images | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2020 Google Inc. | |
* | |
* @wordpress-plugin |
View class-amp-base-sanitizer.php.diff
diff --git a/includes/sanitizers/class-amp-base-sanitizer.php b/includes/sanitizers/class-amp-base-sanitizer.php | |
index 32badf460..312fc2431 100644 | |
--- a/includes/sanitizers/class-amp-base-sanitizer.php | |
+++ b/includes/sanitizers/class-amp-base-sanitizer.php | |
@@ -542,10 +542,12 @@ abstract class AMP_Base_Sanitizer { | |
* @return bool Whether to sanitize. | |
*/ | |
public function should_sanitize_validation_error( $validation_error, $data = [] ) { | |
+ $validation_error = $this->prepare_validation_error( $validation_error, $data ); | |
+ file_put_contents( AMP__DIR__ . '/error-key-dump.txt', json_encode( $validation_error ) . PHP_EOL, FILE_APPEND ); |
NewerOlder