PluginProbe
Parse.ly / 3.8.4
Parse.ly v3.8.4
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
← All changes | src/Endpoints/class-graphql-metadata.php +4 -9 3.23.63.8.4 View file →
@@ -76,9 +76,9 @@
76 76 'description' => __(
77 77 'HTML string containing the metadata in JSON-LD. Intended to be rendered in the front-end as is.',
78 78 'wp-parsely'
79 79 ),
80 - 'resolve' => function () {
80 + 'resolve' => function() {
81 81 return self::get_rendered_meta( 'repeated_metas' );
82 82 },
83 83 ),
84 84 'jsonLd' => array(
@@ -92,9 +92,9 @@
92 92 'description' => __(
93 93 'HTML string containing the metadata in JSON-LD. Intended to be rendered in the front-end as is.',
94 94 'wp-parsely'
95 95 ),
96 - 'resolve' => function ( array $parsely_meta, array $args ) {
96 + 'resolve' => function( array $parsely_meta, array $args ) {
97 97 $json_ld = self::get_rendered_meta( 'json_ld' );
98 98
99 99 if ( isset( $args['removeWrappingTag'] ) && true === $args['removeWrappingTag'] ) {
100 100 // phpcs:ignore WordPressVIPMinimum.Functions.StripTags.StripTagsOneParameter
@@ -124,15 +124,10 @@
124 124 */
125 125 private function register_fields(): void {
126 126 $resolve = function ( \WPGraphQL\Model\Post $graphql_post ) {
127 127 $post_id = $graphql_post->ID;
128 + $post = WP_Post::get_instance( $post_id );
128 129
129 - if ( ! is_int( $post_id ) ) {
130 - return null;
131 - }
132 -
133 - $post = WP_Post::get_instance( $post_id );
134 -
135 130 if ( false === $post ) {
136 131 return null;
137 132 }
138 133
@@ -148,9 +143,9 @@
148 143
149 144 $config = array(
150 145 'type' => self::GRAPHQL_CONTAINER_TYPE,
151 146 'description' => __(
152 - 'Parse.ly metadata fields, to be rendered in the front-end so they can be parsed by the crawler. See https://docs.parse.ly/crawler/',
147 + 'Parse.ly metadata fields, to be rendered in the front-end so they can be parsed by the crawler. See https://www.parse.ly/help/integration/crawler.',
153 148 'wp-parsely'
154 149 ),
155 150 'resolve' => $resolve,
156 151 );