SEOPress - Version 3.1.1

Version Description

  • FIX Yoast/AIO import tool
  • FIX Updater! (PRO)
Download this release

Release Info

Developer rainbowgeek
Plugin Icon 128x128 SEOPress
Version 3.1.1
Comparing to
See all releases

Code changes from version 3.1 to 3.1.1

assets/js/seopress-yoast-migrate.js CHANGED
@@ -1,4 +1,5 @@
1
  jQuery(document).ready(function(){
 
2
  jQuery('#seopress-yoast-migrate').on('click', function(e) {
3
  e.preventDefault();
4
  self.process_offset( 0, self );
@@ -6,11 +7,11 @@ jQuery(document).ready(function(){
6
  process_offset = function( offset, self ) {
7
  jQuery.ajax({
8
  method : 'POST',
9
- url : seopressAjaxYoastMigrate.seopress_yoast_migration,
10
  data : {
11
  action: 'seopress_yoast_migration',
12
  offset: offset,
13
- _ajax_nonce: seopressAjaxYoastMigrate.seopress_nonce,
14
  },
15
  success : function( data ) {
16
  if( 'done' == data.data.offset ) {
@@ -23,43 +24,39 @@ jQuery(document).ready(function(){
23
  },
24
  });
25
  };
26
- });
27
- jQuery(document).ready(function(){
28
  jQuery('#seopress-yoast-migrate').on('click', function() {
29
  jQuery(this).attr("disabled", "disabled");
30
  jQuery( '#yoast-migration-tool .spinner' ).css( "visibility", "visible" );
31
  jQuery( '#yoast-migration-tool .spinner' ).css( "float", "none" );
32
  jQuery( '#yoast-migration-tool .log' ).html('');
33
  });
34
- });
35
 
36
- jQuery(document).ready(function(){
37
- jQuery('#seopress-aio-migrate').on('click', function(e) {
38
- e.preventDefault();
39
- self.process_offset( 0, self );
40
  });
41
- process_offset = function( offset, self ) {
42
  jQuery.ajax({
43
  method : 'POST',
44
- url : seopressAjaxAIOMigrate.seopress_aio_migration,
45
  data : {
46
  action: 'seopress_aio_migration',
47
- offset: offset,
48
- _ajax_nonce: seopressAjaxAIOMigrate.seopress_nonce,
49
  },
50
  success : function( data ) {
51
- if( 'done' == data.data.offset ) {
52
  jQuery('#seopress-aio-migrate').removeAttr("disabled");
53
  jQuery( '.spinner' ).css( "visibility", "hidden" );
54
  jQuery( '#aio-migration-tool .log' ).html('Migration completed!');
55
  } else {
56
- self.process_offset( parseInt( data.data.offset ), self );
57
  }
58
  },
59
  });
60
  };
61
- });
62
- jQuery(document).ready(function(){
63
  jQuery('#seopress-aio-migrate').on('click', function() {
64
  jQuery(this).attr("disabled", "disabled");
65
  jQuery( '#aio-migration-tool .spinner' ).css( "visibility", "visible" );
1
  jQuery(document).ready(function(){
2
+ //Yoast SEO
3
  jQuery('#seopress-yoast-migrate').on('click', function(e) {
4
  e.preventDefault();
5
  self.process_offset( 0, self );
7
  process_offset = function( offset, self ) {
8
  jQuery.ajax({
9
  method : 'POST',
10
+ url : seopressAjaxMigrate.seopress_yoast_migrate.seopress_yoast_migration,
11
  data : {
12
  action: 'seopress_yoast_migration',
13
  offset: offset,
14
+ _ajax_nonce: seopressAjaxMigrate.seopress_yoast_migrate.seopress_nonce,
15
  },
16
  success : function( data ) {
17
  if( 'done' == data.data.offset ) {
24
  },
25
  });
26
  };
 
 
27
  jQuery('#seopress-yoast-migrate').on('click', function() {
28
  jQuery(this).attr("disabled", "disabled");
29
  jQuery( '#yoast-migration-tool .spinner' ).css( "visibility", "visible" );
30
  jQuery( '#yoast-migration-tool .spinner' ).css( "float", "none" );
31
  jQuery( '#yoast-migration-tool .log' ).html('');
32
  });
 
33
 
34
+ //All In One
35
+ jQuery('#seopress-aio-migrate').on('click', function(e2) {
36
+ e2.preventDefault();
37
+ self.process_offset2( 0, self );
38
  });
39
+ process_offset2 = function( offset2, self ) {
40
  jQuery.ajax({
41
  method : 'POST',
42
+ url : seopressAjaxMigrate.seopress_aio_migrate.seopress_aio_migration,
43
  data : {
44
  action: 'seopress_aio_migration',
45
+ offset2: offset2,
46
+ _ajax_nonce: seopressAjaxMigrate.seopress_aio_migrate.seopress_nonce,
47
  },
48
  success : function( data ) {
49
+ if( 'done' == data.data.offset2 ) {
50
  jQuery('#seopress-aio-migrate').removeAttr("disabled");
51
  jQuery( '.spinner' ).css( "visibility", "hidden" );
52
  jQuery( '#aio-migration-tool .log' ).html('Migration completed!');
53
  } else {
54
+ self.process_offset2( parseInt( data.data.offset2 ), self );
55
  }
56
  },
57
  });
58
  };
59
+
 
60
  jQuery('#seopress-aio-migrate').on('click', function() {
61
  jQuery(this).attr("disabled", "disabled");
62
  jQuery( '#aio-migration-tool .spinner' ).css( "visibility", "visible" );
inc/admin/ajax.php CHANGED
@@ -476,8 +476,8 @@ add_action('wp_ajax_seopress_yoast_migration', 'seopress_yoast_migration');
476
  function seopress_aio_migration() {
477
  check_ajax_referer( 'seopress_aio_migrate_nonce', $_POST['_ajax_nonce'], true );
478
 
479
- if ( isset( $_POST['offset']) && isset( $_POST['offset'] )) {
480
- $offset = absint($_POST['offset']);
481
  }
482
 
483
  $count_posts = wp_count_posts();
@@ -486,13 +486,13 @@ function seopress_aio_migration() {
486
  $increment = 200;
487
  global $post;
488
 
489
- if ($offset > $total_count_posts) {
490
  wp_reset_query();
491
 
492
  $args = array(
493
  //'number' => $increment,
494
  'hide_empty' => false,
495
- //'offset' => $offset,
496
  'fields' => 'ids',
497
  );
498
  $aio_query_terms = get_terms($args);
@@ -539,14 +539,14 @@ function seopress_aio_migration() {
539
  }
540
  }
541
  }
542
- $offset = 'done';
543
  wp_reset_query();
544
  } else {
545
  $args = array(
546
  'posts_per_page' => $increment,
547
  'post_type' => 'any',
548
  'post_status' => 'any',
549
- 'offset' => $offset,
550
  );
551
 
552
  $aio_query = get_posts( $args );
@@ -593,10 +593,10 @@ function seopress_aio_migration() {
593
  }
594
  }
595
  }
596
- $offset += $increment;
597
  }
598
  $data = array();
599
- $data['offset'] = $offset;
600
  wp_send_json_success($data);
601
  die();
602
  }
476
  function seopress_aio_migration() {
477
  check_ajax_referer( 'seopress_aio_migrate_nonce', $_POST['_ajax_nonce'], true );
478
 
479
+ if ( isset( $_POST['offset2']) && isset( $_POST['offset2'] )) {
480
+ $offset2 = absint($_POST['offset2']);
481
  }
482
 
483
  $count_posts = wp_count_posts();
486
  $increment = 200;
487
  global $post;
488
 
489
+ if ($offset2 > $total_count_posts) {
490
  wp_reset_query();
491
 
492
  $args = array(
493
  //'number' => $increment,
494
  'hide_empty' => false,
495
+ //'offset' => $offset2,
496
  'fields' => 'ids',
497
  );
498
  $aio_query_terms = get_terms($args);
539
  }
540
  }
541
  }
542
+ $offset2 = 'done';
543
  wp_reset_query();
544
  } else {
545
  $args = array(
546
  'posts_per_page' => $increment,
547
  'post_type' => 'any',
548
  'post_status' => 'any',
549
+ 'offset' => $offset2,
550
  );
551
 
552
  $aio_query = get_posts( $args );
593
  }
594
  }
595
  }
596
+ $offset2 += $increment;
597
  }
598
  $data = array();
599
+ $data['offset2'] = $offset2;
600
  wp_send_json_success($data);
601
  die();
602
  }
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: seo, search engine optimization, meta title, open graph, content analysis,
6
  Requires at least: 4.4+
7
  Tested up to: 4.9
8
  Requires PHP: 5.4
9
- Stable tag: 3.1
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -160,6 +160,9 @@ Subscribe on <a href="https://www.seopress.org/" target="_blank">seopress.org</a
160
  44. Structured Data Types metaboxe in post, page, custom post type (PRO)
161
 
162
  == Changelog ==
 
 
 
163
  = 3.1 =
164
  * NEW All In One SEO importer
165
  * NEW JSON/LD for Breadcrumbs (PRO)
6
  Requires at least: 4.4+
7
  Tested up to: 4.9
8
  Requires PHP: 5.4
9
+ Stable tag: 3.1.1
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
160
  44. Structured Data Types metaboxe in post, page, custom post type (PRO)
161
 
162
  == Changelog ==
163
+ = 3.1.1 =
164
+ * FIX Yoast/AIO import tool
165
+ * FIX Updater! (PRO)
166
  = 3.1 =
167
  * NEW All In One SEO importer
168
  * NEW JSON/LD for Breadcrumbs (PRO)
seopress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: The best plugin for SEO.
6
- Version: 3.1
7
  Author: Benjamin Denis
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
@@ -53,7 +53,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
53
  ///////////////////////////////////////////////////////////////////////////////////////////////////
54
  //Define
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
- define( 'SEOPRESS_VERSION', '3.1' );
57
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
58
 
59
  ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -150,17 +150,17 @@ function seopress_add_admin_options_scripts($hook) {
150
  if (isset($_GET['page']) && ($_GET['page'] == 'seopress-option' || $_GET['page'] == 'seopress-import-export') ) {
151
  wp_enqueue_script( 'seopress-migrate-ajax', plugins_url( 'assets/js/seopress-yoast-migrate.js', __FILE__ ), array( 'jquery' ), SEOPRESS_VERSION, true );
152
 
153
- $seopress_yoast_migrate = array(
154
- 'seopress_nonce' => wp_create_nonce('seopress_yoast_migrate_nonce'),
155
- 'seopress_yoast_migration' => admin_url( 'admin-ajax.php'),
 
 
 
 
 
 
156
  );
157
- wp_localize_script( 'seopress-migrate-ajax', 'seopressAjaxYoastMigrate', $seopress_yoast_migrate );
158
-
159
- $seopress_aio_migrate = array(
160
- 'seopress_nonce' => wp_create_nonce('seopress_aio_migrate_nonce'),
161
- 'seopress_aio_migration' => admin_url( 'admin-ajax.php'),
162
- );
163
- wp_localize_script( 'seopress-migrate-ajax', 'seopressAjaxAIOMigrate', $seopress_aio_migrate );
164
  }
165
 
166
  //Tabs
3
  Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: The best plugin for SEO.
6
+ Version: 3.1.1
7
  Author: Benjamin Denis
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
53
  ///////////////////////////////////////////////////////////////////////////////////////////////////
54
  //Define
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
+ define( 'SEOPRESS_VERSION', '3.1.1' );
57
  define( 'SEOPRESS_AUTHOR', 'Benjamin Denis' );
58
 
59
  ///////////////////////////////////////////////////////////////////////////////////////////////////
150
  if (isset($_GET['page']) && ($_GET['page'] == 'seopress-option' || $_GET['page'] == 'seopress-import-export') ) {
151
  wp_enqueue_script( 'seopress-migrate-ajax', plugins_url( 'assets/js/seopress-yoast-migrate.js', __FILE__ ), array( 'jquery' ), SEOPRESS_VERSION, true );
152
 
153
+ $seopress_migrate = array(
154
+ 'seopress_aio_migrate' => array(
155
+ 'seopress_nonce' => wp_create_nonce('seopress_aio_migrate_nonce'),
156
+ 'seopress_aio_migration' => admin_url( 'admin-ajax.php'),
157
+ ),
158
+ 'seopress_yoast_migrate' => array(
159
+ 'seopress_nonce' => wp_create_nonce('seopress_yoast_migrate_nonce'),
160
+ 'seopress_yoast_migration' => admin_url( 'admin-ajax.php'),
161
+ ),
162
  );
163
+ wp_localize_script( 'seopress-migrate-ajax', 'seopressAjaxMigrate', $seopress_migrate );
 
 
 
 
 
 
164
  }
165
 
166
  //Tabs