diff --git a/includes/sanitizers/class-amp-base-sanitizer.php b/includes/sanitizers/class-amp-base-sanitizer.php index 88701b55744..605ed540c93 100644 --- a/includes/sanitizers/class-amp-base-sanitizer.php +++ b/includes/sanitizers/class-amp-base-sanitizer.php @@ -320,7 +320,7 @@ public function remove_child( $child ) { if ( method_exists( $child->parentNode, 'removeChild' ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar. $child->parentNode->removeChild( $child ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar. if ( isset( $this->args['mutation_callback'] ) ) { - call_user_func( $this->args['mutation_callback'], $child, 'removed' ); + call_user_func( $this->args['mutation_callback'], $child, AMP_Validation_Utils::NODE_REMOVED ); } } } @@ -341,7 +341,7 @@ public function remove_attribute( $node, $attribute ) { if ( method_exists( $node, 'removeAttribute' ) ) { $node->removeAttribute( $attribute ); if ( isset( $this->args['mutation_callback'] ) ) { - call_user_func( $this->args['mutation_callback'], $node, 'removed_attr', $attribute ); + call_user_func( $this->args['mutation_callback'], $node, AMP_Validation_Utils::ATTRIBUTE_REMOVED, $attribute ); } } } diff --git a/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php b/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php index c55a8b1c9fb..80c36aaac1e 100644 --- a/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php +++ b/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php @@ -705,7 +705,7 @@ private function sanitize_disallowed_attributes_in_node( $node, $attr_spec_list foreach ( $attrs_to_remove as $attr ) { $node->removeAttributeNode( $attr ); if ( isset( $this->args['mutation_callback'], $attr->name ) ) { - call_user_func( $this->args['mutation_callback'], $node, 'removed_attr', $attr->name ); + call_user_func( $this->args['mutation_callback'], $node, AMP_Validation_Utils::ATTRIBUTE_REMOVED, $attr->name ); } } }