ACF Content Analysis for Yoast SEO - Version 1.2.1

Version Description

  • Bugfix for Yoast SEO Premium
Download this release

Release Info

Developer ViktorFroberg
Plugin Icon 128x128 ACF Content Analysis for Yoast SEO
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2.0 to 1.2.1

readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: ViktorFroberg, marol87, pekz0r, angrycreative
3
  Tags: Angry Creative, Yoast SEO, Yoast, SEO, ACF, Advanced Custom Fields
4
  Requires at least: 4.0
5
  Tested up to: 4.4.2
6
- Stable tag: 1.2.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -36,6 +36,9 @@ add_filter('ysacf_exclude_fields', function(){
36
 
37
  == Changelog ==
38
 
 
 
 
39
  = 1.2.0 =
40
  * Add support for alt and title tags in images.
41
  * Security improvements
3
  Tags: Angry Creative, Yoast SEO, Yoast, SEO, ACF, Advanced Custom Fields
4
  Requires at least: 4.0
5
  Tested up to: 4.4.2
6
+ Stable tag: 1.2.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
36
 
37
  == Changelog ==
38
 
39
+ = 1.2.1 =
40
+ * Bugfix for Yoast SEO Premium
41
+
42
  = 1.2.0 =
43
  * Add support for alt and title tags in images.
44
  * Security improvements
yoast-seo-acf-content-analysis.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: ACF-Content Analysis for Yoast SEO
4
  Plugin URI: http://angrycreative.se
5
  Description: This plugin ensures that Yoast SEO analysize all ACF content including Flexible Content and Repeaters
6
- Version: 1.2.0
7
  Author: ViktorFroberg, marol87, pekz0r, angrycreative
8
  Author URI: http://angrycreative.se
9
  License: GPL
@@ -28,7 +28,7 @@ class AC_Yoast_SEO_ACF_Content_Analysis
28
  * @since 0.1.0
29
  * @var string
30
  */
31
- const VERSION = '1.2.0';
32
  /**
33
  * Unique identifier for the plugin.
34
  * This value is used as the text domain when internationalizing strings of text. It should
@@ -127,7 +127,6 @@ class AC_Yoast_SEO_ACF_Content_Analysis
127
 
128
  $pid = filter_input(INPUT_POST, 'postId', FILTER_SANITIZE_STRING);
129
 
130
-
131
  $fields = get_fields( $pid );
132
 
133
  wp_send_json( $this->get_field_data( $fields ) );
@@ -147,16 +146,13 @@ class AC_Yoast_SEO_ACF_Content_Analysis
147
 
148
  $id = filter_input(INPUT_GET, 'taxonomy', FILTER_SANITIZE_STRING) . '_' . filter_input(INPUT_GET, 'tag_ID', FILTER_SANITIZE_NUMBER_INT);
149
 
150
- //$id = esc_attr( trim( $_GET['taxonomy'] ) ) . '_' . intval( trim( $_GET['tag_ID'] ) );
151
- wp_enqueue_script($this->plugin_slug, AC_SEO_ACF_ANALYSIS_PLUGIN_URL . 'yoast-seo-plugin.js', array('jquery', 'yoast-seo', 'wp-seo-term-scraper'), self::VERSION);
152
  } else {
153
  global $post;
154
  $id = $post->ID;
155
- wp_enqueue_script($this->plugin_slug, AC_SEO_ACF_ANALYSIS_PLUGIN_URL . 'yoast-seo-plugin.js', array('jquery', 'yoast-seo', 'wp-seo-post-scraper'), self::VERSION);
156
  }
157
 
158
-
159
-
160
  wp_localize_script($this->plugin_slug, 'yoast_acf_settings', array(
161
  'ajax_url' => admin_url( 'admin-ajax.php' ),
162
  'id' => $id,
@@ -166,8 +162,6 @@ class AC_Yoast_SEO_ACF_Content_Analysis
166
 
167
  }
168
 
169
-
170
  }
171
 
172
- new AC_Yoast_SEO_ACF_Content_Analysis();
173
-
3
  Plugin Name: ACF-Content Analysis for Yoast SEO
4
  Plugin URI: http://angrycreative.se
5
  Description: This plugin ensures that Yoast SEO analysize all ACF content including Flexible Content and Repeaters
6
+ Version: 1.2.1
7
  Author: ViktorFroberg, marol87, pekz0r, angrycreative
8
  Author URI: http://angrycreative.se
9
  License: GPL
28
  * @since 0.1.0
29
  * @var string
30
  */
31
+ const VERSION = '1.2.1';
32
  /**
33
  * Unique identifier for the plugin.
34
  * This value is used as the text domain when internationalizing strings of text. It should
127
 
128
  $pid = filter_input(INPUT_POST, 'postId', FILTER_SANITIZE_STRING);
129
 
 
130
  $fields = get_fields( $pid );
131
 
132
  wp_send_json( $this->get_field_data( $fields ) );
146
 
147
  $id = filter_input(INPUT_GET, 'taxonomy', FILTER_SANITIZE_STRING) . '_' . filter_input(INPUT_GET, 'tag_ID', FILTER_SANITIZE_NUMBER_INT);
148
 
 
 
149
  } else {
150
  global $post;
151
  $id = $post->ID;
 
152
  }
153
 
154
+ wp_enqueue_script($this->plugin_slug, AC_SEO_ACF_ANALYSIS_PLUGIN_URL . 'yoast-seo-plugin.js', array('jquery'), self::VERSION);
155
+
156
  wp_localize_script($this->plugin_slug, 'yoast_acf_settings', array(
157
  'ajax_url' => admin_url( 'admin-ajax.php' ),
158
  'id' => $id,
162
 
163
  }
164
 
 
165
  }
166
 
167
+ new AC_Yoast_SEO_ACF_Content_Analysis();
 
yoast-seo-plugin.js CHANGED
@@ -1,19 +1,15 @@
1
- jQuery( document ).ready( function($) {
2
-
3
  var fieldData = "";
4
  YoastSEO_ACF_Content_Analysis = function() {
5
 
6
  YoastSEO.app.registerPlugin( 'ACF_Content_Analysis', {status: 'loading'} );
7
-
8
- this.appendACFFields();
9
-
10
-
11
  }
12
-
13
- YoastSEO_ACF_Content_Analysis.prototype.appendACFFields = function( ) {
14
 
15
  var $this = this;
16
- $.ajax({
17
  url: yoast_acf_settings.ajax_url,
18
  type: 'POST',
19
  dataType: 'JSON',
@@ -23,15 +19,12 @@ jQuery( document ).ready( function($) {
23
  }
24
  })
25
  .done(function(acf_fields) {
26
-
27
  $this.setFieldData(acf_fields);
28
-
29
  })
30
  .fail(function(data) {
31
  console.log("error");
32
  console.log(data);
33
  });
34
-
35
  };
36
 
37
  YoastSEO_ACF_Content_Analysis.prototype.setFieldData = function( data ) {
@@ -50,10 +43,8 @@ jQuery( document ).ready( function($) {
50
 
51
  YoastSEO_ACF_Content_Analysis.prototype.registerModification = function( data ) {
52
  YoastSEO.app.registerModification( 'content', this.getFieldData, 'ACF_Content_Analysis', 50 );
53
-
54
  };
55
 
56
-
57
-
58
  new YoastSEO_ACF_Content_Analysis();
 
59
  });
1
+ jQuery(window).on('YoastSEO:ready', function () {
 
2
  var fieldData = "";
3
  YoastSEO_ACF_Content_Analysis = function() {
4
 
5
  YoastSEO.app.registerPlugin( 'ACF_Content_Analysis', {status: 'loading'} );
6
+ this.appendACFFields();
 
 
 
7
  }
8
+
9
+ YoastSEO_ACF_Content_Analysis.prototype.appendACFFields = function() {
10
 
11
  var $this = this;
12
+ jQuery.ajax({
13
  url: yoast_acf_settings.ajax_url,
14
  type: 'POST',
15
  dataType: 'JSON',
19
  }
20
  })
21
  .done(function(acf_fields) {
 
22
  $this.setFieldData(acf_fields);
 
23
  })
24
  .fail(function(data) {
25
  console.log("error");
26
  console.log(data);
27
  });
 
28
  };
29
 
30
  YoastSEO_ACF_Content_Analysis.prototype.setFieldData = function( data ) {
43
 
44
  YoastSEO_ACF_Content_Analysis.prototype.registerModification = function( data ) {
45
  YoastSEO.app.registerModification( 'content', this.getFieldData, 'ACF_Content_Analysis', 50 );
 
46
  };
47
 
 
 
48
  new YoastSEO_ACF_Content_Analysis();
49
+
50
  });