Version Description
Released June 10th, 2020
Bugfixes:
- Fixes a bug where an error would be thrown when using the Classic Editor plugin.
- Fixes a bug where custom fields were no longer analyzed when using the Classic Editor plugin.
Download this release
Release Info
Developer | Yoast |
Plugin | ACF Content Analysis for Yoast SEO |
Version | 2.4.1 |
Comparing to | |
See all releases |
Code changes from version 2.4.0 to 2.4.1
- js/src/collect/collect-v5.js +32 -22
- js/yoast-acf-analysis.js +32 -22
- readme.txt +10 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
- yoast-acf-analysis.php +1 -1
js/src/collect/collect-v5.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
/* global _, acf, jQuery, wp */
|
2 |
-
|
3 |
module.exports = function() {
|
4 |
var outerFieldsName = [
|
5 |
"flexible_content",
|
@@ -9,11 +8,18 @@ module.exports = function() {
|
|
9 |
|
10 |
var innerFields = [];
|
11 |
var outerFields = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
// ACF block fields in the content (not in the sidebar, to prevent duplicates)
|
15 |
-
var parentContainer = jQuery( ".metabox-location-normal, .metabox-location-side, .acf-block-component.acf-block-body" );
|
16 |
-
var fields = _.map( acf.get_fields( false, parentContainer ), function( field ) {
|
17 |
var fieldData = jQuery.extend( true, {}, acf.get_data( jQuery( field ) ) );
|
18 |
fieldData.$el = jQuery( field );
|
19 |
fieldData.post_meta_key = fieldData.name;
|
@@ -29,23 +35,27 @@ module.exports = function() {
|
|
29 |
} );
|
30 |
|
31 |
// Add ACF block previews, they are not returned by acf.get_fields()
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
49 |
|
50 |
if ( outerFields.length === 0 ) {
|
51 |
return fields;
|
1 |
/* global _, acf, jQuery, wp */
|
|
|
2 |
module.exports = function() {
|
3 |
var outerFieldsName = [
|
4 |
"flexible_content",
|
8 |
|
9 |
var innerFields = [];
|
10 |
var outerFields = [];
|
11 |
+
var acfFields = [];
|
12 |
+
|
13 |
+
if ( wp.data.select( "core/block-editor" ) ) {
|
14 |
+
// Return only fields in metabox areas (either below or side) or
|
15 |
+
// ACF block fields in the content (not in the sidebar, to prevent duplicates)
|
16 |
+
var parentContainer = jQuery( ".metabox-location-normal, .metabox-location-side, .acf-block-component.acf-block-body" );
|
17 |
+
acfFields = acf.get_fields( false, parentContainer );
|
18 |
+
} else {
|
19 |
+
acfFields = acf.get_fields();
|
20 |
+
}
|
21 |
|
22 |
+
var fields = _.map( acfFields, function( field ) {
|
|
|
|
|
|
|
23 |
var fieldData = jQuery.extend( true, {}, acf.get_data( jQuery( field ) ) );
|
24 |
fieldData.$el = jQuery( field );
|
25 |
fieldData.post_meta_key = fieldData.name;
|
35 |
} );
|
36 |
|
37 |
// Add ACF block previews, they are not returned by acf.get_fields()
|
38 |
+
// First check if we can use Gutenberg.
|
39 |
+
if ( wp.data.select( "core/block-editor" ) ) {
|
40 |
+
// Gutenberg is available.
|
41 |
+
var blocks = wp.data.select( "core/block-editor" ).getBlocks();
|
42 |
+
var blockFields = _.map(
|
43 |
+
_.filter( blocks, function( block ) {
|
44 |
+
return block.name.startsWith( "acf/" ) && block.attributes.mode === "preview";
|
45 |
+
} ),
|
46 |
+
function( block ) {
|
47 |
+
var fieldData = {
|
48 |
+
$el: jQuery( `[data-block="${block.clientId}"] .acf-block-preview` ),
|
49 |
+
key: block.attributes.id,
|
50 |
+
type: "block_preview",
|
51 |
+
name: block.name,
|
52 |
+
post_meta_key: block.name,
|
53 |
+
};
|
54 |
+
innerFields.push( fieldData );
|
55 |
+
return fieldData;
|
56 |
+
} );
|
57 |
+
fields = _.union( fields, blockFields );
|
58 |
+
}
|
59 |
|
60 |
if ( outerFields.length === 0 ) {
|
61 |
return fields;
|
js/yoast-acf-analysis.js
CHANGED
@@ -215,7 +215,6 @@ module.exports = field_data;
|
|
215 |
|
216 |
},{"./../config/config.js":7}],5:[function(require,module,exports){
|
217 |
/* global _, acf, jQuery, wp */
|
218 |
-
|
219 |
module.exports = function() {
|
220 |
var outerFieldsName = [
|
221 |
"flexible_content",
|
@@ -225,11 +224,18 @@ module.exports = function() {
|
|
225 |
|
226 |
var innerFields = [];
|
227 |
var outerFields = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
|
229 |
-
|
230 |
-
// ACF block fields in the content (not in the sidebar, to prevent duplicates)
|
231 |
-
var parentContainer = jQuery( ".metabox-location-normal, .metabox-location-side, .acf-block-component.acf-block-body" );
|
232 |
-
var fields = _.map( acf.get_fields( false, parentContainer ), function( field ) {
|
233 |
var fieldData = jQuery.extend( true, {}, acf.get_data( jQuery( field ) ) );
|
234 |
fieldData.$el = jQuery( field );
|
235 |
fieldData.post_meta_key = fieldData.name;
|
@@ -245,23 +251,27 @@ module.exports = function() {
|
|
245 |
} );
|
246 |
|
247 |
// Add ACF block previews, they are not returned by acf.get_fields()
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
|
|
|
|
|
|
|
|
265 |
|
266 |
if ( outerFields.length === 0 ) {
|
267 |
return fields;
|
215 |
|
216 |
},{"./../config/config.js":7}],5:[function(require,module,exports){
|
217 |
/* global _, acf, jQuery, wp */
|
|
|
218 |
module.exports = function() {
|
219 |
var outerFieldsName = [
|
220 |
"flexible_content",
|
224 |
|
225 |
var innerFields = [];
|
226 |
var outerFields = [];
|
227 |
+
var acfFields = [];
|
228 |
+
|
229 |
+
if ( wp.data.select( "core/block-editor" ) ) {
|
230 |
+
// Return only fields in metabox areas (either below or side) or
|
231 |
+
// ACF block fields in the content (not in the sidebar, to prevent duplicates)
|
232 |
+
var parentContainer = jQuery( ".metabox-location-normal, .metabox-location-side, .acf-block-component.acf-block-body" );
|
233 |
+
acfFields = acf.get_fields( false, parentContainer );
|
234 |
+
} else {
|
235 |
+
acfFields = acf.get_fields();
|
236 |
+
}
|
237 |
|
238 |
+
var fields = _.map( acfFields, function( field ) {
|
|
|
|
|
|
|
239 |
var fieldData = jQuery.extend( true, {}, acf.get_data( jQuery( field ) ) );
|
240 |
fieldData.$el = jQuery( field );
|
241 |
fieldData.post_meta_key = fieldData.name;
|
251 |
} );
|
252 |
|
253 |
// Add ACF block previews, they are not returned by acf.get_fields()
|
254 |
+
// First check if we can use Gutenberg.
|
255 |
+
if ( wp.data.select( "core/block-editor" ) ) {
|
256 |
+
// Gutenberg is available.
|
257 |
+
var blocks = wp.data.select( "core/block-editor" ).getBlocks();
|
258 |
+
var blockFields = _.map(
|
259 |
+
_.filter( blocks, function( block ) {
|
260 |
+
return block.name.startsWith( "acf/" ) && block.attributes.mode === "preview";
|
261 |
+
} ),
|
262 |
+
function( block ) {
|
263 |
+
var fieldData = {
|
264 |
+
$el: jQuery( `[data-block="${block.clientId}"] .acf-block-preview` ),
|
265 |
+
key: block.attributes.id,
|
266 |
+
type: "block_preview",
|
267 |
+
name: block.name,
|
268 |
+
post_meta_key: block.name,
|
269 |
+
};
|
270 |
+
innerFields.push( fieldData );
|
271 |
+
return fieldData;
|
272 |
+
} );
|
273 |
+
fields = _.union( fields, blockFields );
|
274 |
+
}
|
275 |
|
276 |
if ( outerFields.length === 0 ) {
|
277 |
return fields;
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Requires at least: 5.2
|
|
5 |
Tested up to: 5.4.1
|
6 |
License: GPLv3
|
7 |
License URI: http://www.gnu.org/licenses/gpl.html
|
8 |
-
Stable tag: 2.4.
|
9 |
Requires PHP: 5.6.20
|
10 |
|
11 |
WordPress plugin that adds the content of all ACF fields to the Yoast SEO score analysis.
|
@@ -55,6 +55,15 @@ Previously called Yoast ACF Analysis.
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
= 2.4.0 =
|
59 |
|
60 |
Released June 4th, 2020
|
5 |
Tested up to: 5.4.1
|
6 |
License: GPLv3
|
7 |
License URI: http://www.gnu.org/licenses/gpl.html
|
8 |
+
Stable tag: 2.4.1
|
9 |
Requires PHP: 5.6.20
|
10 |
|
11 |
WordPress plugin that adds the content of all ACF fields to the Yoast SEO score analysis.
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 2.4.1 =
|
59 |
+
|
60 |
+
Released June 10th, 2020
|
61 |
+
|
62 |
+
Bugfixes:
|
63 |
+
|
64 |
+
* Fixes a bug where an error would be thrown when using the Classic Editor plugin.
|
65 |
+
* Fixes a bug where custom fields were no longer analyzed when using the Classic Editor plugin.
|
66 |
+
|
67 |
= 2.4.0 =
|
68 |
|
69 |
Released June 4th, 2020
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit5bd657ceb32e0a52de5080d24ea12040::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInite2ed7c365b1421d3105e6d30613b84b4
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit5bd657ceb32e0a52de5080d24ea12040
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit5bd657ceb32e0a52de5080d24ea12040', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit5bd657ceb32e0a52de5080d24ea12040', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit5bd657ceb32e0a52de5080d24ea12040::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
@@ -126,9 +126,9 @@ class ComposerStaticInite2ed7c365b1421d3105e6d30613b84b4
|
|
126 |
public static function getInitializer(ClassLoader $loader)
|
127 |
{
|
128 |
return \Closure::bind(function () use ($loader) {
|
129 |
-
$loader->prefixLengthsPsr4 =
|
130 |
-
$loader->prefixDirsPsr4 =
|
131 |
-
$loader->classMap =
|
132 |
|
133 |
}, null, ClassLoader::class);
|
134 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit5bd657ceb32e0a52de5080d24ea12040
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
126 |
public static function getInitializer(ClassLoader $loader)
|
127 |
{
|
128 |
return \Closure::bind(function () use ($loader) {
|
129 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit5bd657ceb32e0a52de5080d24ea12040::$prefixLengthsPsr4;
|
130 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit5bd657ceb32e0a52de5080d24ea12040::$prefixDirsPsr4;
|
131 |
+
$loader->classMap = ComposerStaticInit5bd657ceb32e0a52de5080d24ea12040::$classMap;
|
132 |
|
133 |
}, null, ClassLoader::class);
|
134 |
}
|
yoast-acf-analysis.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* Plugin Name: ACF Content Analysis for Yoast SEO
|
9 |
* Plugin URI: https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/
|
10 |
* Description: Ensure that Yoast SEO analyzes all Advanced Custom Fields 4 and 5 content including Flexible Content and Repeaters.
|
11 |
-
* Version: 2.4.
|
12 |
* Author: Thomas Kräftner, ViktorFroberg, marol87, pekz0r, angrycreative, Team Yoast
|
13 |
* Author URI: http://angrycreative.se
|
14 |
* License: GPL v3
|
8 |
* Plugin Name: ACF Content Analysis for Yoast SEO
|
9 |
* Plugin URI: https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/
|
10 |
* Description: Ensure that Yoast SEO analyzes all Advanced Custom Fields 4 and 5 content including Flexible Content and Repeaters.
|
11 |
+
* Version: 2.4.1
|
12 |
* Author: Thomas Kräftner, ViktorFroberg, marol87, pekz0r, angrycreative, Team Yoast
|
13 |
* Author URI: http://angrycreative.se
|
14 |
* License: GPL v3
|