Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

wpseo_schema_webpage filter

$
0
0

Replies: 0

Hello

I got an error for a custom schema
I create a schema type for the homepage with @type => WebPage

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Yoast\WP\SEO\Integrations\Front_End\Schema_Accessibility_Feature::maybe_add_accessibility_feature(), 2 passed in /..../wp-includes/class-wp-hook.php on line 292 and exactly 4 expected in /..../wp-content/plugins/wordpress-seo/src/integrations/front-end/schema-accessibility-feature.php:47

On line 291 of schema-generator.php file
$graph_piece = \apply_filters( 'wpseo_schema_' . $type, $graph_piece, $context );
Two arguments passed to filter wpseo_schema_webpage
and
In Schema_Accessibility_Feature class
add_filter( 'wpseo_schema_webpage', [ $this, 'maybe_add_accessibility_feature' ], 10, 4 );
Four arguments passed to method


Viewing all articles
Browse latest Browse all 59525

Trending Articles