SEO Ultimate - Version 4.5.4

Version Description

Download this release

Release Info

Developer SEO Design Solutions
Plugin Icon 128x128 SEO Ultimate
Version 4.5.4
Comparing to
See all releases

Code changes from version 4.5.3 to 4.5.4

includes/jlfunctions/arr.php CHANGED
@@ -162,6 +162,10 @@ class suarr {
162
  $values = suarr::flatten_values($arr, $valloc);
163
  return array_combine($keys, $values);
164
  }
 
 
 
 
165
  }
166
 
167
  ?>
162
  $values = suarr::flatten_values($arr, $valloc);
163
  return array_combine($keys, $values);
164
  }
165
+
166
+ function has_keys($array, $keys) {
167
+ return count(array_diff($keys, array_keys($array))) == 0;
168
+ }
169
  }
170
 
171
  ?>
includes/jlfunctions/str.php CHANGED
@@ -194,6 +194,10 @@ class sustr {
194
  else
195
  return substr($str, 0, $end);
196
  }
 
 
 
 
197
  }
198
 
199
  ?>
194
  else
195
  return substr($str, 0, $end);
196
  }
197
+
198
+ function str2func($varval) {
199
+ return create_function('', 'return "'.addcslashes((string)$varval, '"').'";');
200
+ }
201
  }
202
 
203
  ?>
includes/jlwp/functions.php CHANGED
@@ -21,8 +21,9 @@ class suwp {
21
  return false;
22
  }
23
 
24
- function get_any_posts($args = null) {
25
- $args['post_type'] = implode(',', suwp::get_post_type_names());
 
26
  $args['numberposts'] = -1;
27
  return get_posts($args);
28
  }
@@ -78,6 +79,11 @@ class suwp {
78
  return $taxonomies;
79
  }
80
 
 
 
 
 
 
81
  /**
82
  * Loads a webpage and returns its HTML as a string.
83
  *
21
  return false;
22
  }
23
 
24
+ function get_any_posts($args = array()) {
25
+ if (!is_array($args)) $args = array();
26
+ $args['post_type'] = suwp::get_post_type_names(); //...as opposed to "any" because then get_posts() will remove search-excluded post types
27
  $args['numberposts'] = -1;
28
  return get_posts($args);
29
  }
79
  return $taxonomies;
80
  }
81
 
82
+ function get_any_terms($args = array()) {
83
+ $taxonomies = get_taxonomies(array('public' => true));
84
+ return get_terms($taxonomies, $args);
85
+ }
86
+
87
  /**
88
  * Loads a webpage and returns its HTML as a string.
89
  *
modules/autolinks/content-autolinks.php CHANGED
@@ -113,7 +113,7 @@ class SU_ContentAutolinks extends SU_Module {
113
  $title = stripslashes($_POST["link_{$i}_title"]);
114
 
115
  $target = stripslashes($_POST["link_{$i}_target"]);
116
- if (!$target) $target = 'self';
117
 
118
  $nofollow = intval($_POST["link_{$i}_nofollow"]) == 1;
119
  $delete = intval($_POST["link_{$i}_delete"]) == 1;
@@ -161,7 +161,7 @@ class SU_ContentAutolinks extends SU_Module {
161
  suarr::remove_value($stati, 'auto-draft');
162
  $stati = implode(',', $stati);
163
 
164
- $typeposts = get_posts("post_status=$stati&numberposts=-1&post_type=".$posttypeobj->name);
165
  if (count($typeposts)) {
166
  $posttypes['posttype_'.$posttypeobj->name] = $posttypeobj->labels->singular_name;
167
  $posts['posttype_'.$posttypeobj->name] = $typeposts_array = array_slice(suarr::simplify($typeposts, 'ID', 'post_title'), 0, 1000, true); //Let's not go too crazy with post dropdowns; cut it off at 1000
113
  $title = stripslashes($_POST["link_{$i}_title"]);
114
 
115
  $target = stripslashes($_POST["link_{$i}_target"]);
116
+ $target = $target ? 'blank' : 'self';
117
 
118
  $nofollow = intval($_POST["link_{$i}_nofollow"]) == 1;
119
  $delete = intval($_POST["link_{$i}_delete"]) == 1;
161
  suarr::remove_value($stati, 'auto-draft');
162
  $stati = implode(',', $stati);
163
 
164
+ $typeposts = get_posts("orderby=title&order=ASC&post_status=$stati&numberposts=-1&post_type=".$posttypeobj->name);
165
  if (count($typeposts)) {
166
  $posttypes['posttype_'.$posttypeobj->name] = $posttypeobj->labels->singular_name;
167
  $posts['posttype_'.$posttypeobj->name] = $typeposts_array = array_slice(suarr::simplify($typeposts, 'ID', 'post_title'), 0, 1000, true); //Let's not go too crazy with post dropdowns; cut it off at 1000
modules/class.su-importmodule.php CHANGED
@@ -15,8 +15,17 @@ class SU_ImportModule extends SU_Module {
15
  function get_menu_parent() { return 'su-import-modules'; }
16
 
17
  function get_op_title() { return $this->get_module_title(); }
 
18
  function get_import_desc() { return ''; }
19
 
 
 
 
 
 
 
 
 
20
  function admin_page() {
21
  $this->admin_page_start('tools');
22
 
@@ -32,6 +41,33 @@ class SU_ImportModule extends SU_Module {
32
  $this->admin_page_end();
33
  }
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  function admin_form_end($button = null, $table = true) {
36
  if ($button === null) $button = __('Import Now', 'seo-ultimate');
37
  parent::admin_form_end($button, $table);
@@ -53,7 +89,7 @@ class SU_ImportModule extends SU_Module {
53
  echo '<p><a href="admin.php?page=su-import-aiosp" class="button-secondary">';
54
  _e('Return to import page', 'seo-ultimate');
55
  } elseif ($this->plugin->module_exists('settings')) {
56
- echo '<p><a href="options-general.php?page=seo-ultimate" class="button-secondary">';
57
  _e('Return to settings page', 'seo-ultimate');
58
  } else {
59
  echo '<p><a href="admin.php?page=seo" class="button-secondary">';
@@ -73,6 +109,91 @@ class SU_ImportModule extends SU_Module {
73
  if ($this->get_setting('delete_import')) delete_option($option);
74
  }
75
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  }
77
 
78
  }
15
  function get_menu_parent() { return 'su-import-modules'; }
16
 
17
  function get_op_title() { return $this->get_module_title(); }
18
+ function get_op_abbr() { return $this->get_module_title(); }
19
  function get_import_desc() { return ''; }
20
 
21
+ function get_default_settings() {
22
+ return array(
23
+ 'import_postmeta' => true
24
+ , 'postmeta_bothexist_action' => 'skip'
25
+ , 'after_post_import' => 'nothing'
26
+ );
27
+ }
28
+
29
  function admin_page() {
30
  $this->admin_page_start('tools');
31
 
41
  $this->admin_page_end();
42
  }
43
 
44
+ function admin_page_postmeta() {
45
+
46
+ $name = $this->get_op_title();
47
+ $abbr = $this->get_op_abbr();
48
+
49
+ $this->textblock('<strong>'.__('Import Post Fields', 'seo-ultimate').'</strong> &mdash; '.
50
+ sprintf(__('Post fields store the SEO data for your posts/pages (i.e. your custom title tags, meta descriptions, and meta keywords). If you provided custom titles/descriptions/keywords to %s, this importer can move that data over to SEO Ultimate.', 'seo-ultimate'), $name)
51
+ );
52
+ $this->admin_form_indent_start();
53
+ $this->admin_form_group_start(__('Conflict Resolution Mode', 'seo-ultimate'));
54
+ $this->textblock(sprintf(__('What should the import tool do if it tries to move over a post&#8217;s %s data, but different data already exists in the corresponding SEO Ultimate fields?', 'seo-ultimate'), $abbr));
55
+ $this->radiobuttons('postmeta_bothexist_action', array(
56
+ 'skip' => __('Skip that post and leave all data as-is (default).', 'seo-ultimate')
57
+ , 'delete_su' => sprintf(__('Delete the SEO Ultimate data and replace it with the %s data.', 'seo-ultimate'), $abbr)
58
+ , 'delete_op' => sprintf(__('Keep the SEO Ultimate data and delete the %s data.', 'seo-ultimate'), $abbr)
59
+ ));
60
+ $this->admin_form_group_end();
61
+ $this->admin_form_group_start(__('Deletion Preference', 'seo-ultimate'));
62
+ $this->textblock(sprintf(__('When the migration tool successfully copies a post&#8217;s %1$s data over to SEO Ultimate, what should it do with the old %1$s data?', 'seo-ultimate'), $abbr));
63
+ $this->radiobuttons('after_post_import', array(
64
+ 'delete_op' => sprintf(__('Delete the %s data.', 'seo-ultimate'), $abbr)
65
+ , 'nothing' => sprintf(__('Leave behind the duplicate %s data (default).', 'seo-ultimate'), $abbr)
66
+ ));
67
+ $this->admin_form_group_end();
68
+ $this->admin_form_indent_end();
69
+ }
70
+
71
  function admin_form_end($button = null, $table = true) {
72
  if ($button === null) $button = __('Import Now', 'seo-ultimate');
73
  parent::admin_form_end($button, $table);
89
  echo '<p><a href="admin.php?page=su-import-aiosp" class="button-secondary">';
90
  _e('Return to import page', 'seo-ultimate');
91
  } elseif ($this->plugin->module_exists('settings')) {
92
+ echo '<p><a href="options-general.php?page=seo-ultimate#su-import" class="button-secondary">';
93
  _e('Return to settings page', 'seo-ultimate');
94
  } else {
95
  echo '<p><a href="admin.php?page=seo" class="button-secondary">';
109
  if ($this->get_setting('delete_import')) delete_option($option);
110
  }
111
  }
112
+
113
+ function do_import_deactivate($path) {
114
+ if (is_plugin_active($path)) {
115
+ deactivate_plugins($path);
116
+ $this->import_status('success', sprintf(__('Deactivated %s.', 'seo-ultimate'), $this->get_op_title()));
117
+ }
118
+ }
119
+
120
+ function do_import_postmeta($postmeta_fields, $disabled_field=false) {
121
+
122
+ $name = $this->get_op_title();
123
+ $abbr = $this->get_op_abbr();
124
+
125
+ global $wpdb;
126
+ $posts = $wpdb->get_results("SELECT `ID` FROM {$wpdb->posts}");
127
+
128
+ $numposts = 0;
129
+ $numfields = 0;
130
+ $numsudels = 0;
131
+ $numopdels = 0;
132
+
133
+ foreach ($posts as $p) {
134
+
135
+ //Skip posts with "disabled" data
136
+ if ($disabled_field && get_post_meta($p->ID, $disabled_field, true) === 'on')
137
+ $numskipped++;
138
+ else {
139
+
140
+ foreach ($postmeta_fields as $op_field => $su_field) {
141
+
142
+ if (strlen($op_value = get_post_meta($p->ID, $op_field, true))) {
143
+
144
+ $delete_op = false;
145
+
146
+ if (strlen(get_post_meta($p->ID, $su_field, true))) {
147
+ //Conflict: SEO Ultimate field already exists
148
+
149
+ switch ($this->get_setting('postmeta_bothexist_action')) {
150
+ case 'skip': continue 2; break;
151
+ case 'delete_su': $numsudels++; break;
152
+ case 'delete_op': $delete_op = true; break;
153
+ }
154
+ }
155
+
156
+ //Import the other plugin's data if we're not supposed to delete it.
157
+ if (!$delete_op)
158
+ update_post_meta($p->ID, $su_field, $op_value);
159
+
160
+ //Delete the other plugin's data if the user has instructed us to do so
161
+ if ($delete_op || $this->get_setting('after_post_import') == 'delete_op') {
162
+ delete_post_meta($p->ID, $op_field, $op_value);
163
+ $numopdels++;
164
+ }
165
+
166
+ $numfields++;
167
+ }
168
+ }
169
+ }
170
+
171
+ $numposts++;
172
+ }
173
+
174
+ $this->import_status('success', sprintf(_n(
175
+ 'Imported a total of %d fields for one post/page/revision.',
176
+ 'Imported a total of %1$d fields for %2$d posts/pages/revisions.',
177
+ $numposts, 'seo-ultimate'), $numfields, $numposts));
178
+
179
+ if ($numskipped > 0)
180
+ $this->import_status('info', sprintf(_n(
181
+ 'Skipped one post with disabled %2$s data.',
182
+ 'Skipped %1$d posts with disabled %2$s data.',
183
+ $numskipped, 'seo-ultimate'), $numskipped, $abbr));
184
+
185
+ if ($numsudels > 0)
186
+ $this->import_status('info', sprintf(_n(
187
+ 'Overwrote one SEO Ultimate field with %2$s data, as instructed by the settings you chose.',
188
+ 'Overwrote %1$d SEO Ultimate fields with %2$s data, as instructed by the settings you chose.',
189
+ $numsudels, 'seo-ultimate'), $numsudels, $abbr));
190
+
191
+ if ($numopdels > 0)
192
+ $this->import_status('info', sprintf(_n(
193
+ 'Deleted one %2$s field, as instructed by the settings you chose.',
194
+ 'Deleted %1$d %2$s fields, as instructed by the settings you chose.',
195
+ $numopdels, 'seo-ultimate'), $numopdels, $abbr));
196
+ }
197
  }
198
 
199
  }
modules/class.su-module.php CHANGED
@@ -2204,14 +2204,14 @@ class SU_Module {
2204
  $html = '';
2205
 
2206
  foreach ($textboxes as $id => $title) {
2207
-
2208
  register_setting('seo-ultimate', $id);
2209
  $value = su_esc_editable_html($this->get_postmeta($id));
2210
  $id = "_su_".su_esc_attr($id);
2211
  //$title = str_replace(' ', '&nbsp;', $title);
2212
 
2213
- $html .= "<tr class='textbox' valign='middle'>\n<th scope='row'><label for='$id'>$title</label></th>\n"
2214
- ."<td><input name='$id' id='$id' type='text' value='$value' class='regular-text' tabindex='2' /></td>\n</tr>\n";
2215
  }
2216
 
2217
  return $html;
@@ -2250,8 +2250,8 @@ class SU_Module {
2250
  $value = su_esc_editable_html($this->get_postmeta($id));
2251
  $id = "_su_".su_esc_attr($id);
2252
 
2253
- $html .= "<tr class='textarea' valign='top'>\n<th scope='row'><label for='$id'>$title</label></th>\n"
2254
- ."<td><textarea name='$id' id='$id' class='regular-text' tabindex='2' cols='60' rows='3'>$value</textarea></td>\n</tr>\n";
2255
  }
2256
 
2257
  return $html;
@@ -2284,7 +2284,7 @@ class SU_Module {
2284
  function get_postmeta_checkboxes($checkboxes, $grouptext) {
2285
 
2286
  $valign = (is_array($checkboxes) && count($checkboxes)) ? 'top' : 'middle';
2287
- $html = "<tr class='checkboxes' valign='$valign'>\n<th scope='row'>$grouptext</th>\n<td><fieldset><legend class='hidden'>$grouptext</legend>\n";
2288
 
2289
  if (is_array($checkboxes)) {
2290
  foreach ($checkboxes as $name => $desc) {
@@ -2338,7 +2338,7 @@ class SU_Module {
2338
  if ($current === '') $current = array_shift(array_keys($options));
2339
  $name = "_su_".su_esc_attr($name);
2340
 
2341
- $html = "<tr class='dropdown' valign='middle'>\n<th scope='row'><label for='$name'>$grouptext</label></th>\n<td><fieldset><legend class='hidden'>$grouptext</legend>\n";
2342
  $html .= "<select name='$name' id='$name' onchange='javascript:su_toggle_select_children(this)'>\n";
2343
  $html .= suhtml::option_tags($options, $current);
2344
  $html .= "</select>\n";
2204
  $html = '';
2205
 
2206
  foreach ($textboxes as $id => $title) {
2207
+
2208
  register_setting('seo-ultimate', $id);
2209
  $value = su_esc_editable_html($this->get_postmeta($id));
2210
  $id = "_su_".su_esc_attr($id);
2211
  //$title = str_replace(' ', '&nbsp;', $title);
2212
 
2213
+ $html .= "<tr class='su textbox' valign='middle'>\n<th scope='row' class='su'><label for='$id'>$title</label></th>\n"
2214
+ ."<td class='su'><input name='$id' id='$id' type='text' value='$value' class='regular-text' tabindex='2' /></td>\n</tr>\n";
2215
  }
2216
 
2217
  return $html;
2250
  $value = su_esc_editable_html($this->get_postmeta($id));
2251
  $id = "_su_".su_esc_attr($id);
2252
 
2253
+ $html .= "<tr class='su textarea' valign='top'>\n<th scope='row' class='su'><label for='$id'>$title</label></th>\n"
2254
+ ."<td class='su'><textarea name='$id' id='$id' class='regular-text' tabindex='2' cols='60' rows='3'>$value</textarea></td>\n</tr>\n";
2255
  }
2256
 
2257
  return $html;
2284
  function get_postmeta_checkboxes($checkboxes, $grouptext) {
2285
 
2286
  $valign = (is_array($checkboxes) && count($checkboxes)) ? 'top' : 'middle';
2287
+ $html = "<tr class='su checkboxes' valign='$valign'>\n<th scope='row' class='su'>$grouptext</th>\n<td class='su'><fieldset><legend class='hidden'>$grouptext</legend>\n";
2288
 
2289
  if (is_array($checkboxes)) {
2290
  foreach ($checkboxes as $name => $desc) {
2338
  if ($current === '') $current = array_shift(array_keys($options));
2339
  $name = "_su_".su_esc_attr($name);
2340
 
2341
+ $html = "<tr class='su dropdown' valign='middle'>\n<th scope='row' class='su'><label for='$name'>$grouptext</label></th>\n<td class='su'><fieldset><legend class='hidden'>$grouptext</legend>\n";
2342
  $html .= "<select name='$name' id='$name' onchange='javascript:su_toggle_select_children(this)'>\n";
2343
  $html .= suhtml::option_tags($options, $current);
2344
  $html .= "</select>\n";
modules/files/files.php CHANGED
@@ -96,6 +96,8 @@ class SU_Files extends SU_Module {
96
  //Should we allow plugins to add custom rules?
97
  if ($this->get_setting('enable_do_robotstxt_action'))
98
  do_action('do_robotstxt');
 
 
99
 
100
  //Print the custom robots.txt file
101
  echo $this->get_setting('robotstxt');
96
  //Should we allow plugins to add custom rules?
97
  if ($this->get_setting('enable_do_robotstxt_action'))
98
  do_action('do_robotstxt');
99
+ else
100
+ do_action('su_do_robotstxt');
101
 
102
  //Print the custom robots.txt file
103
  echo $this->get_setting('robotstxt');
modules/import-aiosp/import-aiosp.css DELETED
@@ -1,16 +0,0 @@
1
- #su-import-aiosp tr.su-admin-form-checkbox td,
2
- #su-import-aiosp tr.su-admin-form-textblock td {
3
- border-top: 3px solid #ccc;
4
- padding-top: 1em;
5
- }
6
-
7
- #su-import-aiosp table.form-table {
8
- border-bottom: 3px solid #ccc;
9
- }
10
-
11
- #su-import-aiosp td table tr.su-admin-form-checkbox td,
12
- #su-import-aiosp td table tr.su-admin-form-textblock td {
13
- border-top: 0 none;
14
- padding-top: 0;
15
- padding-bottom: 0;
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
modules/import-aiosp/import-aiosp.php CHANGED
@@ -13,16 +13,9 @@ class SU_ImportAIOSP extends SU_ImportModule {
13
  function get_menu_title() { return __('AIOSP Import', 'seo-ultimate'); }
14
 
15
  function get_op_title() { return __('All in One SEO Pack', 'seo-ultimate'); }
 
16
  function get_import_desc() { return __('Import post data (custom title tags and meta tags).', 'seo-ultimate'); }
17
 
18
- function get_default_settings() {
19
- return array(
20
- 'import_postmeta' => true
21
- , 'postmeta_bothexist_action' => 'skip'
22
- , 'after_post_import' => 'nothing'
23
- );
24
- }
25
-
26
  function admin_page_contents() {
27
  echo "<p>";
28
  _e('Here you can move post fields from the All in One SEO Pack (AIOSP) plugin to SEO Ultimate. AIOSP&#8217;s data remains in your WordPress database after AIOSP is deactivated or even uninstalled. This means that as long as AIOSP was active on this blog sometime in the past, AIOSP does <em>not</em> need to be currently installed or activated for the import to take place.', 'seo-ultimate');
@@ -31,119 +24,17 @@ class SU_ImportAIOSP extends SU_ImportModule {
31
  echo "</p>\n";
32
 
33
  $this->admin_form_start();
34
-
35
- $this->textblock('<strong>'.__('Import Post Fields', 'seo-ultimate').'</strong> &mdash; '.
36
- __('Post fields store the SEO data for your posts/pages (i.e. your custom title tags, meta descriptions, and meta keywords). If you provided custom titles/descriptions/keywords to All in One SEO Pack, this importer can move that data over to SEO Ultimate.', 'seo-ultimate')
37
- );
38
- $this->admin_form_indent_start();
39
- $this->admin_form_group_start(__('Conflict Resolution Mode', 'seo-ultimate'));
40
- $this->textblock(__('What should the import tool do if it tries to move over a post&#8217;s AIOSP data, but different data already exists in the corresponding SEO Ultimate fields?', 'seo-ultimate'));
41
- $this->radiobuttons('postmeta_bothexist_action', array(
42
- 'skip' => __('Skip that post and leave all data as-is (default).', 'seo-ultimate')
43
- , 'delete_su' => __('Delete the SEO Ultimate data and replace it with the AIOSP data.', 'seo-ultimate')
44
- , 'delete_op' => __('Keep the SEO Ultimate data and delete the AIOSP data.', 'seo-ultimate')
45
- ));
46
- $this->admin_form_group_end();
47
- $this->admin_form_group_start(__('Deletion Preference', 'seo-ultimate'));
48
- $this->textblock(__('When the migration tool successfully copies a post&#8217;s AIOSP data over to SEO Ultimate, what should it do with the old AIOSP data?', 'seo-ultimate'));
49
- $this->radiobuttons('after_post_import', array(
50
- 'delete_op' => __('Delete the AIOSP data.', 'seo-ultimate')
51
- , 'nothing' => __('Leave behind the duplicate AIOSP data (default).', 'seo-ultimate')
52
- ));
53
- $this->admin_form_group_end();
54
- $this->admin_form_indent_end();
55
-
56
  $this->admin_form_end();
57
  }
58
 
59
  function do_import() {
 
60
 
61
- if (is_plugin_active(SU_AIOSP_PATH)) {
62
- deactivate_plugins(SU_AIOSP_PATH);
63
- $this->import_status('success', __('Deactivated All in One SEO Pack.', 'seo-ultimate'));
64
- }
65
-
66
- /*if (!$this->get_setting('import_postmeta') && !$this->get_setting('import_settings')) {
67
- $this->import_status('warning', __('No import options selected.', 'seo-ultimate'));
68
- return;
69
- }*/
70
-
71
- //if ($this->get_setting('import_postmeta')) {
72
- if (true) {
73
- global $wpdb;
74
- $posts = $wpdb->get_results("SELECT `ID` FROM {$wpdb->posts}");
75
-
76
- $postmeta_fields = suarr::aprintf('_aioseop_%s', '_su_%s', array('title', 'description', 'keywords'));
77
-
78
- $numposts = 0;
79
- $numfields = 0;
80
- $numsudels = 0;
81
- $numopdels = 0;
82
-
83
- foreach ($posts as $p) {
84
-
85
- //Skip posts with "disabled" AIOSP data
86
- if (get_post_meta($p->ID, '_aioseop_disable', true) === 'on')
87
- $numskipped++;
88
- else {
89
-
90
- foreach ($postmeta_fields as $aiosp_field => $su_field) {
91
-
92
- if (strlen($aiosp_value = get_post_meta($p->ID, $aiosp_field, true))) {
93
-
94
- $delete_op = false;
95
-
96
- if (strlen(get_post_meta($p->ID, $su_field, true))) {
97
- //Conflict: SEO Ultimate field already exists
98
-
99
- switch ($this->get_setting('postmeta_bothexist_action')) {
100
- case 'skip': continue 2; break;
101
- case 'delete_su': $numsudels++; break;
102
- case 'delete_op': $delete_op = true; break;
103
- }
104
- }
105
-
106
- //Import the AIOSP data if we're not supposed to delete it.
107
- if (!$delete_op)
108
- update_post_meta($p->ID, $su_field, $aiosp_value);
109
-
110
- //Delete the AIOSP data if the user has instructed us to do so
111
- if ($delete_op || $this->get_setting('after_post_import') == 'delete_op') {
112
- delete_post_meta($p->ID, $aiosp_field, $aiosp_value);
113
- $numopdels++;
114
- }
115
-
116
- $numfields++;
117
- }
118
- }
119
- }
120
-
121
- $numposts++;
122
- }
123
-
124
- $this->import_status('success', sprintf(_n(
125
- 'Imported a total of %d fields for one post/page/revision.',
126
- 'Imported a total of %1$d fields for %2$d posts/pages/revisions.',
127
- $numposts, 'seo-ultimate'), $numfields, $numposts));
128
-
129
- if ($numskipped > 0)
130
- $this->import_status('info', sprintf(_n(
131
- 'Skipped one post with disabled AIOSP data.',
132
- 'Skipped %d posts with disabled AIOSP data.',
133
- $numskipped, 'seo-ultimate'), $numskipped));
134
-
135
- if ($numsudels > 0)
136
- $this->import_status('info', sprintf(_n(
137
- 'Overwrote one SEO Ultimate field with AIOSP data, as instructed by the settings you chose.',
138
- 'Overwrote %d SEO Ultimate fields with AIOSP data, as instructed by the settings you chose.',
139
- $numsudels, 'seo-ultimate'), $numsudels));
140
-
141
- if ($numopdels > 0)
142
- $this->import_status('info', sprintf(_n(
143
- 'Deleted one AIOSP field, as instructed by the settings you chose.',
144
- 'Deleted %d AIOSP fields, as instructed by the settings you chose.',
145
- $numopdels, 'seo-ultimate'), $numopdels));
146
- }
147
  }
148
  }
149
 
13
  function get_menu_title() { return __('AIOSP Import', 'seo-ultimate'); }
14
 
15
  function get_op_title() { return __('All in One SEO Pack', 'seo-ultimate'); }
16
+ function get_op_abbr() { return __('AIOSP', 'seo-ultimate'); }
17
  function get_import_desc() { return __('Import post data (custom title tags and meta tags).', 'seo-ultimate'); }
18
 
 
 
 
 
 
 
 
 
19
  function admin_page_contents() {
20
  echo "<p>";
21
  _e('Here you can move post fields from the All in One SEO Pack (AIOSP) plugin to SEO Ultimate. AIOSP&#8217;s data remains in your WordPress database after AIOSP is deactivated or even uninstalled. This means that as long as AIOSP was active on this blog sometime in the past, AIOSP does <em>not</em> need to be currently installed or activated for the import to take place.', 'seo-ultimate');
24
  echo "</p>\n";
25
 
26
  $this->admin_form_start();
27
+ $this->admin_page_postmeta();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  $this->admin_form_end();
29
  }
30
 
31
  function do_import() {
32
+ $this->do_import_deactivate(SU_AIOSP_PATH);
33
 
34
+ $this->do_import_postmeta(
35
+ suarr::aprintf('_aioseop_%s', '_su_%s', array('title', 'description', 'keywords'))
36
+ , '_aioseop_disable'
37
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  }
39
  }
40
 
modules/modules.css CHANGED
@@ -161,4 +161,21 @@ div.su-module .su-meta-edit-table table.widefat td { vertical-align: middle; }
161
 
162
  .su-module table#import-status td {
163
  padding: 0 0.5em 1em 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  }
161
 
162
  .su-module table#import-status td {
163
  padding: 0 0.5em 1em 0;
164
+ }
165
+
166
+ .su-importmodule tr.su-admin-form-checkbox td,
167
+ .su-importmodule tr.su-admin-form-textblock td {
168
+ border-top: 3px solid #ccc;
169
+ padding-top: 1em;
170
+ }
171
+
172
+ .su-importmodule table.form-table {
173
+ border-bottom: 3px solid #ccc;
174
+ }
175
+
176
+ .su-importmodule td table tr.su-admin-form-checkbox td,
177
+ .su-importmodule td table tr.su-admin-form-textblock td {
178
+ border-top: 0 none;
179
+ padding-top: 0;
180
+ padding-bottom: 0;
181
  }
modules/user-code/user-code.php CHANGED
@@ -19,7 +19,7 @@ class SU_UserCode extends SU_Module {
19
 
20
  function init() {
21
  $hooks = array('su_head', 'the_content', 'wp_footer');
22
- foreach ($hooks as $hook) add_filter($hook, array(&$this, "{$hook}_code"), 100);
23
  }
24
 
25
  function get_admin_page_tabs() {
19
 
20
  function init() {
21
  $hooks = array('su_head', 'the_content', 'wp_footer');
22
+ foreach ($hooks as $hook) add_filter($hook, array(&$this, "{$hook}_code"));
23
  }
24
 
25
  function get_admin_page_tabs() {
plugin/class.seo-ultimate.php CHANGED
@@ -6,10 +6,6 @@
6
  */
7
  class SEO_Ultimate {
8
 
9
- //Note: Throughout this class and the rest of the plugin, you may notice the occasional code segment that is apparently unused by any of this plugin's modules.
10
- //The core SEO Ultimate classes form a module development framework; for compatibility reasons, I develop both existing modules and upcoming modules off of the same framework.
11
- //This is why you may see new code in the SEO Ultimate framework some time before I bundle modules that use it.
12
-
13
  /********** VARIABLES **********/
14
 
15
  /**
@@ -580,7 +576,7 @@ class SEO_Ultimate {
580
  function init() {
581
 
582
  //Allow translation of this plugin
583
- load_plugin_textdomain('seo-ultimate', '', plugin_basename($this->plugin_file_path));
584
 
585
  //Load default module settings and run modules' init tasks
586
  foreach ($this->modules as $key => $module) {
@@ -1503,7 +1499,7 @@ class SEO_Ultimate {
1503
 
1504
  $metakey = "_su_$field";
1505
 
1506
- $value = stripslashes($_POST[$metakey]);
1507
  if (!apply_filters("su_custom_update_postmeta-$field", false, $value, $metakey, $post)) {
1508
  if (empty($value))
1509
  //Delete the old value
6
  */
7
  class SEO_Ultimate {
8
 
 
 
 
 
9
  /********** VARIABLES **********/
10
 
11
  /**
576
  function init() {
577
 
578
  //Allow translation of this plugin
579
+ load_plugin_textdomain('seo-ultimate', '', plugin_basename($this->plugin_dir_path));
580
 
581
  //Load default module settings and run modules' init tasks
582
  foreach ($this->modules as $key => $module) {
1499
 
1500
  $metakey = "_su_$field";
1501
 
1502
+ $value = stripslashes_deep($_POST[$metakey]);
1503
  if (!apply_filters("su_custom_update_postmeta-$field", false, $value, $metakey, $post)) {
1504
  if (empty($value))
1505
  //Delete the old value
plugin/global.css CHANGED
@@ -105,23 +105,24 @@ div.su-help h6 {
105
 
106
  /* POSTMETA BOX */
107
 
108
- #su-postmeta-box table th,
109
- #su-postmeta-box table td {
110
  padding: 0.5em 0;
111
  }
112
 
113
- #su-postmeta-box table th {
114
  text-align: right;
115
  font-weight: bold;
116
  padding-right: 0.5em;
 
117
  }
118
 
119
- #su-postmeta-box table tr.textarea th label {
120
  display: block;
121
  margin-top: 5px;
122
  }
123
 
124
- #su-postmeta-box table th em {
125
  font-weight: normal;
126
  }
127
 
@@ -131,10 +132,6 @@ div.su-help h6 {
131
  width: 100%;
132
  }
133
 
134
- #su-postmeta-box table th {
135
- width: 12em;
136
- }
137
-
138
  #su-postmeta-box select optgroup,
139
  div.su-module select optgroup {
140
  margin-top: 1em;
@@ -145,6 +142,15 @@ div.su-module select optgroup option {
145
  margin-left: 1em;
146
  }
147
 
 
 
 
 
 
 
 
 
 
148
  /* PLUGIN NOTICES */
149
 
150
  #wpwrap .su-plugin-notice .update-message, #wpwrap .su-plugin-update-info {
105
 
106
  /* POSTMETA BOX */
107
 
108
+ #su-postmeta-box table th.su,
109
+ #su-postmeta-box table td.su {
110
  padding: 0.5em 0;
111
  }
112
 
113
+ #su-postmeta-box table th.su {
114
  text-align: right;
115
  font-weight: bold;
116
  padding-right: 0.5em;
117
+ width: 12em;
118
  }
119
 
120
+ #su-postmeta-box table tr.textarea th.su label {
121
  display: block;
122
  margin-top: 5px;
123
  }
124
 
125
+ #su-postmeta-box table th.su em {
126
  font-weight: normal;
127
  }
128
 
132
  width: 100%;
133
  }
134
 
 
 
 
 
135
  #su-postmeta-box select optgroup,
136
  div.su-module select optgroup {
137
  margin-top: 1em;
142
  margin-left: 1em;
143
  }
144
 
145
+ #su-postmeta-box table.widefat {
146
+ width: auto;
147
+ }
148
+
149
+ #su-postmeta-box table.widefat td {
150
+ vertical-align: middle;
151
+ }
152
+
153
+
154
  /* PLUGIN NOTICES */
155
 
156
  #wpwrap .su-plugin-notice .update-message, #wpwrap .su-plugin-update-info {
plugin/su-constants.php CHANGED
@@ -10,5 +10,7 @@ define('SU_RESULT_WARNING', 0);
10
  define('SU_RESULT_ERROR', -1);
11
 
12
  define('SU_AIOSP_PATH', 'all-in-one-seo-pack/all_in_one_seo_pack.php');
 
 
13
 
14
  ?>
10
  define('SU_RESULT_ERROR', -1);
11
 
12
  define('SU_AIOSP_PATH', 'all-in-one-seo-pack/all_in_one_seo_pack.php');
13
+ define('SU_PSP_PATH', 'platinum-seo-pack/platinum_seo_pack.php');
14
+ define('SU_YWS_PATH', 'wordpress-seo/wp-seo.php');
15
 
16
  ?>
plugin/su-functions.php CHANGED
@@ -97,6 +97,7 @@ function su_lang_implode($items, $var=false, $ucwords=false) {
97
  * @return string The filtered attribute value.
98
  */
99
  function su_esc_attr($str) {
 
100
  $str = str_replace(array("\t", "\r\n", "\n"), ' ', $str);
101
  $str = attribute_escape($str);
102
  return $str;
97
  * @return string The filtered attribute value.
98
  */
99
  function su_esc_attr($str) {
100
+ if (!is_string($str)) return $str;
101
  $str = str_replace(array("\t", "\r\n", "\n"), ' ', $str);
102
  $str = attribute_escape($str);
103
  return $str;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: SEO Design Solutions
3
  Tags: seo, SEO Ultimate, suite, google, yahoo, bing, search engines, admin, post, page, custom post types, categories, tags, terms, custom taxonomies, title, meta, robots, noindex, nofollow, canonical, 404, robots.txt, htaccess, slugs, url, anchor, more, link, excerpt, permalink, links, autolinks, code, footer, modules, uninstallable, reinstallable, downgradable, import, export, CSV
4
  Requires at least: 2.8
5
  Tested up to: 3.0
6
- Stable tag: 4.5.3
7
 
8
  This all-in-one SEO plugin gives you control over title tags, noindex, meta tags, slugs, canonical, autolinks, 404 errors, rich snippets, and more.
9
 
@@ -215,6 +215,11 @@ Frequently asked questions, settings help, and troubleshooting tips for SEO Ulti
215
 
216
  == Changelog ==
217
 
 
 
 
 
 
218
  = Version 4.5.3 (August 18, 2010) =
219
  * Bugfix: A third fix for Deeplink Juggernaut URL-loss problem
220
 
3
  Tags: seo, SEO Ultimate, suite, google, yahoo, bing, search engines, admin, post, page, custom post types, categories, tags, terms, custom taxonomies, title, meta, robots, noindex, nofollow, canonical, 404, robots.txt, htaccess, slugs, url, anchor, more, link, excerpt, permalink, links, autolinks, code, footer, modules, uninstallable, reinstallable, downgradable, import, export, CSV
4
  Requires at least: 2.8
5
  Tested up to: 3.0
6
+ Stable tag: 4.5.4
7
 
8
  This all-in-one SEO plugin gives you control over title tags, noindex, meta tags, slugs, canonical, autolinks, 404 errors, rich snippets, and more.
9
 
215
 
216
  == Changelog ==
217
 
218
+ = Version 4.5.4 (December 22, 2010) =
219
+ * Bugfix: "New window" checkboxes now stay checked in Deeplink Juggernaut
220
+ * Bugfix: Fixed textdomain path
221
+ * Improvement: Post destination options in Deeplink Juggernaut are now sorted by title, making it easier to find the target post
222
+
223
  = Version 4.5.3 (August 18, 2010) =
224
  * Bugfix: A third fix for Deeplink Juggernaut URL-loss problem
225
 
seo-ultimate.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SEO Ultimate
4
  Plugin URI: http://www.seodesignsolutions.com/wordpress-seo/
5
  Description: This all-in-one SEO plugin gives you control over title tags, noindex/nofollow, meta tags, rich snippets, slugs, canonical tags, autolinks, 404 errors, rich snippets, and more.
6
- Version: 4.5.3
7
  Author: SEO Design Solutions
8
  Author URI: http://www.seodesignsolutions.com/
9
  Text Domain: seo-ultimate
@@ -12,7 +12,7 @@ Text Domain: seo-ultimate
12
  /**
13
  * The main SEO Ultimate plugin file.
14
  * @package SeoUltimate
15
- * @version 4.5.3
16
  * @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
17
  */
18
 
@@ -47,10 +47,10 @@ define('SU_MINIMUM_WP_VER', '2.8');
47
  //Reading plugin info from constants is faster than trying to parse it from the header above.
48
  define('SU_PLUGIN_NAME', 'SEO Ultimate');
49
  define('SU_PLUGIN_URI', 'http://www.seodesignsolutions.com/wordpress-seo/');
50
- define('SU_VERSION', '4.5.3');
51
  define('SU_AUTHOR', 'SEO Design Solutions');
52
  define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
53
- define('SU_USER_AGENT', 'SeoUltimate/4.5.3');
54
 
55
  /********** INCLUDES **********/
56
 
3
  Plugin Name: SEO Ultimate
4
  Plugin URI: http://www.seodesignsolutions.com/wordpress-seo/
5
  Description: This all-in-one SEO plugin gives you control over title tags, noindex/nofollow, meta tags, rich snippets, slugs, canonical tags, autolinks, 404 errors, rich snippets, and more.
6
+ Version: 4.5.4
7
  Author: SEO Design Solutions
8
  Author URI: http://www.seodesignsolutions.com/
9
  Text Domain: seo-ultimate
12
  /**
13
  * The main SEO Ultimate plugin file.
14
  * @package SeoUltimate
15
+ * @version 4.5.4
16
  * @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
17
  */
18
 
47
  //Reading plugin info from constants is faster than trying to parse it from the header above.
48
  define('SU_PLUGIN_NAME', 'SEO Ultimate');
49
  define('SU_PLUGIN_URI', 'http://www.seodesignsolutions.com/wordpress-seo/');
50
+ define('SU_VERSION', '4.5.4');
51
  define('SU_AUTHOR', 'SEO Design Solutions');
52
  define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
53
+ define('SU_USER_AGENT', 'SeoUltimate/4.5.4');
54
 
55
  /********** INCLUDES **********/
56