Import Settings into WordPress SEO by Yoast - Version 1.1.5

Version Description

  • Removed Yoast section from Taxonomy imports
Download this release

Release Info

Developer WPAllImport
Plugin Icon 128x128 Import Settings into WordPress SEO by Yoast
Version 1.1.5
Comparing to
See all releases

Code changes from version 1.1.4 to 1.1.5

Files changed (3) hide show
  1. rapid-addon.php +26 -5
  2. readme.txt +5 -2
  3. yoast-addon.php +7 -1
rapid-addon.php CHANGED
@@ -42,7 +42,8 @@ if (!class_exists('RapidAddon')) {
42
  'auto_rename_images' => 0,
43
  'auto_rename_images_suffix' => '',
44
  'auto_set_extension' => 0,
45
- 'new_extension' => ''
 
46
  );
47
 
48
  function __construct($name, $slug) {
@@ -105,10 +106,10 @@ if (!class_exists('RapidAddon')) {
105
  }
106
 
107
  if ($this->when_to_run == "always") {
108
- return true;
109
  }
110
 
111
- return $addon_active;
112
  }
113
 
114
  /**
@@ -493,7 +494,7 @@ if (!class_exists('RapidAddon')) {
493
  <?php
494
 
495
  } else if($field_params['type'] == 'plain_text'){
496
- if ($field_params['is_html']):
497
  echo $field_params['name'];
498
  else:
499
  ?>
@@ -665,7 +666,7 @@ if (!class_exists('RapidAddon')) {
665
 
666
  if (empty($text)) return;
667
 
668
- return $this->add_field(sanitize_key($text) . time(), $text, 'plain_text', null, "", $is_html);
669
 
670
  }
671
 
@@ -933,6 +934,26 @@ if (!class_exists('RapidAddon')) {
933
 
934
  }
935
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
936
  function can_update_image($import_options) {
937
 
938
  $import_options = $import_options['options'];
42
  'auto_rename_images' => 0,
43
  'auto_rename_images_suffix' => '',
44
  'auto_set_extension' => 0,
45
+ 'new_extension' => '',
46
+ 'do_not_remove_images' => 1,
47
  );
48
 
49
  function __construct($name, $slug) {
106
  }
107
 
108
  if ($this->when_to_run == "always") {
109
+ $addon_active = true;
110
  }
111
 
112
+ return apply_filters('rapid_is_active_add_on', $addon_active, $post_type, $this->slug);
113
  }
114
 
115
  /**
494
  <?php
495
 
496
  } else if($field_params['type'] == 'plain_text'){
497
+ if ($field_params['is_html']):
498
  echo $field_params['name'];
499
  else:
500
  ?>
666
 
667
  if (empty($text)) return;
668
 
669
+ return $this->add_field(sanitize_key($text) . time() . uniqid() . count($this->fields), $text, 'plain_text', null, "", $is_html);
670
 
671
  }
672
 
934
 
935
  }
936
 
937
+ function can_update_taxonomy($tax_name, $import_options) {
938
+
939
+ //echo "<pre>";
940
+ //print_r($import_options['options']);
941
+ //echo "</pre>";
942
+
943
+ $import_options = $import_options['options'];
944
+
945
+ if ($import_options['update_all_data'] == 'yes') return true;
946
+
947
+ if ( ! $import_options['is_update_categories'] ) return false;
948
+
949
+ if ($import_options['update_categories_logic'] == "full_update") return true;
950
+ if ($import_options['update_categories_logic'] == "only" and ! empty($import_options['taxonomies_list']) and is_array($import_options['taxonomies_list']) and in_array($tax_name, $import_options['taxonomies_list']) ) return true;
951
+ if ($import_options['update_categories_logic'] == "all_except" and ( empty($import_options['taxonomies_list']) or ! in_array($tax_name, $import_options['taxonomies_list']) )) return true;
952
+
953
+ return false;
954
+
955
+ }
956
+
957
  function can_update_image($import_options) {
958
 
959
  $import_options = $import_options['options'];
readme.txt CHANGED
@@ -4,8 +4,8 @@ Tags: seo, import seo, search engine optimization, import search engine optimiza
4
  License: GPLv2 or later
5
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
6
  Requires at least: 4.1.0
7
- Tested up to: 4.5.3
8
- Stable tag: 1.1.4
9
 
10
  Easily import SEO settings from any XML or CSV file to Yoast WordPress SEO with the Yoast WordPress SEO Add-On for WP All Import.
11
 
@@ -66,6 +66,9 @@ The Yoast WordPress SEO Add-On will appear in the Step 3 of WP All Import.
66
 
67
  == Changelog ==
68
 
 
 
 
69
  = 1.1.4 =
70
  * Fixed field update permissions for primary category
71
 
4
  License: GPLv2 or later
5
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
6
  Requires at least: 4.1.0
7
+ Tested up to: 4.9
8
+ Stable tag: 1.1.5
9
 
10
  Easily import SEO settings from any XML or CSV file to Yoast WordPress SEO with the Yoast WordPress SEO Add-On for WP All Import.
11
 
66
 
67
  == Changelog ==
68
 
69
+ = 1.1.5 =
70
+ * Removed Yoast section from Taxonomy imports
71
+
72
  = 1.1.4 =
73
  * Fixed field update permissions for primary category
74
 
yoast-addon.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: WP All Import - Yoast WordPress SEO Add-On
5
  Plugin URI: http://www.wpallimport.com/
6
  Description: Import data into Yoast WordPress SEO with WP All Import.
7
- Version: 1.1.4
8
  Author: Soflyy
9
  */
10
 
@@ -280,4 +280,10 @@ function yoast_addon_primary_category( $post_id ) {
280
  delete_post_meta( $post_id, '_yoast_wpseo_primary_category_can_update' );
281
  delete_post_meta( $post_id, '_yoast_wpseo_primary_product_cat_can_update' );
282
  delete_post_meta( $post_id, '_yoast_wpseo_addon_category_slug' );
 
 
 
 
 
 
283
  }
4
  Plugin Name: WP All Import - Yoast WordPress SEO Add-On
5
  Plugin URI: http://www.wpallimport.com/
6
  Description: Import data into Yoast WordPress SEO with WP All Import.
7
+ Version: 1.1.5
8
  Author: Soflyy
9
  */
10
 
280
  delete_post_meta( $post_id, '_yoast_wpseo_primary_category_can_update' );
281
  delete_post_meta( $post_id, '_yoast_wpseo_primary_product_cat_can_update' );
282
  delete_post_meta( $post_id, '_yoast_wpseo_addon_category_slug' );
283
+ }
284
+
285
+ add_filter( 'rapid_is_active_add_on', 'yoast_addon_is_active_add_on', 10, 3 );
286
+ function yoast_addon_is_active_add_on( $is_active, $post_type, $called_by ){
287
+ if ( $called_by == 'yoast_addon' && $post_type == 'taxonomies' ) $is_active = false;
288
+ return $is_active;
289
  }