Version Description
Download this release
Release Info
Developer | JohnLamansky |
Plugin | SEO Ultimate |
Version | 5.3 |
Comparing to | |
See all releases |
Code changes from version 5.2 to 5.3
- includes/jlfunctions/arr.php +19 -0
- includes/jlfunctions/str.php +7 -0
- modules/meta/meta-keywords.php +33 -2
- readme.txt +11 -6
- seo-ultimate.php +4 -4
includes/jlfunctions/arr.php
CHANGED
@@ -166,6 +166,25 @@ class suarr {
|
|
166 |
function has_keys($array, $keys) {
|
167 |
return count(array_diff($keys, array_keys($array))) == 0;
|
168 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
}
|
170 |
|
171 |
?>
|
166 |
function has_keys($array, $keys) {
|
167 |
return count(array_diff($keys, array_keys($array))) == 0;
|
168 |
}
|
169 |
+
|
170 |
+
//Function based on http://php.net/manual/en/function.array-unique.php#82508
|
171 |
+
function in_array_i($str, $a) {
|
172 |
+
foreach($a as $v){
|
173 |
+
if (strcasecmp($str, $v)==0)
|
174 |
+
return true;
|
175 |
+
}
|
176 |
+
return false;
|
177 |
+
}
|
178 |
+
|
179 |
+
//Function based on http://php.net/manual/en/function.array-unique.php#82508
|
180 |
+
function array_unique_i($a) {
|
181 |
+
$n = array();
|
182 |
+
foreach($a as $k=>$v) {
|
183 |
+
if (!suarr::in_array_i($v, $n))
|
184 |
+
$n[$k] = $v;
|
185 |
+
}
|
186 |
+
return $n;
|
187 |
+
}
|
188 |
}
|
189 |
|
190 |
?>
|
includes/jlfunctions/str.php
CHANGED
@@ -28,6 +28,13 @@ class sustr {
|
|
28 |
return ( substr( $str, strlen( $str ) - strlen( $sub ) ) === $sub );
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
function endwith( $str, $end ) {
|
32 |
if (!sustr::endswith($str, $end))
|
33 |
return $str.$end;
|
28 |
return ( substr( $str, strlen( $str ) - strlen( $sub ) ) === $sub );
|
29 |
}
|
30 |
|
31 |
+
function startwith( $str, $start ) {
|
32 |
+
if (!sustr::startswith($str, $start))
|
33 |
+
return $start.$str;
|
34 |
+
else
|
35 |
+
return $str;
|
36 |
+
}
|
37 |
+
|
38 |
function endwith( $str, $end ) {
|
39 |
if (!sustr::endswith($str, $end))
|
40 |
return $str.$end;
|
modules/meta/meta-keywords.php
CHANGED
@@ -18,6 +18,14 @@ class SU_MetaKeywords extends SU_Module {
|
|
18 |
add_filter('su_postmeta_help', array(&$this, 'postmeta_help'), 20);
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
function get_admin_page_tabs() {
|
22 |
return array_merge(
|
23 |
array(
|
@@ -42,6 +50,10 @@ class SU_MetaKeywords extends SU_Module {
|
|
42 |
$posttypelabel = $posttype->labels->name;
|
43 |
|
44 |
$checkboxes = array();
|
|
|
|
|
|
|
|
|
45 |
$taxnames = get_object_taxonomies($posttypename);
|
46 |
|
47 |
foreach ($taxnames as $taxname) {
|
@@ -65,6 +77,7 @@ class SU_MetaKeywords extends SU_Module {
|
|
65 |
}
|
66 |
|
67 |
function head_tag_output() {
|
|
|
68 |
|
69 |
$kw = false;
|
70 |
|
@@ -82,13 +95,27 @@ class SU_MetaKeywords extends SU_Module {
|
|
82 |
if ($posttypename = get_post_type()) {
|
83 |
$taxnames = get_object_taxonomies($posttypename);
|
84 |
|
85 |
-
foreach ($taxnames as $taxname)
|
86 |
if ($this->get_setting("auto_keywords_posttype_{$posttypename}_tax_{$taxname}", false)) {
|
87 |
$terms = get_the_terms(0, $taxname);
|
88 |
$terms = suarr::flatten_values($terms, 'name');
|
89 |
$terms = implode(',', $terms);
|
90 |
$kw .= ',' . $terms;
|
91 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
|
94 |
//If we're viewing a term, look for its meta data.
|
@@ -107,7 +134,7 @@ class SU_MetaKeywords extends SU_Module {
|
|
107 |
$kw = explode(',', $kw);
|
108 |
$kw = array_map('trim', $kw); //Remove extra spaces from beginning/end of keywords
|
109 |
$kw = array_filter($kw); //Remove blank keywords
|
110 |
-
$kw =
|
111 |
$kw = implode(',', $kw);
|
112 |
|
113 |
//Do we have keywords? If so, output them.
|
@@ -117,6 +144,10 @@ class SU_MetaKeywords extends SU_Module {
|
|
117 |
}
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
120 |
function postmeta_fields($fields) {
|
121 |
$fields['25|keywords'] = $this->get_postmeta_textbox('keywords', __('Meta Keywords:<br /><em>(separate with commas)</em>', 'seo-ultimate'));
|
122 |
return $fields;
|
18 |
add_filter('su_postmeta_help', array(&$this, 'postmeta_help'), 20);
|
19 |
}
|
20 |
|
21 |
+
function get_default_settings() {
|
22 |
+
return array(
|
23 |
+
'auto_keywords_posttype_post_words_value' => 3
|
24 |
+
, 'auto_keywords_posttype_page_words_value' => 3
|
25 |
+
, 'auto_keywords_posttype_attachment_words_value' => 3
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
function get_admin_page_tabs() {
|
30 |
return array_merge(
|
31 |
array(
|
50 |
$posttypelabel = $posttype->labels->name;
|
51 |
|
52 |
$checkboxes = array();
|
53 |
+
|
54 |
+
if (post_type_supports($posttypename, 'editor'))
|
55 |
+
$checkboxes["auto_keywords_posttype_{$posttypename}_words"] = __('The %d most commonly-used words', 'seo-ultimate');
|
56 |
+
|
57 |
$taxnames = get_object_taxonomies($posttypename);
|
58 |
|
59 |
foreach ($taxnames as $taxname) {
|
77 |
}
|
78 |
|
79 |
function head_tag_output() {
|
80 |
+
global $post;
|
81 |
|
82 |
$kw = false;
|
83 |
|
95 |
if ($posttypename = get_post_type()) {
|
96 |
$taxnames = get_object_taxonomies($posttypename);
|
97 |
|
98 |
+
foreach ($taxnames as $taxname) {
|
99 |
if ($this->get_setting("auto_keywords_posttype_{$posttypename}_tax_{$taxname}", false)) {
|
100 |
$terms = get_the_terms(0, $taxname);
|
101 |
$terms = suarr::flatten_values($terms, 'name');
|
102 |
$terms = implode(',', $terms);
|
103 |
$kw .= ',' . $terms;
|
104 |
}
|
105 |
+
}
|
106 |
+
|
107 |
+
if ($this->get_setting("auto_keywords_posttype_{$posttypename}_words", false)) {
|
108 |
+
$words = preg_split("/[\W+]/", strip_tags($post->post_content), null, PREG_SPLIT_NO_EMPTY);
|
109 |
+
$words = array_count_values($words);
|
110 |
+
arsort($words);
|
111 |
+
$words = array_filter($words, array(&$this, 'filter_word_counts'));
|
112 |
+
$words = array_keys($words);
|
113 |
+
$stopwords = suarr::explode_lines($this->get_setting('words_to_remove', array(), 'slugs'));
|
114 |
+
$words = array_diff($words, $stopwords);
|
115 |
+
$words = array_slice($words, 0, $this->get_setting("auto_keywords_posttype_{$posttypename}_words_value"));
|
116 |
+
$words = implode(',', $words);
|
117 |
+
$kw .= ',' . $words;
|
118 |
+
}
|
119 |
}
|
120 |
|
121 |
//If we're viewing a term, look for its meta data.
|
134 |
$kw = explode(',', $kw);
|
135 |
$kw = array_map('trim', $kw); //Remove extra spaces from beginning/end of keywords
|
136 |
$kw = array_filter($kw); //Remove blank keywords
|
137 |
+
$kw = suarr::array_unique_i($kw); //Remove duplicate keywords
|
138 |
$kw = implode(',', $kw);
|
139 |
|
140 |
//Do we have keywords? If so, output them.
|
144 |
}
|
145 |
}
|
146 |
|
147 |
+
function filter_word_counts($count) {
|
148 |
+
return $count > 1;
|
149 |
+
}
|
150 |
+
|
151 |
function postmeta_fields($fields) {
|
152 |
$fields['25|keywords'] = $this->get_postmeta_textbox('keywords', __('Meta Keywords:<br /><em>(separate with commas)</em>', 'seo-ultimate'));
|
153 |
return $fields;
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: SEO Design Solutions, JohnLamansky
|
|
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, affiliate
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.1
|
6 |
-
Stable tag: 5.
|
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 |
|
@@ -11,11 +11,11 @@ This all-in-one SEO plugin gives you control over title tags, noindex, meta tags
|
|
11 |
|
12 |
= Recent Releases =
|
13 |
|
|
|
14 |
* Version 5.2 adds meta description mass-editing for categories/tags/terms
|
15 |
-
* Version 5.1 adds meta keyword auto-generation
|
16 |
* Version 5.0 increases database usage efficiency
|
17 |
-
* Version 4.9 adds
|
18 |
-
* Version 4.8 adds Deeplink Juggernaut features
|
19 |
|
20 |
= Features =
|
21 |
|
@@ -33,10 +33,11 @@ SEO Ultimate is an all-in-one [SEO](http://www.seodesignsolutions.com/) plugin w
|
|
33 |
* Mass-editor makes it a cinch to go back and add descriptions to old posts.
|
34 |
* Use the `{excerpt::autogen}` variable to auto-generate meta descriptions if desired.
|
35 |
|
36 |
-
* **Meta Keywords Editor** -- UPDATED in Version 5.
|
37 |
* Edit the `<meta>` keyword tags for posts, pages, and the homepage.
|
38 |
* Easily specify global keywords that are applied across the entire site.
|
39 |
* Go back and edit old posts' keywords with the mass-editor.
|
|
|
40 |
|
41 |
* **Meta Robot Tags Editor**
|
42 |
* Add the `<meta name="robots" content="noindex,follow" />` tag to archives, comment feeds, the login page, and more.
|
@@ -83,7 +84,7 @@ SEO Ultimate is an all-in-one [SEO](http://www.seodesignsolutions.com/) plugin w
|
|
83 |
* Determine which of your webpages Google most strongly associates with the keywords you specify.
|
84 |
* Use the information to determine ideal targets for incoming links or ideal sources of outgoing links.
|
85 |
|
86 |
-
* **Deeplink Juggernaut**
|
87 |
* Automatically link phrases in your posts/pages to other posts/pages or to custom URLs.
|
88 |
* Exclude specific posts/pages from having links added to them, if desired (e.g. contact pages, the homepage, etc.).
|
89 |
* Use the power of anchor text to boost your internal ranking SEO paradigm.
|
@@ -226,6 +227,10 @@ Frequently asked questions, settings help, and troubleshooting tips for SEO Ulti
|
|
226 |
|
227 |
== Changelog ==
|
228 |
|
|
|
|
|
|
|
|
|
229 |
= Version 5.2 (May 17, 2011) =
|
230 |
* Feature: Added meta description mass-editor for categories, tags, and custom taxonomy terms
|
231 |
|
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, affiliate
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.1
|
6 |
+
Stable tag: 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 |
|
11 |
|
12 |
= Recent Releases =
|
13 |
|
14 |
+
* Version 5.3 adds meta keyword auto-generation from frequently-used words
|
15 |
* Version 5.2 adds meta description mass-editing for categories/tags/terms
|
16 |
+
* Version 5.1 adds meta keyword auto-generation from categories/tags/terms
|
17 |
* Version 5.0 increases database usage efficiency
|
18 |
+
* Version 4.9 adds auto-generated meta descriptions
|
|
|
19 |
|
20 |
= Features =
|
21 |
|
33 |
* Mass-editor makes it a cinch to go back and add descriptions to old posts.
|
34 |
* Use the `{excerpt::autogen}` variable to auto-generate meta descriptions if desired.
|
35 |
|
36 |
+
* **Meta Keywords Editor** -- UPDATED in Version 5.3
|
37 |
* Edit the `<meta>` keyword tags for posts, pages, and the homepage.
|
38 |
* Easily specify global keywords that are applied across the entire site.
|
39 |
* Go back and edit old posts' keywords with the mass-editor.
|
40 |
+
* Automatically generate meta keywords based on categories, tags, custom taxonomy terms, and frequently-used words.
|
41 |
|
42 |
* **Meta Robot Tags Editor**
|
43 |
* Add the `<meta name="robots" content="noindex,follow" />` tag to archives, comment feeds, the login page, and more.
|
84 |
* Determine which of your webpages Google most strongly associates with the keywords you specify.
|
85 |
* Use the information to determine ideal targets for incoming links or ideal sources of outgoing links.
|
86 |
|
87 |
+
* **Deeplink Juggernaut**
|
88 |
* Automatically link phrases in your posts/pages to other posts/pages or to custom URLs.
|
89 |
* Exclude specific posts/pages from having links added to them, if desired (e.g. contact pages, the homepage, etc.).
|
90 |
* Use the power of anchor text to boost your internal ranking SEO paradigm.
|
227 |
|
228 |
== Changelog ==
|
229 |
|
230 |
+
= Version 5.3 (May 18, 2011) =
|
231 |
+
* Feature: Meta Keywords Editor now lets you auto-generate keywords based on the words most commonly used in your posts, pages, and custom post types
|
232 |
+
* Improvement: Meta Keywords Editor now removes duplicate keywords case-insensitively
|
233 |
+
|
234 |
= Version 5.2 (May 17, 2011) =
|
235 |
* Feature: Added meta description mass-editor for categories, tags, and custom taxonomy terms
|
236 |
|
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: 5.
|
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 5.
|
16 |
* @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
|
17 |
*/
|
18 |
|
@@ -47,10 +47,10 @@ define('SU_MINIMUM_WP_VER', '3.0');
|
|
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', '5.
|
51 |
define('SU_AUTHOR', 'SEO Design Solutions');
|
52 |
define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
|
53 |
-
define('SU_USER_AGENT', 'SeoUltimate/5.
|
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: 5.3
|
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 5.3
|
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', '5.3');
|
51 |
define('SU_AUTHOR', 'SEO Design Solutions');
|
52 |
define('SU_AUTHOR_URI', 'http://www.seodesignsolutions.com/');
|
53 |
+
define('SU_USER_AGENT', 'SeoUltimate/5.3');
|
54 |
|
55 |
/********** INCLUDES **********/
|
56 |
|