Version Description
Download this release
Release Info
Developer | SEO Design Solutions |
Plugin | SEO Ultimate |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1
- class.seo-ultimate.php +41 -37
- class.su-module.php +12 -8
- functions.php +41 -0
- images/sds-logo.png +0 -0
- modules/404s.php +3 -3
- modules/canonical.php +9 -7
- modules/files.php +5 -5
- modules/linkbox.php +4 -4
- modules/meta.php +4 -4
- modules/noindex.php +5 -5
- modules/sds-blog.php +4 -3
- modules/settings.php +3 -3
- modules/slugs.php +3 -3
- modules/titles.php +172 -21
- readme.txt +11 -3
- seo-ultimate.php +5 -5
- seo-ultimate.pot +117 -45
- tabs.js +1 -1
class.seo-ultimate.php
CHANGED
@@ -126,8 +126,8 @@ class SEO_Ultimate {
|
|
126 |
$this->upgrade_to_08();
|
127 |
|
128 |
//Save
|
129 |
-
add_action('shutdown', array(
|
130 |
-
add_action('shutdown', array(
|
131 |
|
132 |
/********** CLASS CONSTRUCTION **********/
|
133 |
|
@@ -169,10 +169,10 @@ class SEO_Ultimate {
|
|
169 |
/********** PLUGIN EVENT HOOKS **********/
|
170 |
|
171 |
//If we're activating the plugin, then call the activation function
|
172 |
-
register_activation_hook($this->plugin_file_path, array(
|
173 |
|
174 |
//If we're deactivating the plugin, then call the deactivation function
|
175 |
-
register_deactivation_hook($this->plugin_file_path, array(
|
176 |
|
177 |
//If we're uninstalling the plugin, then call the uninstallation function
|
178 |
register_uninstall_hook($this->plugin_file_path, 'su_uninstall');
|
@@ -181,37 +181,40 @@ class SEO_Ultimate {
|
|
181 |
/********** ACTION & FILTER HOOKS **********/
|
182 |
|
183 |
//Initializes modules at WordPress initialization
|
184 |
-
add_action('init', array(
|
185 |
|
186 |
//Hook to output all <head> code
|
187 |
-
add_action('wp_head', array(
|
188 |
|
189 |
//Hook to include JavaScript and CSS
|
190 |
-
add_action('admin_head', array(
|
191 |
|
192 |
//Hook to add plugin notice actions
|
193 |
-
add_action('admin_head', array(
|
|
|
|
|
|
|
194 |
|
195 |
//When loading the admin menu, call on our menu constructor function.
|
196 |
//For future-proofing purposes, we specifically state the default priority of 10,
|
197 |
//since some modules set a priority of 9 with the specific intention of running
|
198 |
//before this main plugin's hook.
|
199 |
-
add_action('admin_menu', array(
|
200 |
|
201 |
//Hook to customize contextual help
|
202 |
-
add_filter('contextual_help', array(
|
203 |
|
204 |
//Postmeta box hooks
|
205 |
-
add_action('admin_menu', array(
|
206 |
-
add_action('save_post', array(
|
207 |
|
208 |
//Display info on new versions
|
209 |
-
add_action('in_plugin_update_message-'.plugin_basename($this->plugin_file_path), array(
|
210 |
|
211 |
//Log this visitor!
|
212 |
-
add_filter('redirect_canonical', array(
|
213 |
-
add_filter('wp_redirect', array(
|
214 |
-
add_filter('status_header', array(
|
215 |
}
|
216 |
|
217 |
/**
|
@@ -327,7 +330,7 @@ class SEO_Ultimate {
|
|
327 |
delete_option('seo_ultimate');
|
328 |
|
329 |
//Stop the database data from being re-saved
|
330 |
-
remove_action('shutdown', array(
|
331 |
|
332 |
//Delete the hits table
|
333 |
mysql_query("DROP TABLE IF EXISTS ".$this->get_table_name('hits'));
|
@@ -436,7 +439,7 @@ class SEO_Ultimate {
|
|
436 |
//If the loop above found modules, then sort them with our special sorting function
|
437 |
//so they appear on the admin menu in the right order
|
438 |
if (count($this->modules) > 0)
|
439 |
-
uasort($this->modules, array(
|
440 |
|
441 |
//Now we'll compare the current module set with the one from last time.
|
442 |
|
@@ -534,6 +537,7 @@ class SEO_Ultimate {
|
|
534 |
*
|
535 |
* @since 1.0
|
536 |
* @uses $modules
|
|
|
537 |
*
|
538 |
* @param string $key The name of the setting to retrieve.
|
539 |
* @param mixed $default What should be returned if the setting does not exist. Optional.
|
@@ -549,9 +553,12 @@ class SEO_Ultimate {
|
|
549 |
|
550 |
/**
|
551 |
* Saves settings data to the database.
|
|
|
552 |
*
|
553 |
* @since 0.8
|
554 |
* @uses $dbdata
|
|
|
|
|
555 |
*/
|
556 |
function save_dbdata() {
|
557 |
|
@@ -724,7 +731,7 @@ class SEO_Ultimate {
|
|
724 |
'manage_options', $hook, array($module, 'admin_page'));
|
725 |
|
726 |
//Support for the "Ozh' Admin Drop Down Menu" plugin
|
727 |
-
add_filter("ozh_adminmenu_icon_$hook", array(
|
728 |
}
|
729 |
}
|
730 |
}
|
@@ -763,7 +770,7 @@ class SEO_Ultimate {
|
|
763 |
|
764 |
//If we have alerts that need a bubble, then return the bubble HTML.
|
765 |
if ($count > 0)
|
766 |
-
return " <span id='awaiting-mod' class='count-$count'><span class='pending-count'
|
767 |
else
|
768 |
return '';
|
769 |
}
|
@@ -948,7 +955,7 @@ class SEO_Ultimate {
|
|
948 |
|
949 |
foreach ($r_plugins as $path) {
|
950 |
if (isset($i_plugins[$path]))
|
951 |
-
add_action("after_plugin_row_$path", array(
|
952 |
}
|
953 |
}
|
954 |
}
|
@@ -990,6 +997,18 @@ class SEO_Ultimate {
|
|
990 |
}
|
991 |
}
|
992 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
993 |
|
994 |
/********** ADMIN POST META BOX FUNCTIONS **********/
|
995 |
|
@@ -1047,7 +1066,7 @@ class SEO_Ultimate {
|
|
1047 |
|
1048 |
//Only show the meta box if there are fields to show.
|
1049 |
if ($this->get_postmeta_fields($screen))
|
1050 |
-
add_meta_box('su_postmeta', __('SEO Settings', 'seo-ultimate'), array(
|
1051 |
}
|
1052 |
}
|
1053 |
|
@@ -1260,20 +1279,5 @@ class SEO_Ultimate {
|
|
1260 |
|
1261 |
return trim( $response['body'] );
|
1262 |
}
|
1263 |
-
|
1264 |
-
/**
|
1265 |
-
* Uses the Google Chart API to output a 3D pie chart.
|
1266 |
-
*
|
1267 |
-
* @since 0.3
|
1268 |
-
*
|
1269 |
-
* @param array $data The labels (keys) and values that go on the pie chart.
|
1270 |
-
* @param array|string $color An array or string of which color(s) to use on the pie chart.
|
1271 |
-
*/
|
1272 |
-
function pie_chart_3d($data, $color = '0000FF') {
|
1273 |
-
$labels = implode('|', array_keys($data));
|
1274 |
-
$values = implode(',', array_values($data));
|
1275 |
-
$colors = implode(',', (array)$color);
|
1276 |
-
echo "<img src='http://chart.apis.google.com/chart?cht=p3&chd=t:$values&chs=250x100&chl=$labels&chco=$colors' alt='' />";
|
1277 |
-
}
|
1278 |
}
|
1279 |
?>
|
126 |
$this->upgrade_to_08();
|
127 |
|
128 |
//Save
|
129 |
+
add_action('shutdown', array(&$this, 'save_dbdata'));
|
130 |
+
add_action('shutdown', array(&$this, 'save_hit'));
|
131 |
|
132 |
/********** CLASS CONSTRUCTION **********/
|
133 |
|
169 |
/********** PLUGIN EVENT HOOKS **********/
|
170 |
|
171 |
//If we're activating the plugin, then call the activation function
|
172 |
+
register_activation_hook($this->plugin_file_path, array(&$this, 'activate'));
|
173 |
|
174 |
//If we're deactivating the plugin, then call the deactivation function
|
175 |
+
register_deactivation_hook($this->plugin_file_path, array(&$this, 'deactivate'));
|
176 |
|
177 |
//If we're uninstalling the plugin, then call the uninstallation function
|
178 |
register_uninstall_hook($this->plugin_file_path, 'su_uninstall');
|
181 |
/********** ACTION & FILTER HOOKS **********/
|
182 |
|
183 |
//Initializes modules at WordPress initialization
|
184 |
+
add_action('init', array(&$this, 'init'));
|
185 |
|
186 |
//Hook to output all <head> code
|
187 |
+
add_action('wp_head', array(&$this, 'template_head'), 1);
|
188 |
|
189 |
//Hook to include JavaScript and CSS
|
190 |
+
add_action('admin_head', array(&$this, 'admin_includes'));
|
191 |
|
192 |
//Hook to add plugin notice actions
|
193 |
+
add_action('admin_head', array(&$this, 'plugin_page_notices'));
|
194 |
+
|
195 |
+
//Hook to remove other plugins' notices from our admin pages
|
196 |
+
add_action('admin_head', array(&$this, 'remove_admin_notices'));
|
197 |
|
198 |
//When loading the admin menu, call on our menu constructor function.
|
199 |
//For future-proofing purposes, we specifically state the default priority of 10,
|
200 |
//since some modules set a priority of 9 with the specific intention of running
|
201 |
//before this main plugin's hook.
|
202 |
+
add_action('admin_menu', array(&$this, 'add_menus'), 10);
|
203 |
|
204 |
//Hook to customize contextual help
|
205 |
+
add_filter('contextual_help', array(&$this, 'admin_help'), 10, 2);
|
206 |
|
207 |
//Postmeta box hooks
|
208 |
+
add_action('admin_menu', array(&$this, 'add_postmeta_box'));
|
209 |
+
add_action('save_post', array(&$this, 'save_postmeta_box'), 10, 2);
|
210 |
|
211 |
//Display info on new versions
|
212 |
+
add_action('in_plugin_update_message-'.plugin_basename($this->plugin_file_path), array(&$this, 'plugin_update_info'), 10, 2);
|
213 |
|
214 |
//Log this visitor!
|
215 |
+
add_filter('redirect_canonical', array(&$this, 'log_redirect_canonical'));
|
216 |
+
add_filter('wp_redirect', array(&$this, 'log_redirect'), 10, 2);
|
217 |
+
add_filter('status_header', array(&$this, 'log_hit'), 10, 2);
|
218 |
}
|
219 |
|
220 |
/**
|
330 |
delete_option('seo_ultimate');
|
331 |
|
332 |
//Stop the database data from being re-saved
|
333 |
+
remove_action('shutdown', array(&$this, 'save_dbdata'));
|
334 |
|
335 |
//Delete the hits table
|
336 |
mysql_query("DROP TABLE IF EXISTS ".$this->get_table_name('hits'));
|
439 |
//If the loop above found modules, then sort them with our special sorting function
|
440 |
//so they appear on the admin menu in the right order
|
441 |
if (count($this->modules) > 0)
|
442 |
+
uasort($this->modules, array(&$this, 'module_sort_callback'));
|
443 |
|
444 |
//Now we'll compare the current module set with the one from last time.
|
445 |
|
537 |
*
|
538 |
* @since 1.0
|
539 |
* @uses $modules
|
540 |
+
* @uses SU_Module::get_setting()
|
541 |
*
|
542 |
* @param string $key The name of the setting to retrieve.
|
543 |
* @param mixed $default What should be returned if the setting does not exist. Optional.
|
553 |
|
554 |
/**
|
555 |
* Saves settings data to the database.
|
556 |
+
* Also deletes old hits, if that behavior is enabled.
|
557 |
*
|
558 |
* @since 0.8
|
559 |
* @uses $dbdata
|
560 |
+
* @uses get_setting()
|
561 |
+
* @uses get_table_name()
|
562 |
*/
|
563 |
function save_dbdata() {
|
564 |
|
731 |
'manage_options', $hook, array($module, 'admin_page'));
|
732 |
|
733 |
//Support for the "Ozh' Admin Drop Down Menu" plugin
|
734 |
+
add_filter("ozh_adminmenu_icon_$hook", array(&$this, 'get_admin_menu_icon_url'));
|
735 |
}
|
736 |
}
|
737 |
}
|
770 |
|
771 |
//If we have alerts that need a bubble, then return the bubble HTML.
|
772 |
if ($count > 0)
|
773 |
+
return " <span id='awaiting-mod' class='count-$count'><span class='pending-count'>".number_format_i18n($count)."</span></span>";
|
774 |
else
|
775 |
return '';
|
776 |
}
|
955 |
|
956 |
foreach ($r_plugins as $path) {
|
957 |
if (isset($i_plugins[$path]))
|
958 |
+
add_action("after_plugin_row_$path", array(&$this, 'plugin_page_notice'), 10, 3);
|
959 |
}
|
960 |
}
|
961 |
}
|
997 |
}
|
998 |
}
|
999 |
|
1000 |
+
/**
|
1001 |
+
* Removes the activation notices of All in One SEO Pack and Akismet from our admin pages.
|
1002 |
+
* (It could be confusing for users to see another plugin's notices on our plugin's pages.)
|
1003 |
+
*
|
1004 |
+
* @since 1.1
|
1005 |
+
*/
|
1006 |
+
function remove_admin_notices() {
|
1007 |
+
if ($this->is_plugin_admin_page()) {
|
1008 |
+
remove_action('admin_notices', 'aioseop_activation_notice');
|
1009 |
+
remove_action('admin_notices', 'akismet_warning');
|
1010 |
+
}
|
1011 |
+
}
|
1012 |
|
1013 |
/********** ADMIN POST META BOX FUNCTIONS **********/
|
1014 |
|
1066 |
|
1067 |
//Only show the meta box if there are fields to show.
|
1068 |
if ($this->get_postmeta_fields($screen))
|
1069 |
+
add_meta_box('su_postmeta', __('SEO Settings', 'seo-ultimate'), array(&$this, "show_{$screen}_postmeta_box"), $screen, 'normal', 'high');
|
1070 |
}
|
1071 |
}
|
1072 |
|
1279 |
|
1280 |
return trim( $response['body'] );
|
1281 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1282 |
}
|
1283 |
?>
|
class.su-module.php
CHANGED
@@ -417,9 +417,13 @@ class SU_Module {
|
|
417 |
*/
|
418 |
function admin_page_start($icon = 'options-general') {
|
419 |
|
420 |
-
|
421 |
-
|
422 |
|
|
|
|
|
|
|
|
|
423 |
echo "<div class=\"wrap\">\n";
|
424 |
echo "<div id=\"su-".attribute_escape($this->get_module_key())."\" class=\"su-module\">\n";
|
425 |
screen_icon($icon);
|
@@ -476,7 +480,7 @@ class SU_Module {
|
|
476 |
foreach ($tabs as $title => $function) {
|
477 |
$id = preg_replace('/[^a-z0-9]/', '', strtolower($title));
|
478 |
echo "<fieldset id='$id'>\n<h3>$title</h3>\n";
|
479 |
-
if (!is_array($function)) $call = array(
|
480 |
if (is_callable($call)) call_user_func($call);
|
481 |
echo "</fieldset>\n";
|
482 |
}
|
@@ -491,7 +495,7 @@ class SU_Module {
|
|
491 |
* @since 0.8
|
492 |
*/
|
493 |
function admin_page_tabs_init() {
|
494 |
-
add_action('admin_print_scripts', array(
|
495 |
}
|
496 |
|
497 |
/**
|
@@ -520,7 +524,7 @@ class SU_Module {
|
|
520 |
|
521 |
$label = htmlspecialchars($label);
|
522 |
|
523 |
-
$function = array(
|
524 |
if (is_callable($function)) {
|
525 |
$content = "<div class='su-help'>\n";
|
526 |
$content .= '<h5>'.sprintf(_c('%s %s|Dropdown Title', 'seo-ultimate'), $this->get_page_title(), $label)."</h5>\n\n";
|
@@ -592,7 +596,7 @@ class SU_Module {
|
|
592 |
|
593 |
if (!$this->get_parent_module()) {
|
594 |
if ($this->is_action('update')) $this->print_message('success', __('Settings updated.', 'seo-ultimate'));
|
595 |
-
echo "<form method='post' action='?page=$hook'>\n";
|
596 |
settings_fields($hook);
|
597 |
}
|
598 |
|
@@ -671,7 +675,7 @@ class SU_Module {
|
|
671 |
if (is_array($checkboxes)) {
|
672 |
foreach ($checkboxes as $name => $desc) {
|
673 |
|
674 |
-
//$desc = preg_replace_callback('/%d/', array(
|
675 |
|
676 |
register_setting($this->get_module_key(), $name, 'intval');
|
677 |
$name = attribute_escape($name);
|
@@ -1107,7 +1111,7 @@ class SU_Module {
|
|
1107 |
call_user_func(array($this, $function));
|
1108 |
}
|
1109 |
|
1110 |
-
add_action($hook, array(
|
1111 |
}
|
1112 |
|
1113 |
/********** RSS FUNCTION **********/
|
417 |
*/
|
418 |
function admin_page_start($icon = 'options-general') {
|
419 |
|
420 |
+
//Add our custom footer attribution
|
421 |
+
add_action('in_admin_footer', array(&$this, 'admin_footer'));
|
422 |
|
423 |
+
//Add our custom contextual help
|
424 |
+
add_filter('screen_meta', array(&$this, 'screen_meta_filter'));
|
425 |
+
|
426 |
+
//Output the beginning of the admin screen
|
427 |
echo "<div class=\"wrap\">\n";
|
428 |
echo "<div id=\"su-".attribute_escape($this->get_module_key())."\" class=\"su-module\">\n";
|
429 |
screen_icon($icon);
|
480 |
foreach ($tabs as $title => $function) {
|
481 |
$id = preg_replace('/[^a-z0-9]/', '', strtolower($title));
|
482 |
echo "<fieldset id='$id'>\n<h3>$title</h3>\n";
|
483 |
+
if (!is_array($function)) $call = array(&$this, $function);
|
484 |
if (is_callable($call)) call_user_func($call);
|
485 |
echo "</fieldset>\n";
|
486 |
}
|
495 |
* @since 0.8
|
496 |
*/
|
497 |
function admin_page_tabs_init() {
|
498 |
+
add_action('admin_print_scripts', array(&$this, 'admin_page_tabs_js'));
|
499 |
}
|
500 |
|
501 |
/**
|
524 |
|
525 |
$label = htmlspecialchars($label);
|
526 |
|
527 |
+
$function = array(&$this, "admin_dropdown_$key");
|
528 |
if (is_callable($function)) {
|
529 |
$content = "<div class='su-help'>\n";
|
530 |
$content .= '<h5>'.sprintf(_c('%s %s|Dropdown Title', 'seo-ultimate'), $this->get_page_title(), $label)."</h5>\n\n";
|
596 |
|
597 |
if (!$this->get_parent_module()) {
|
598 |
if ($this->is_action('update')) $this->print_message('success', __('Settings updated.', 'seo-ultimate'));
|
599 |
+
echo "<form id='su-admin-form' method='post' action='?page=$hook'>\n";
|
600 |
settings_fields($hook);
|
601 |
}
|
602 |
|
675 |
if (is_array($checkboxes)) {
|
676 |
foreach ($checkboxes as $name => $desc) {
|
677 |
|
678 |
+
//$desc = preg_replace_callback('/%d/', array(&$this, "insert_int_var_textboxes"), $desc);
|
679 |
|
680 |
register_setting($this->get_module_key(), $name, 'intval');
|
681 |
$name = attribute_escape($name);
|
1111 |
call_user_func(array($this, $function));
|
1112 |
}
|
1113 |
|
1114 |
+
add_action($hook, array(&$this, $function));
|
1115 |
}
|
1116 |
|
1117 |
/********** RSS FUNCTION **********/
|
functions.php
CHANGED
@@ -103,6 +103,47 @@ function su_esc_attr($str) {
|
|
103 |
return $str;
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
/********** CLASS FUNCTION ALIASES **********/
|
107 |
|
108 |
/**
|
103 |
return $str;
|
104 |
}
|
105 |
|
106 |
+
/**
|
107 |
+
* Joins strings into a natural-language list.
|
108 |
+
* Can be internationalized with gettext or the su_lang_implode filter.
|
109 |
+
*
|
110 |
+
* @since 1.1
|
111 |
+
*
|
112 |
+
* @param array $items The strings (or objects with $var child strings) to join.
|
113 |
+
* @param string|false $var The name of the items' object variables whose values should be imploded into a list.
|
114 |
+
If false, the items themselves will be used.
|
115 |
+
* @param bool $ucwords Whether or not to capitalize the first letter of every word in the list.
|
116 |
+
* @return string|array The items in a natural-language list.
|
117 |
+
*/
|
118 |
+
function su_lang_implode($items, $var=false, $ucwords=false) {
|
119 |
+
|
120 |
+
if (is_array($items) ) {
|
121 |
+
|
122 |
+
if (strlen($var)) {
|
123 |
+
$_items = array();
|
124 |
+
foreach ($items as $item) $_items[] = $item->$var;
|
125 |
+
$items = $_items;
|
126 |
+
}
|
127 |
+
|
128 |
+
if ($ucwords) $items = array_map('ucwords', $items);
|
129 |
+
|
130 |
+
switch (count($items)) {
|
131 |
+
case 0: $list = ''; break;
|
132 |
+
case 1: $list = $items[0]; break;
|
133 |
+
case 2: $list = sprintf(__('%s and %s', 'seo-ultimate'), $items[0], $items[1]); break;
|
134 |
+
default:
|
135 |
+
$last = array_pop($items);
|
136 |
+
$list = implode(__(', ', 'seo-ultimate'), $items);
|
137 |
+
$list = sprintf(__('%s, and %s', 'seo-ultimate'), $list, $last);
|
138 |
+
break;
|
139 |
+
}
|
140 |
+
|
141 |
+
return apply_filters('su_lang_implode', $list, $items);
|
142 |
+
}
|
143 |
+
|
144 |
+
return $items;
|
145 |
+
}
|
146 |
+
|
147 |
/********** CLASS FUNCTION ALIASES **********/
|
148 |
|
149 |
/**
|
images/sds-logo.png
ADDED
Binary file
|
modules/404s.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* 404 Monitor Module
|
4 |
*
|
5 |
-
* @version 1.0.
|
6 |
* @since 0.4
|
7 |
*/
|
8 |
|
@@ -16,7 +16,7 @@ class SU_404s extends SU_Module {
|
|
16 |
//Load 404s from the database
|
17 |
$this->hitset = new SU_HitSet('404s', "status_code=404 AND redirect_url='' AND url NOT LIKE '%/favicon.ico'");
|
18 |
|
19 |
-
add_filter('su_save_hit', array(
|
20 |
}
|
21 |
|
22 |
function should_log_hit($should_log, $hit) {
|
@@ -77,7 +77,7 @@ class SU_404s extends SU_Module {
|
|
77 |
if ($this->hitset->have_hits()) {
|
78 |
|
79 |
//Display the 404 table
|
80 |
-
$this->hitset->admin_table(array(
|
81 |
|
82 |
//Create the "Clear Log" button
|
83 |
$clearurl = $this->get_nonce_url('clear');
|
2 |
/**
|
3 |
* 404 Monitor Module
|
4 |
*
|
5 |
+
* @version 1.0.7
|
6 |
* @since 0.4
|
7 |
*/
|
8 |
|
16 |
//Load 404s from the database
|
17 |
$this->hitset = new SU_HitSet('404s', "status_code=404 AND redirect_url='' AND url NOT LIKE '%/favicon.ico'");
|
18 |
|
19 |
+
add_filter('su_save_hit', array(&$this, 'should_log_hit'), 10, 2);
|
20 |
}
|
21 |
|
22 |
function should_log_hit($should_log, $hit) {
|
77 |
if ($this->hitset->have_hits()) {
|
78 |
|
79 |
//Display the 404 table
|
80 |
+
$this->hitset->admin_table(array(&$this, 'hits_table_action_links'));
|
81 |
|
82 |
//Create the "Clear Log" button
|
83 |
$clearurl = $this->get_nonce_url('clear');
|
modules/canonical.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Canonicalizer Module
|
4 |
*
|
5 |
-
* @version 1.1
|
6 |
* @since 0.3
|
7 |
*/
|
8 |
|
@@ -20,12 +20,12 @@ class SU_Canonical extends SU_Module {
|
|
20 |
remove_action('wp_head', 'rel_canonical');
|
21 |
|
22 |
//...and add our custom canonical tags.
|
23 |
-
add_action('su_head', array(
|
24 |
}
|
25 |
|
26 |
//Should we remove nonexistent pagination?
|
27 |
if ($this->get_setting('remove_nonexistent_pagination'))
|
28 |
-
add_action('template_redirect', array(
|
29 |
}
|
30 |
|
31 |
function admin_page_contents() {
|
@@ -188,11 +188,13 @@ class SU_Canonical extends SU_Module {
|
|
188 |
return __("
|
189 |
<ul>
|
190 |
<li><p><strong>What it does:</strong> Canonicalizer improves on two WordPress features to minimize possible exact-content duplication penalties.
|
191 |
-
The <code><link rel="canonical" /></code> tags setting improves on the canonical tags feature of WordPress 2.9 and above by encompassing much more of your site than just your posts and Pages
|
192 |
-
The nonexistent pagination redirect feature fills a gap in WordPress’s built-in canonicalization functionality:
|
193 |
for example, if a URL request is made for page 6 of a category archive, and that category doesn’t have a page 6,
|
194 |
-
then
|
195 |
-
|
|
|
|
|
196 |
<li><p><strong>Why it helps:</strong> These features will point Google to the correct URL for your homepage and each of your posts, Pages, categories, tags, date archives, and author archives.
|
197 |
That way, if Google comes across an alternate URL by which one of those items can be accessed, it will be able to find the correct URL
|
198 |
and won’t penalize you for having two identical pages on your site.</p></li>
|
2 |
/**
|
3 |
* Canonicalizer Module
|
4 |
*
|
5 |
+
* @version 1.1.1
|
6 |
* @since 0.3
|
7 |
*/
|
8 |
|
20 |
remove_action('wp_head', 'rel_canonical');
|
21 |
|
22 |
//...and add our custom canonical tags.
|
23 |
+
add_action('su_head', array(&$this, 'link_rel_canonical_tag'));
|
24 |
}
|
25 |
|
26 |
//Should we remove nonexistent pagination?
|
27 |
if ($this->get_setting('remove_nonexistent_pagination'))
|
28 |
+
add_action('template_redirect', array(&$this, 'remove_nonexistent_pagination'), 11);
|
29 |
}
|
30 |
|
31 |
function admin_page_contents() {
|
188 |
return __("
|
189 |
<ul>
|
190 |
<li><p><strong>What it does:</strong> Canonicalizer improves on two WordPress features to minimize possible exact-content duplication penalties.
|
191 |
+
The <code><link rel="canonical" /></code> tags setting improves on the canonical tags feature of WordPress 2.9 and above by encompassing much more of your site than just your posts and Pages.</p>
|
192 |
+
<p>The nonexistent pagination redirect feature fills a gap in WordPress’s built-in canonicalization functionality:
|
193 |
for example, if a URL request is made for page 6 of a category archive, and that category doesn’t have a page 6,
|
194 |
+
then by default, depending on the context, WordPress will display a blank page, or it will display the content of the closest page number available,
|
195 |
+
without issuing a 404 error or a 301 redirect (thus creating two or more identical webpages).
|
196 |
+
This duplicate-content situation can happen when you, for example, remove many posts from a category, thus reducing the amount of pagination needed in the category’s archive.
|
197 |
+
The Canonicalizer’s feature fixes that behavior by issuing 301 redirects to page 1 of the paginated section in question.</p></li>
|
198 |
<li><p><strong>Why it helps:</strong> These features will point Google to the correct URL for your homepage and each of your posts, Pages, categories, tags, date archives, and author archives.
|
199 |
That way, if Google comes across an alternate URL by which one of those items can be accessed, it will be able to find the correct URL
|
200 |
and won’t penalize you for having two identical pages on your site.</p></li>
|
modules/files.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* File Editor Module
|
4 |
*
|
5 |
-
* @version 1.0.
|
6 |
* @since 2.0
|
7 |
*/
|
8 |
|
@@ -21,15 +21,15 @@ class SU_Files extends SU_Module {
|
|
21 |
|
22 |
//...Remove WordPress's robots.txt handler and replace it with ours.
|
23 |
remove_action('do_robots', 'do_robots');
|
24 |
-
add_action('do_robots', array(
|
25 |
|
26 |
//...And put a notice on the Privacy options page that the privacy settings won't take effect.
|
27 |
-
add_action('admin_notices', array(
|
28 |
}
|
29 |
|
30 |
//We override the default behavior of saving the custom htaccess contents to the database and instead save the contents to the file
|
31 |
-
add_filter('su_get_setting-files-htaccess', array(
|
32 |
-
add_filter('su_custom_update_setting-files-htaccess', array(
|
33 |
}
|
34 |
|
35 |
function admin_page_contents() {
|
2 |
/**
|
3 |
* File Editor Module
|
4 |
*
|
5 |
+
* @version 1.0.2
|
6 |
* @since 2.0
|
7 |
*/
|
8 |
|
21 |
|
22 |
//...Remove WordPress's robots.txt handler and replace it with ours.
|
23 |
remove_action('do_robots', 'do_robots');
|
24 |
+
add_action('do_robots', array(&$this, 'do_robots'));
|
25 |
|
26 |
//...And put a notice on the Privacy options page that the privacy settings won't take effect.
|
27 |
+
add_action('admin_notices', array(&$this, 'privacy_options_notice'));
|
28 |
}
|
29 |
|
30 |
//We override the default behavior of saving the custom htaccess contents to the database and instead save the contents to the file
|
31 |
+
add_filter('su_get_setting-files-htaccess', array(&$this, 'get_htaccess'));
|
32 |
+
add_filter('su_custom_update_setting-files-htaccess', array(&$this, 'update_htaccess'), 10, 2);
|
33 |
}
|
34 |
|
35 |
function admin_page_contents() {
|
modules/linkbox.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Linkbox Inserter Module
|
4 |
*
|
5 |
-
* @version 1.0.
|
6 |
* @since 0.6
|
7 |
*/
|
8 |
|
@@ -26,7 +26,7 @@ class SU_Linkbox extends SU_Module {
|
|
26 |
|
27 |
function init() {
|
28 |
//We only want to filter post content when we're in the front-end, so we hook into template_redirect
|
29 |
-
add_action('template_redirect', array(
|
30 |
}
|
31 |
|
32 |
function template_init() {
|
@@ -34,11 +34,11 @@ class SU_Linkbox extends SU_Module {
|
|
34 |
|
35 |
if ($this->should_linkbox())
|
36 |
//Add the linkbox to post/page content
|
37 |
-
add_filter('the_content', array(
|
38 |
|
39 |
if ($this->get_setting('action_hook'))
|
40 |
//Enable the action hook
|
41 |
-
add_action('su_linkbox', array(
|
42 |
}
|
43 |
|
44 |
function admin_page_contents() {
|
2 |
/**
|
3 |
* Linkbox Inserter Module
|
4 |
*
|
5 |
+
* @version 1.0.3
|
6 |
* @since 0.6
|
7 |
*/
|
8 |
|
26 |
|
27 |
function init() {
|
28 |
//We only want to filter post content when we're in the front-end, so we hook into template_redirect
|
29 |
+
add_action('template_redirect', array(&$this, 'template_init'));
|
30 |
}
|
31 |
|
32 |
function template_init() {
|
34 |
|
35 |
if ($this->should_linkbox())
|
36 |
//Add the linkbox to post/page content
|
37 |
+
add_filter('the_content', array(&$this, 'linkbox_filter'));
|
38 |
|
39 |
if ($this->get_setting('action_hook'))
|
40 |
//Enable the action hook
|
41 |
+
add_action('su_linkbox', array(&$this, 'linkbox_action'));
|
42 |
}
|
43 |
|
44 |
function admin_page_contents() {
|
modules/meta.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Meta Editor Module
|
4 |
*
|
5 |
-
* @version 1.0.
|
6 |
* @since 0.3
|
7 |
*/
|
8 |
|
@@ -13,9 +13,9 @@ class SU_Meta extends SU_Module {
|
|
13 |
function get_menu_title() { return __('Meta Editor', 'seo-ultimate'); }
|
14 |
|
15 |
function init() {
|
16 |
-
add_filter('su_meta_robots', array(
|
17 |
-
add_action('su_head', array(
|
18 |
-
add_filter('su_postmeta_help', array(
|
19 |
}
|
20 |
|
21 |
function get_default_settings() {
|
2 |
/**
|
3 |
* Meta Editor Module
|
4 |
*
|
5 |
+
* @version 1.0.5
|
6 |
* @since 0.3
|
7 |
*/
|
8 |
|
13 |
function get_menu_title() { return __('Meta Editor', 'seo-ultimate'); }
|
14 |
|
15 |
function init() {
|
16 |
+
add_filter('su_meta_robots', array(&$this, 'meta_robots'));
|
17 |
+
add_action('su_head', array(&$this, 'head_tag_output'));
|
18 |
+
add_filter('su_postmeta_help', array(&$this, 'postmeta_help'), 20);
|
19 |
}
|
20 |
|
21 |
function get_default_settings() {
|
modules/noindex.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Noindex Manager Module
|
4 |
*
|
5 |
-
* @version 1.1
|
6 |
* @since 0.1
|
7 |
*/
|
8 |
|
@@ -15,21 +15,21 @@ class SU_Noindex extends SU_Module {
|
|
15 |
function init() {
|
16 |
|
17 |
//Hook into our wp_head() action
|
18 |
-
add_action('su_meta_robots', array(
|
19 |
|
20 |
//Now we'll hook into places where wp_head() is not called
|
21 |
|
22 |
//Hook into comment feed headers
|
23 |
if ($this->get_setting('noindex_comments_feed'))
|
24 |
-
add_action('commentsrss2_head', array(
|
25 |
|
26 |
//Hook into the admin header
|
27 |
if ($this->get_setting('noindex_admin'))
|
28 |
-
add_action('admin_head', array(
|
29 |
|
30 |
//Hook into the login header
|
31 |
if ($this->get_setting('noindex_login'))
|
32 |
-
add_action('login_head', array(
|
33 |
}
|
34 |
|
35 |
function admin_page_contents() {
|
2 |
/**
|
3 |
* Noindex Manager Module
|
4 |
*
|
5 |
+
* @version 1.1.1
|
6 |
* @since 0.1
|
7 |
*/
|
8 |
|
15 |
function init() {
|
16 |
|
17 |
//Hook into our wp_head() action
|
18 |
+
add_action('su_meta_robots', array(&$this, 'wphead_noindex'), 1);
|
19 |
|
20 |
//Now we'll hook into places where wp_head() is not called
|
21 |
|
22 |
//Hook into comment feed headers
|
23 |
if ($this->get_setting('noindex_comments_feed'))
|
24 |
+
add_action('commentsrss2_head', array(&$this, 'rss2_noindex_tag'));
|
25 |
|
26 |
//Hook into the admin header
|
27 |
if ($this->get_setting('noindex_admin'))
|
28 |
+
add_action('admin_head', array(&$this, 'xhtml_noindex_tag'));
|
29 |
|
30 |
//Hook into the login header
|
31 |
if ($this->get_setting('noindex_login'))
|
32 |
+
add_action('login_head', array(&$this, 'xhtml_noindex_tag'));
|
33 |
}
|
34 |
|
35 |
function admin_page_contents() {
|
modules/sds-blog.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* SEO Design Solutions Whitepapers Module
|
4 |
*
|
5 |
-
* @version 1.0.
|
6 |
* @since 0.1
|
7 |
*/
|
8 |
|
@@ -15,7 +15,7 @@ class SU_SdsBlog extends SU_Module {
|
|
15 |
function get_menu_count() { return $this->get_unread_count(); }
|
16 |
|
17 |
function __construct() {
|
18 |
-
add_filter('su_settings_export_array', array(
|
19 |
}
|
20 |
|
21 |
function init() {
|
@@ -38,7 +38,8 @@ class SU_SdsBlog extends SU_Module {
|
|
38 |
}
|
39 |
|
40 |
function admin_page_contents() {
|
41 |
-
|
|
|
42 |
echo "<p>".__("Search engine optimization articles from the company behind the SEO Ultimate plugin.", 'seo-ultimate')."</p>\n";
|
43 |
echo "<div class='rss-widget'>\n";
|
44 |
|
2 |
/**
|
3 |
* SEO Design Solutions Whitepapers Module
|
4 |
*
|
5 |
+
* @version 1.0.4
|
6 |
* @since 0.1
|
7 |
*/
|
8 |
|
15 |
function get_menu_count() { return $this->get_unread_count(); }
|
16 |
|
17 |
function __construct() {
|
18 |
+
add_filter('su_settings_export_array', array(&$this, 'filter_export_array'));
|
19 |
}
|
20 |
|
21 |
function init() {
|
38 |
}
|
39 |
|
40 |
function admin_page_contents() {
|
41 |
+
global $seo_ultimate;
|
42 |
+
echo "<a href='http://www.seodesignsolutions.com'><img src='{$seo_ultimate->plugin_dir_url}images/sds-logo.png' alt='".__("SEO Design Solutions", 'seo-ultimate')."' id='sds-logo' /></a>";
|
43 |
echo "<p>".__("Search engine optimization articles from the company behind the SEO Ultimate plugin.", 'seo-ultimate')."</p>\n";
|
44 |
echo "<div class='rss-widget'>\n";
|
45 |
|
modules/settings.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* SEO Ultimate Plugin Settings Module
|
4 |
*
|
5 |
-
* @version 2.2.
|
6 |
* @since 0.2
|
7 |
*/
|
8 |
|
@@ -85,8 +85,8 @@ class SU_Settings extends SU_Module {
|
|
85 |
|
86 |
//Hook to add attribution link
|
87 |
if ($this->get_setting('attribution_link', true)) {
|
88 |
-
add_action('wp_meta', array(
|
89 |
-
add_action('wp_footer', array(
|
90 |
}
|
91 |
}
|
92 |
|
2 |
/**
|
3 |
* SEO Ultimate Plugin Settings Module
|
4 |
*
|
5 |
+
* @version 2.2.3
|
6 |
* @since 0.2
|
7 |
*/
|
8 |
|
85 |
|
86 |
//Hook to add attribution link
|
87 |
if ($this->get_setting('attribution_link', true)) {
|
88 |
+
add_action('wp_meta', array(&$this, 'meta_link'));
|
89 |
+
add_action('wp_footer', array(&$this, 'footer_link'));
|
90 |
}
|
91 |
}
|
92 |
|
modules/slugs.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Slug Optimizer Module
|
4 |
*
|
5 |
-
* @version 1.0.
|
6 |
* @since 0.9
|
7 |
*/
|
8 |
|
@@ -20,12 +20,12 @@ class SU_Slugs extends SU_Module {
|
|
20 |
|
21 |
function init() {
|
22 |
|
23 |
-
add_filter('name_save_pre', array(
|
24 |
|
25 |
//Only sanitize if a permalink is being requested via AJAX
|
26 |
if ($_POST['action'] == 'sample-permalink')
|
27 |
//The filter priority is very important to ensure our function runs before WordPress's sanitize_title_with_dashes() function
|
28 |
-
add_filter('sanitize_title', array(
|
29 |
}
|
30 |
|
31 |
function optimize_slug_ajax($title) {
|
2 |
/**
|
3 |
* Slug Optimizer Module
|
4 |
*
|
5 |
+
* @version 1.0.2
|
6 |
* @since 0.9
|
7 |
*/
|
8 |
|
20 |
|
21 |
function init() {
|
22 |
|
23 |
+
add_filter('name_save_pre', array(&$this, 'optimize_slug'), 0);
|
24 |
|
25 |
//Only sanitize if a permalink is being requested via AJAX
|
26 |
if ($_POST['action'] == 'sample-permalink')
|
27 |
//The filter priority is very important to ensure our function runs before WordPress's sanitize_title_with_dashes() function
|
28 |
+
add_filter('sanitize_title', array(&$this, 'optimize_slug_ajax'), 9);
|
29 |
}
|
30 |
|
31 |
function optimize_slug_ajax($title) {
|
modules/titles.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Title Rewriter Module
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 0.1
|
7 |
*/
|
8 |
|
@@ -13,9 +13,9 @@ class SU_Titles extends SU_Module {
|
|
13 |
function get_menu_title() { return __('Title Rewriter', 'seo-ultimate'); }
|
14 |
|
15 |
function init() {
|
16 |
-
add_action('template_redirect', array(
|
17 |
-
add_action('wp_head', array(
|
18 |
-
add_filter('su_postmeta_help', array(
|
19 |
}
|
20 |
|
21 |
function get_default_settings() {
|
@@ -55,9 +55,19 @@ class SU_Titles extends SU_Module {
|
|
55 |
}
|
56 |
|
57 |
function admin_page_contents() {
|
58 |
-
$this->admin_form_start();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
$this->textboxes($this->get_supported_settings(), $this->get_default_settings());
|
60 |
-
|
61 |
}
|
62 |
|
63 |
function postmeta_fields($fields) {
|
@@ -89,7 +99,7 @@ class SU_Titles extends SU_Module {
|
|
89 |
}
|
90 |
|
91 |
function before_header() {
|
92 |
-
if ($this->should_rewrite_title()) ob_start(array(
|
93 |
}
|
94 |
|
95 |
function after_header() {
|
@@ -124,10 +134,12 @@ class SU_Titles extends SU_Module {
|
|
124 |
return htmlspecialchars($this->get_title_paged($post_title));
|
125 |
|
126 |
//Load post/page titles
|
|
|
127 |
$post_title = '';
|
128 |
if (is_singular()) {
|
129 |
$post = $wp_query->get_queried_object();
|
130 |
$post_title = strip_tags( apply_filters( 'single_post_title', $post->post_title ) );
|
|
|
131 |
}
|
132 |
|
133 |
//Load date-based archive titles
|
@@ -145,25 +157,67 @@ class SU_Titles extends SU_Module {
|
|
145 |
$day = date('jS', mktime(12,0,0,$monthnum,$daynum,$year));
|
146 |
$daynum = zeroise($daynum, 2);
|
147 |
|
148 |
-
//Load
|
149 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
if (is_author()) {
|
151 |
-
$
|
152 |
-
|
|
|
|
|
|
|
|
|
153 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
$variables = array(
|
156 |
'{blog}' => get_bloginfo('name')
|
|
|
157 |
, '{post}' => $post_title
|
158 |
, '{page}' => $post_title
|
159 |
-
, '{category}' =>
|
160 |
-
, '{
|
|
|
|
|
|
|
|
|
161 |
, '{daynum}' => $daynum
|
162 |
, '{day}' => $day
|
163 |
, '{monthnum}' => $monthnum
|
164 |
, '{month}' => $month
|
165 |
, '{year}' => $year
|
166 |
-
, '{author}' => $
|
|
|
|
|
|
|
|
|
|
|
167 |
, '{query}' => attribute_escape(get_search_query())
|
168 |
, '{ucquery}' => attribute_escape(ucwords(get_search_query()))
|
169 |
);
|
@@ -200,6 +254,80 @@ class SU_Titles extends SU_Module {
|
|
200 |
return $title;
|
201 |
}
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
function admin_dropdowns() {
|
204 |
return array(
|
205 |
'overview' => __('Overview', 'seo-ultimate')
|
@@ -216,7 +344,7 @@ class SU_Titles extends SU_Module {
|
|
216 |
This is an important foundation for WordPress SEO.</p></li>
|
217 |
<li><p><strong>How to use it:</strong> Title Rewriter enables recommended settings automatically, so you shouldn’t need to change anything.
|
218 |
If you do wish to edit the rewriting formats, you can do so using the textboxes below (the “Settings Help” tab includes additional information on this).
|
219 |
-
You also have the option of overriding the <code><title></code> tag of an individual post or page by using the “Title Tag” textbox that Title Rewriter adds to the post/page editors.</p></li>
|
220 |
</ul>
|
221 |
", 'seo-ultimate');
|
222 |
}
|
@@ -224,14 +352,23 @@ class SU_Titles extends SU_Module {
|
|
224 |
function admin_dropdown_settings() {
|
225 |
return __("
|
226 |
<p>Various variables, surrounded in {curly brackets}, are provided for use in the title formats.
|
227 |
-
All settings support the {blog} variable, which is replaced with the name of the blog
|
|
|
228 |
<p>Here’s information on each of the settings and its supported variables:</p>
|
229 |
<ul>
|
230 |
<li><p><strong>Blog Homepage Title</strong> — Displays on the main blog posts page.</p></li>
|
231 |
-
<li><p><strong>Post Title Format</strong> — Displays on single-post pages.
|
232 |
-
|
233 |
-
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
<li><p><strong>Day Archive Title Format</strong> — Displays on day archives. Supports these variables:</p>
|
236 |
<ul>
|
237 |
<li>{day} — The day number, with ordinal suffix, e.g. 23rd</li>
|
@@ -242,7 +379,8 @@ All settings support the {blog} variable, which is replaced with the name of the
|
|
242 |
</ul></li>
|
243 |
<li><p><strong>Month Archive Title Format</strong> — Displays on month archives. Supports {month}, {monthnum}, and {year}.</p></li>
|
244 |
<li><p><strong>Year Archive Title Format</strong> — Displays on year archives. Supports the {year} variable.</p></li>
|
245 |
-
<li><p><strong>Author Archive Title Format</strong> — Displays on author archives.
|
|
|
246 |
<li><p><strong>Search Title Format</strong> — Displays on the result pages for WordPress’s blog search function.
|
247 |
The {query} variable is replaced with the search query as-is. The {ucwords} variable returns the search query with the first letter of each word capitalized.</p></li>
|
248 |
<li><p><strong>404 Title Format</strong> — Displays whenever a URL doesn’t go anywhere.</p></li>
|
@@ -264,5 +402,18 @@ All settings support the {blog} variable, which is replaced with the name of the
|
|
264 |
|
265 |
}
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
}
|
268 |
?>
|
2 |
/**
|
3 |
* Title Rewriter Module
|
4 |
*
|
5 |
+
* @version 2.0
|
6 |
* @since 0.1
|
7 |
*/
|
8 |
|
13 |
function get_menu_title() { return __('Title Rewriter', 'seo-ultimate'); }
|
14 |
|
15 |
function init() {
|
16 |
+
add_action('template_redirect', array(&$this, 'before_header'), 0);
|
17 |
+
add_action('wp_head', array(&$this, 'after_header'), 1000);
|
18 |
+
add_filter('su_postmeta_help', array(&$this, 'postmeta_help'), 10);
|
19 |
}
|
20 |
|
21 |
function get_default_settings() {
|
55 |
}
|
56 |
|
57 |
function admin_page_contents() {
|
58 |
+
$this->admin_form_start(false, false);
|
59 |
+
$this->admin_page_tabs(array(
|
60 |
+
__('Default Formats', 'seo-ultimate') => 'admin_page_formats_tab'
|
61 |
+
, __('Posts', 'seo-ultimate') => 'admin_page_posts_tab'
|
62 |
+
, __('Pages', 'seo-ultimate') => 'admin_page_pages_tab'
|
63 |
+
));
|
64 |
+
$this->admin_form_end(false, false);
|
65 |
+
}
|
66 |
+
|
67 |
+
function admin_page_formats_tab() {
|
68 |
+
echo "<table class='form-table'>\n";
|
69 |
$this->textboxes($this->get_supported_settings(), $this->get_default_settings());
|
70 |
+
echo "</table>";
|
71 |
}
|
72 |
|
73 |
function postmeta_fields($fields) {
|
99 |
}
|
100 |
|
101 |
function before_header() {
|
102 |
+
if ($this->should_rewrite_title()) ob_start(array(&$this, 'change_title_tag'));
|
103 |
}
|
104 |
|
105 |
function after_header() {
|
134 |
return htmlspecialchars($this->get_title_paged($post_title));
|
135 |
|
136 |
//Load post/page titles
|
137 |
+
$post_id = 0;
|
138 |
$post_title = '';
|
139 |
if (is_singular()) {
|
140 |
$post = $wp_query->get_queried_object();
|
141 |
$post_title = strip_tags( apply_filters( 'single_post_title', $post->post_title ) );
|
142 |
+
$post_id = $post->ID;
|
143 |
}
|
144 |
|
145 |
//Load date-based archive titles
|
157 |
$day = date('jS', mktime(12,0,0,$monthnum,$daynum,$year));
|
158 |
$daynum = zeroise($daynum, 2);
|
159 |
|
160 |
+
//Load category titles
|
161 |
+
$cat_title = $cat_titles = $cat_desc = '';
|
162 |
+
if (is_category()) {
|
163 |
+
$cat_title = single_cat_title('', false);
|
164 |
+
$cat_desc = category_description();
|
165 |
+
} elseif (count($categories = get_the_category())) {
|
166 |
+
$cat_titles = su_lang_implode($categories, 'name');
|
167 |
+
usort($categories, '_usort_terms_by_ID');
|
168 |
+
$cat_title = $categories[0]->name;
|
169 |
+
$cat_desc = category_description($categories[0]->term_id);
|
170 |
+
}
|
171 |
+
|
172 |
+
//Load tag titles
|
173 |
+
$tag_title = $tag_desc = '';
|
174 |
+
if (is_tag()) {
|
175 |
+
$tag_title = single_tag_title('', false);
|
176 |
+
$tag_desc = tag_description();
|
177 |
+
}
|
178 |
+
|
179 |
+
//Load author titles
|
180 |
if (is_author()) {
|
181 |
+
$author_obj = $wp_query->get_queried_object();
|
182 |
+
} elseif (is_singular()) {
|
183 |
+
global $authordata;
|
184 |
+
$author_obj = $authordata;
|
185 |
+
} else {
|
186 |
+
$author_obj = null;
|
187 |
}
|
188 |
+
if ($author_obj)
|
189 |
+
$author = array(
|
190 |
+
'username' => $author_obj->user_login
|
191 |
+
, 'name' => $author_obj->display_name
|
192 |
+
, 'firstname' => get_the_author_meta('first_name', $author_obj->ID)
|
193 |
+
, 'lastname' => get_the_author_meta('last_name', $author_obj->ID)
|
194 |
+
, 'nickname' => get_the_author_meta('nickname', $author_obj->ID)
|
195 |
+
);
|
196 |
+
else
|
197 |
+
$author = array();
|
198 |
|
199 |
$variables = array(
|
200 |
'{blog}' => get_bloginfo('name')
|
201 |
+
, '{tagline}' => get_bloginfo('description')
|
202 |
, '{post}' => $post_title
|
203 |
, '{page}' => $post_title
|
204 |
+
, '{category}' => $cat_title
|
205 |
+
, '{categories}' => $cat_titles
|
206 |
+
, '{category_description}' => $cat_desc
|
207 |
+
, '{tag}' => $tag_title
|
208 |
+
, '{tag_description}' => $tag_desc
|
209 |
+
, '{tags}' => su_lang_implode(get_the_tags($post_id), 'name', true)
|
210 |
, '{daynum}' => $daynum
|
211 |
, '{day}' => $day
|
212 |
, '{monthnum}' => $monthnum
|
213 |
, '{month}' => $month
|
214 |
, '{year}' => $year
|
215 |
+
, '{author}' => $author['name']
|
216 |
+
, '{author_name}' => $author['name']
|
217 |
+
, '{author_username}' => $author['username']
|
218 |
+
, '{author_firstname}' => $author['firstname']
|
219 |
+
, '{author_lastname}' => $author['lastname']
|
220 |
+
, '{author_nickname}' => $author['nickname']
|
221 |
, '{query}' => attribute_escape(get_search_query())
|
222 |
, '{ucquery}' => attribute_escape(ucwords(get_search_query()))
|
223 |
);
|
254 |
return $title;
|
255 |
}
|
256 |
|
257 |
+
function admin_page_posts_tab() {
|
258 |
+
$this->title_editing_table('post', __('Post'), 'get_posts');
|
259 |
+
}
|
260 |
+
|
261 |
+
function admin_page_pages_tab() {
|
262 |
+
$this->title_editing_table('page', __('Page'), 'get_pages');
|
263 |
+
}
|
264 |
+
|
265 |
+
function get_id_from_settings_key($key) {
|
266 |
+
$matches = array();
|
267 |
+
if (preg_match('/([a-z]+)_([0-9]+)_([a-z]+)/', $key, $matches))
|
268 |
+
return (int)$matches[2];
|
269 |
+
|
270 |
+
return false;
|
271 |
+
}
|
272 |
+
|
273 |
+
function get_singular_title($value, $key) {
|
274 |
+
if ($id = $this->get_id_from_settings_key($key))
|
275 |
+
return $this->get_postmeta('title', $id);
|
276 |
+
|
277 |
+
return $value;
|
278 |
+
}
|
279 |
+
|
280 |
+
function save_singular_title($unused, $value, $key) {
|
281 |
+
if ($id = $this->get_id_from_settings_key($key)) {
|
282 |
+
update_post_meta($id, '_su_title', $value);
|
283 |
+
return true;
|
284 |
+
}
|
285 |
+
|
286 |
+
return false;
|
287 |
+
}
|
288 |
+
|
289 |
+
function title_editing_table($object_type, $object_type_label, $function,
|
290 |
+
$get_value_callback = 'get_singular_title', $save_value_callback = 'save_singular_title',
|
291 |
+
$num_varname = 'numberposts', $offset_varname = 'offset', $id_varname = 'ID', $title_varname = 'post_title', $edit_link_function = 'get_edit_post_link') {
|
292 |
+
|
293 |
+
$mk = $this->get_module_key();
|
294 |
+
|
295 |
+
add_filter("su_get_setting-$mk", array(&$this, $get_value_callback), 10, 2);
|
296 |
+
add_filter("su_custom_update_setting-$mk", array(&$this, $save_value_callback), 10, 3);
|
297 |
+
|
298 |
+
$headers = array( __('ID'), $object_type_label, __('Title Tag', 'seo-ultimate') );
|
299 |
+
|
300 |
+
echo <<<STR
|
301 |
+
<table class="widefat fullwidth" cellspacing="0">
|
302 |
+
<thead><tr>
|
303 |
+
<!--<th scope="col" class="$object_type-id">{$headers[0]}</th>-->
|
304 |
+
<th scope="col" class="$object_type-title">{$headers[1]}</th>
|
305 |
+
<th scope="col" class="$object_type-title-tag">{$headers[2]}</th>
|
306 |
+
</tr></thead>
|
307 |
+
<tbody>
|
308 |
+
|
309 |
+
STR;
|
310 |
+
|
311 |
+
/*if (strlen($num_varname) && strlen($offset_varname))
|
312 |
+
$args = "$num_varname=20&$offset_varname=0";
|
313 |
+
else*/
|
314 |
+
$args = '';
|
315 |
+
|
316 |
+
$objects = $function($args);
|
317 |
+
$pagination_total = ceil(count($function()) / 2);
|
318 |
+
|
319 |
+
foreach ($objects as $object) {
|
320 |
+
$id = $object->$id_varname;
|
321 |
+
$editlink = $edit_link_function($id);
|
322 |
+
$title = $object->$title_varname;
|
323 |
+
|
324 |
+
$this->textbox("{$object_type}_{$id}_title", "<a href='$editlink'>$title</a>");
|
325 |
+
}
|
326 |
+
|
327 |
+
echo "\t</tbody>\n</table>\n";
|
328 |
+
|
329 |
+
}
|
330 |
+
|
331 |
function admin_dropdowns() {
|
332 |
return array(
|
333 |
'overview' => __('Overview', 'seo-ultimate')
|
344 |
This is an important foundation for WordPress SEO.</p></li>
|
345 |
<li><p><strong>How to use it:</strong> Title Rewriter enables recommended settings automatically, so you shouldn’t need to change anything.
|
346 |
If you do wish to edit the rewriting formats, you can do so using the textboxes below (the “Settings Help” tab includes additional information on this).
|
347 |
+
You also have the option of overriding the <code><title></code> tag of an individual post or page by using the textboxes under the “Post” and “Page” tabs below, or by using the “Title Tag” textbox that Title Rewriter adds to the post/page editors.</p></li>
|
348 |
</ul>
|
349 |
", 'seo-ultimate');
|
350 |
}
|
352 |
function admin_dropdown_settings() {
|
353 |
return __("
|
354 |
<p>Various variables, surrounded in {curly brackets}, are provided for use in the title formats.
|
355 |
+
All settings support the {blog} variable, which is replaced with the name of the blog,
|
356 |
+
and the {tagline} variable, which is replaced with the blog tagline as set under <a href='options-general.php' target='_blank'>General Settings</a>.</p>
|
357 |
<p>Here’s information on each of the settings and its supported variables:</p>
|
358 |
<ul>
|
359 |
<li><p><strong>Blog Homepage Title</strong> — Displays on the main blog posts page.</p></li>
|
360 |
+
<li><p><strong>Post Title Format</strong> — Displays on single-post pages. Supports these variables:</p>
|
361 |
+
<ul>
|
362 |
+
<li>{post} — The post’s title.</li>
|
363 |
+
<li>{category} — The title of the post category with the lowest ID number.</li>
|
364 |
+
<li>{categories} — A natural-language list of the post’s categories (e.g. “Category A, Category B, and Category C”).</li>
|
365 |
+
<li>{tags} — A natural-language list of the post’s tags (e.g. “Tag A, Tag B, and Tag C”).</li>
|
366 |
+
<li>{author} — The Display Name of the post’s author.</li>
|
367 |
+
<li>{author_username}, {author_firstname}, {author_lastname}, {author_nickname} — The username, first name, last name, and nickname of the post’s author, respectively, as set in his or her profile.</li>
|
368 |
+
</ul>
|
369 |
+
<li><p><strong>Page Title Format</strong> — Displays on WordPress Pages. The {page} variable is replaced with the Page’s title. Also supports the same author variables as the Post Title Format.</p></li>
|
370 |
+
<li><p><strong>Category Title Format</strong> — Displays on category archives. The {category} variable is replaced with the name of the category, and {category_description} is replaced with its description.</p></li>
|
371 |
+
<li><p><strong>Tag Title Format</strong> — Displays on tag archives. The {tag} variable is replaced with the name of the tag, and {tag_description} is replaced with its description.</p></li>
|
372 |
<li><p><strong>Day Archive Title Format</strong> — Displays on day archives. Supports these variables:</p>
|
373 |
<ul>
|
374 |
<li>{day} — The day number, with ordinal suffix, e.g. 23rd</li>
|
379 |
</ul></li>
|
380 |
<li><p><strong>Month Archive Title Format</strong> — Displays on month archives. Supports {month}, {monthnum}, and {year}.</p></li>
|
381 |
<li><p><strong>Year Archive Title Format</strong> — Displays on year archives. Supports the {year} variable.</p></li>
|
382 |
+
<li><p><strong>Author Archive Title Format</strong> — Displays on author archives. Supports the same author variables as the Post Title Format box,
|
383 |
+
i.e. {author}, {author_username}, {author_firstname}, {author_lastname}, and {author_nickname}.</p></li>
|
384 |
<li><p><strong>Search Title Format</strong> — Displays on the result pages for WordPress’s blog search function.
|
385 |
The {query} variable is replaced with the search query as-is. The {ucwords} variable returns the search query with the first letter of each word capitalized.</p></li>
|
386 |
<li><p><strong>404 Title Format</strong> — Displays whenever a URL doesn’t go anywhere.</p></li>
|
402 |
|
403 |
}
|
404 |
|
405 |
+
} elseif ($_GET['css'] == 'admin') {
|
406 |
+
header('Content-type: text/css');
|
407 |
+
?>
|
408 |
+
|
409 |
+
#su-titles table.widefat {
|
410 |
+
width: auto;
|
411 |
+
}
|
412 |
+
|
413 |
+
#su-titles table.widefat td input.regular-text {
|
414 |
+
width: 400px;
|
415 |
+
}
|
416 |
+
|
417 |
+
<?php
|
418 |
}
|
419 |
?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: SEO Design Solutions
|
|
3 |
Tags: seo, title, meta, noindex, canonical, 404, robots.txt, htaccess, slugs, url, google, yahoo, bing, search engines, admin, post, page, modules
|
4 |
Requires at least: 2.7
|
5 |
Tested up to: 2.8.4
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
This all-in-one SEO plugin can handle titles, noindex, meta data, slugs, canonical tags, 404 error tracking, and more (with many more features coming soon).
|
9 |
|
@@ -11,7 +11,7 @@ This all-in-one SEO plugin can handle titles, noindex, meta data, slugs, canonic
|
|
11 |
|
12 |
SEO Ultimate is an all-in-one [SEO](http://www.seodesignsolutions.com/) plugin with these features:
|
13 |
|
14 |
-
* **Title Rewriter** - Lets you format the `<title>` tags of posts, pages, categories, tags, archives, search results, the blog homepage, and more.
|
15 |
|
16 |
* **Noindex Manager** - Lets you add the `noindex` meta robots instruction to archives, comment feeds, the login page, and more.
|
17 |
|
@@ -35,7 +35,7 @@ SEO Ultimate was developed with WordPress plugin "best practices" in mind:
|
|
35 |
* Internationalization support
|
36 |
* Nonce security
|
37 |
* An uninstall routine
|
38 |
-
*
|
39 |
* Settings import/export/reset functionality
|
40 |
|
41 |
|
@@ -192,6 +192,14 @@ Yes. WordPress plugins are supposed to delete their settings during the uninstal
|
|
192 |
|
193 |
== Changelog ==
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
= Version 1.0 (September 21, 2009) =
|
196 |
* Feature: Canonicalizer can now redirect requests for nonexistent pagination
|
197 |
* Feature: Visitor logging can now be disabled completely from the Plugin Settings page
|
3 |
Tags: seo, title, meta, noindex, canonical, 404, robots.txt, htaccess, slugs, url, google, yahoo, bing, search engines, admin, post, page, modules
|
4 |
Requires at least: 2.7
|
5 |
Tested up to: 2.8.4
|
6 |
+
Stable tag: 1.1
|
7 |
|
8 |
This all-in-one SEO plugin can handle titles, noindex, meta data, slugs, canonical tags, 404 error tracking, and more (with many more features coming soon).
|
9 |
|
11 |
|
12 |
SEO Ultimate is an all-in-one [SEO](http://www.seodesignsolutions.com/) plugin with these features:
|
13 |
|
14 |
+
* **Title Rewriter** - Lets you format the `<title>` tags of posts, pages, categories, tags, archives, search results, the blog homepage, and more. Also includes a mass-editor for post/page <title> tags.
|
15 |
|
16 |
* **Noindex Manager** - Lets you add the `noindex` meta robots instruction to archives, comment feeds, the login page, and more.
|
17 |
|
35 |
* Internationalization support
|
36 |
* Nonce security
|
37 |
* An uninstall routine
|
38 |
+
* Icon support for the new WordPress 2.7+ menu
|
39 |
* Settings import/export/reset functionality
|
40 |
|
41 |
|
192 |
|
193 |
== Changelog ==
|
194 |
|
195 |
+
= Version 1.1 (October 7, 2009) =
|
196 |
+
* Feature: You can now mass-edit post/page titles from the Title Rewriter module
|
197 |
+
* Bugfix: Fixed a variety of bugs that only appear on PHP4 setups
|
198 |
+
* Bugfix: Fixed logo background color in the Whitepapers module
|
199 |
+
* Improvement: Title Rewriter now supports 10 additional title format variables
|
200 |
+
* Improvement: Added internationalization support for admin menu notice numbers
|
201 |
+
* Improvement: Certain third-party plugin notices are now removed from SEO Ultimate's admin pages
|
202 |
+
|
203 |
= Version 1.0 (September 21, 2009) =
|
204 |
* Feature: Canonicalizer can now redirect requests for nonexistent pagination
|
205 |
* Feature: Visitor logging can now be disabled completely from the Plugin Settings page
|
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 can rewrite title tags, set meta data, add noindex, insert canonical tags, log 404 errors, edit your robots.txt, and more.
|
6 |
-
Version: 1.
|
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 1.
|
16 |
* @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
|
17 |
*/
|
18 |
|
@@ -38,10 +38,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
38 |
//Reading plugin info from constants is faster than trying to parse it from the header above.
|
39 |
define("SU_PLUGIN_NAME", "SEO Ultimate");
|
40 |
define("SU_PLUGIN_URI", "http://www.seodesignsolutions.com/wordpress-seo/");
|
41 |
-
define("SU_VERSION", "1.
|
42 |
define("SU_AUTHOR", "SEO Design Solutions");
|
43 |
define("SU_AUTHOR_URI", "http://www.seodesignsolutions.com/");
|
44 |
-
define("SU_USER_AGENT", "SeoUltimate/1.
|
45 |
|
46 |
define('SU_MODULE_ENABLED', 10);
|
47 |
define('SU_MODULE_SILENCED', 5);
|
@@ -62,7 +62,7 @@ require('class.su-hitset.php');
|
|
62 |
|
63 |
/********** PLUGIN FILE LOAD HANDLER **********/
|
64 |
|
65 |
-
//If we're running WordPress, then initialize the main class
|
66 |
//Or, show a blank page on direct load.
|
67 |
|
68 |
global $seo_ultimate;
|
3 |
Plugin Name: SEO Ultimate
|
4 |
Plugin URI: http://www.seodesignsolutions.com/wordpress-seo/
|
5 |
Description: This all-in-one SEO plugin can rewrite title tags, set meta data, add noindex, insert canonical tags, log 404 errors, edit your robots.txt, and more.
|
6 |
+
Version: 1.1
|
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 1.1
|
16 |
* @link http://www.seodesignsolutions.com/wordpress-seo/ SEO Ultimate Homepage
|
17 |
*/
|
18 |
|
38 |
//Reading plugin info from constants is faster than trying to parse it from the header above.
|
39 |
define("SU_PLUGIN_NAME", "SEO Ultimate");
|
40 |
define("SU_PLUGIN_URI", "http://www.seodesignsolutions.com/wordpress-seo/");
|
41 |
+
define("SU_VERSION", "1.1");
|
42 |
define("SU_AUTHOR", "SEO Design Solutions");
|
43 |
define("SU_AUTHOR_URI", "http://www.seodesignsolutions.com/");
|
44 |
+
define("SU_USER_AGENT", "SeoUltimate/1.1");
|
45 |
|
46 |
define('SU_MODULE_ENABLED', 10);
|
47 |
define('SU_MODULE_SILENCED', 5);
|
62 |
|
63 |
/********** PLUGIN FILE LOAD HANDLER **********/
|
64 |
|
65 |
+
//If we're running WordPress, then initialize the main class loaded above.
|
66 |
//Or, show a blank page on direct load.
|
67 |
|
68 |
global $seo_ultimate;
|
seo-ultimate.pot
CHANGED
@@ -5,43 +5,43 @@
|
|
5 |
#, fuzzy
|
6 |
msgid ""
|
7 |
msgstr ""
|
8 |
-
"Project-Id-Version: SEO Ultimate
|
9 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/seo-ultimate\n"
|
10 |
"POT-Creation-Date: 2009-07-23 22:19+0000\n"
|
11 |
"MIME-Version: 1.0\n"
|
12 |
"Content-Type: text/plain; charset=utf-8\n"
|
13 |
"Content-Transfer-Encoding: 8bit\n"
|
14 |
|
15 |
-
#. #-#-#-#-# seo-ultimate.pot (SEO Ultimate
|
16 |
#. Plugin Name of an extension
|
17 |
-
#: class.seo-ultimate.php:
|
18 |
msgid "SEO Ultimate"
|
19 |
msgstr ""
|
20 |
|
21 |
-
#: class.seo-ultimate.php:
|
22 |
msgid "SEO"
|
23 |
msgstr ""
|
24 |
|
25 |
-
#: class.seo-ultimate.php:
|
26 |
msgid "SEO Settings Help"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: class.seo-ultimate.php:
|
30 |
msgid "The SEO Settings box lets you customize these settings:"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: class.seo-ultimate.php:
|
34 |
msgid "(The SEO Settings box is part of the SEO Ultimate plugin.)"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: class.seo-ultimate.php:
|
38 |
#, php-format
|
39 |
msgid ""
|
40 |
"SEO Ultimate includes the functionality of %1$s. You may want to deactivate %"
|
41 |
"1$s to avoid plugin conflicts."
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: class.seo-ultimate.php:
|
45 |
msgid "SEO Settings"
|
46 |
msgstr ""
|
47 |
|
@@ -78,43 +78,57 @@ msgstr ""
|
|
78 |
msgid "%1$s<br />%2$s"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: class.su-module.php:
|
82 |
#, php-format
|
83 |
msgid "%s %s|Dropdown Title"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: class.su-module.php:
|
87 |
#, php-format
|
88 |
msgid "%s Documentation"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: class.su-module.php:
|
92 |
msgid "Documentation"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: class.su-module.php:
|
96 |
#, php-format
|
97 |
msgid "%1$s | %2$s %3$s by %4$s"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: class.su-module.php:
|
101 |
msgid "Settings updated."
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: class.su-module.php:
|
105 |
msgid "Save Changes"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: class.su-module.php:
|
109 |
msgid ""
|
110 |
"Are you sure you want to replace the textbox contents with this default "
|
111 |
"value?"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: class.su-module.php:
|
115 |
msgid "Reset"
|
116 |
msgstr ""
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
#: modules/404s.php:29
|
119 |
msgid "404 Monitor"
|
120 |
msgstr ""
|
@@ -168,7 +182,7 @@ msgstr ""
|
|
168 |
|
169 |
#: modules/404s.php:117 modules/canonical.php:183 modules/files.php:140
|
170 |
#: modules/linkbox.php:90 modules/meta.php:140 modules/noindex.php:94
|
171 |
-
#: modules/slugs.php:61 modules/titles.php:
|
172 |
msgid "Overview"
|
173 |
msgstr ""
|
174 |
|
@@ -270,15 +284,20 @@ msgid ""
|
|
270 |
"\r\n"
|
271 |
"\t\tThe <code><link rel="canonical" /></code> tags setting "
|
272 |
"improves on the canonical tags feature of WordPress 2.9 and above by "
|
273 |
-
"encompassing much more of your site than just your posts and Pages
|
274 |
-
"\t\
|
275 |
"WordPress’s built-in canonicalization functionality: \r\n"
|
276 |
"\t\tfor example, if a URL request is made for page 6 of a category archive, "
|
277 |
"and that category doesn’t have a page 6,\r\n"
|
278 |
-
"\t\tthen
|
279 |
-
"
|
280 |
-
"
|
281 |
-
"\t\
|
|
|
|
|
|
|
|
|
|
|
282 |
"redirects to page 1 of the paginated section in question.</p></li>\r\n"
|
283 |
"\t<li><p><strong>Why it helps:</strong> These features will point Google to "
|
284 |
"the correct URL for your homepage and each of your posts, Pages, categories, "
|
@@ -825,13 +844,19 @@ msgstr ""
|
|
825 |
msgid "Whitepapers"
|
826 |
msgstr ""
|
827 |
|
|
|
|
|
828 |
#: modules/sds-blog.php:42
|
|
|
|
|
|
|
|
|
829 |
msgid ""
|
830 |
"Search engine optimization articles from the company behind the SEO Ultimate "
|
831 |
"plugin."
|
832 |
msgstr ""
|
833 |
|
834 |
-
#: modules/sds-blog.php:
|
835 |
msgid ""
|
836 |
"The articles below are loaded from the SEO Design Solutions website. Click "
|
837 |
"on an article’s title to read it."
|
@@ -1142,15 +1167,43 @@ msgstr ""
|
|
1142 |
msgid "Pagination Title Format"
|
1143 |
msgstr ""
|
1144 |
|
1145 |
-
#: modules/titles.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1146 |
msgid "Title Tag:"
|
1147 |
msgstr ""
|
1148 |
|
1149 |
-
#: modules/titles.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1150 |
msgid "Settings & Variables"
|
1151 |
msgstr ""
|
1152 |
|
1153 |
-
#: modules/titles.php:
|
1154 |
msgid ""
|
1155 |
"\r\n"
|
1156 |
"<ul>\r\n"
|
@@ -1168,34 +1221,55 @@ msgid ""
|
|
1168 |
"textboxes below (the “Settings Help” tab includes additional "
|
1169 |
"information on this).\r\n"
|
1170 |
"\t\tYou also have the option of overriding the <code><title></code> "
|
1171 |
-
"tag of an individual post or page by using the “
|
1172 |
-
"
|
|
|
|
|
1173 |
"</ul>\r\n"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
-
#: modules/titles.php:
|
1177 |
msgid ""
|
1178 |
"\r\n"
|
1179 |
"<p>Various variables, surrounded in {curly brackets}, are provided for use "
|
1180 |
"in the title formats.\r\n"
|
1181 |
"All settings support the {blog} variable, which is replaced with the name of "
|
1182 |
-
"the blog
|
|
|
|
|
|
|
1183 |
"<p>Here’s information on each of the settings and its supported "
|
1184 |
"variables:</p>\r\n"
|
1185 |
"<ul>\r\n"
|
1186 |
"\t<li><p><strong>Blog Homepage Title</strong> — Displays on the main "
|
1187 |
"blog posts page.</p></li>\r\n"
|
1188 |
"\t<li><p><strong>Post Title Format</strong> — Displays on single-post "
|
1189 |
-
"pages.
|
|
|
|
|
|
|
|
|
|
|
|
|
1190 |
"\r\n"
|
1191 |
-
"\t<li
|
1192 |
-
"
|
|
|
|
|
|
|
|
|
|
|
1193 |
"\r\n"
|
|
|
|
|
|
|
|
|
1194 |
"\t<li><p><strong>Category Title Format</strong> — Displays on category "
|
1195 |
-
"archives. The {category} variable is replaced with the name of the category
|
1196 |
-
"
|
1197 |
"\t<li><p><strong>Tag Title Format</strong> — Displays on tag archives. "
|
1198 |
-
"The {tag} variable is replaced with the name of the tag
|
|
|
1199 |
"\t<li><p><strong>Day Archive Title Format</strong> — Displays on day "
|
1200 |
"archives. Supports these variables:</p>\r\n"
|
1201 |
"\t\t<ul>\r\n"
|
@@ -1212,8 +1286,10 @@ msgid ""
|
|
1212 |
"\t<li><p><strong>Year Archive Title Format</strong> — Displays on year "
|
1213 |
"archives. Supports the {year} variable.</p></li>\r\n"
|
1214 |
"\t<li><p><strong>Author Archive Title Format</strong> — Displays on "
|
1215 |
-
"author archives.
|
1216 |
-
"
|
|
|
|
|
1217 |
"\t<li><p><strong>Search Title Format</strong> — Displays on the result "
|
1218 |
"pages for WordPress’s blog search function.\r\n"
|
1219 |
"\t\tThe {query} variable is replaced with the search query as-is. The "
|
@@ -1234,7 +1310,7 @@ msgid ""
|
|
1234 |
"</ul>\r\n"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
-
#: modules/titles.php:
|
1238 |
msgid ""
|
1239 |
"<strong>Title Tag</strong> — The exact contents of the <title> "
|
1240 |
"tag. The title appears in visitors' title bars and in search engine result "
|
@@ -1252,10 +1328,6 @@ msgid ""
|
|
1252 |
"more."
|
1253 |
msgstr ""
|
1254 |
|
1255 |
-
#. Author of an extension
|
1256 |
-
msgid "SEO Design Solutions"
|
1257 |
-
msgstr ""
|
1258 |
-
|
1259 |
#. Author URI of an extension
|
1260 |
msgid "http://www.seodesignsolutions.com/"
|
1261 |
msgstr ""
|
5 |
#, fuzzy
|
6 |
msgid ""
|
7 |
msgstr ""
|
8 |
+
"Project-Id-Version: SEO Ultimate 1.1\n"
|
9 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/seo-ultimate\n"
|
10 |
"POT-Creation-Date: 2009-07-23 22:19+0000\n"
|
11 |
"MIME-Version: 1.0\n"
|
12 |
"Content-Type: text/plain; charset=utf-8\n"
|
13 |
"Content-Transfer-Encoding: 8bit\n"
|
14 |
|
15 |
+
#. #-#-#-#-# seo-ultimate.pot (SEO Ultimate 1.1) #-#-#-#-#
|
16 |
#. Plugin Name of an extension
|
17 |
+
#: class.seo-ultimate.php:704 modules/settings.php:16
|
18 |
msgid "SEO Ultimate"
|
19 |
msgstr ""
|
20 |
|
21 |
+
#: class.seo-ultimate.php:704
|
22 |
msgid "SEO"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: class.seo-ultimate.php:917
|
26 |
msgid "SEO Settings Help"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: class.seo-ultimate.php:919
|
30 |
msgid "The SEO Settings box lets you customize these settings:"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: class.seo-ultimate.php:921
|
34 |
msgid "(The SEO Settings box is part of the SEO Ultimate plugin.)"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: class.seo-ultimate.php:976
|
38 |
#, php-format
|
39 |
msgid ""
|
40 |
"SEO Ultimate includes the functionality of %1$s. You may want to deactivate %"
|
41 |
"1$s to avoid plugin conflicts."
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: class.seo-ultimate.php:1069
|
45 |
msgid "SEO Settings"
|
46 |
msgstr ""
|
47 |
|
78 |
msgid "%1$s<br />%2$s"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: class.su-module.php:530
|
82 |
#, php-format
|
83 |
msgid "%s %s|Dropdown Title"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: class.su-module.php:542
|
87 |
#, php-format
|
88 |
msgid "%s Documentation"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: class.su-module.php:546
|
92 |
msgid "Documentation"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: class.su-module.php:564
|
96 |
#, php-format
|
97 |
msgid "%1$s | %2$s %3$s by %4$s"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: class.su-module.php:598
|
101 |
msgid "Settings updated."
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: class.su-module.php:618
|
105 |
msgid "Save Changes"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: class.su-module.php:734
|
109 |
msgid ""
|
110 |
"Are you sure you want to replace the textbox contents with this default "
|
111 |
"value?"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: class.su-module.php:749
|
115 |
msgid "Reset"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: functions.php:133
|
119 |
+
#, php-format
|
120 |
+
msgid "%s and %s"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: functions.php:136
|
124 |
+
msgid ", "
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: functions.php:137
|
128 |
+
#, php-format
|
129 |
+
msgid "%s, and %s"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
#: modules/404s.php:29
|
133 |
msgid "404 Monitor"
|
134 |
msgstr ""
|
182 |
|
183 |
#: modules/404s.php:117 modules/canonical.php:183 modules/files.php:140
|
184 |
#: modules/linkbox.php:90 modules/meta.php:140 modules/noindex.php:94
|
185 |
+
#: modules/slugs.php:61 modules/titles.php:333
|
186 |
msgid "Overview"
|
187 |
msgstr ""
|
188 |
|
284 |
"\r\n"
|
285 |
"\t\tThe <code><link rel="canonical" /></code> tags setting "
|
286 |
"improves on the canonical tags feature of WordPress 2.9 and above by "
|
287 |
+
"encompassing much more of your site than just your posts and Pages.</p>\r\n"
|
288 |
+
"\t\t<p>The nonexistent pagination redirect feature fills a gap in "
|
289 |
"WordPress’s built-in canonicalization functionality: \r\n"
|
290 |
"\t\tfor example, if a URL request is made for page 6 of a category archive, "
|
291 |
"and that category doesn’t have a page 6,\r\n"
|
292 |
+
"\t\tthen by default, depending on the context, WordPress will display a "
|
293 |
+
"blank page, or it will display the content of the closest page number "
|
294 |
+
"available, \r\n"
|
295 |
+
"\t\twithout issuing a 404 error or a 301 redirect (thus creating two or more "
|
296 |
+
"identical webpages). \r\n"
|
297 |
+
"\t\tThis duplicate-content situation can happen when you, for example, "
|
298 |
+
"remove many posts from a category, thus reducing the amount of pagination "
|
299 |
+
"needed in the category’s archive. \r\n"
|
300 |
+
"\t\tThe Canonicalizer’s feature fixes that behavior by issuing 301 "
|
301 |
"redirects to page 1 of the paginated section in question.</p></li>\r\n"
|
302 |
"\t<li><p><strong>Why it helps:</strong> These features will point Google to "
|
303 |
"the correct URL for your homepage and each of your posts, Pages, categories, "
|
844 |
msgid "Whitepapers"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#. #-#-#-#-# plugin.pot (PACKAGE VERSION) #-#-#-#-#
|
848 |
+
#. Author of an extension
|
849 |
#: modules/sds-blog.php:42
|
850 |
+
msgid "SEO Design Solutions"
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#: modules/sds-blog.php:43
|
854 |
msgid ""
|
855 |
"Search engine optimization articles from the company behind the SEO Ultimate "
|
856 |
"plugin."
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: modules/sds-blog.php:94
|
860 |
msgid ""
|
861 |
"The articles below are loaded from the SEO Design Solutions website. Click "
|
862 |
"on an article’s title to read it."
|
1167 |
msgid "Pagination Title Format"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
+
#: modules/titles.php:60
|
1171 |
+
msgid "Default Formats"
|
1172 |
+
msgstr ""
|
1173 |
+
|
1174 |
+
#: modules/titles.php:61
|
1175 |
+
msgid "Posts"
|
1176 |
+
msgstr ""
|
1177 |
+
|
1178 |
+
#: modules/titles.php:62
|
1179 |
+
msgid "Pages"
|
1180 |
+
msgstr ""
|
1181 |
+
|
1182 |
+
#: modules/titles.php:74
|
1183 |
msgid "Title Tag:"
|
1184 |
msgstr ""
|
1185 |
|
1186 |
+
#: modules/titles.php:258
|
1187 |
+
msgid "Post"
|
1188 |
+
msgstr ""
|
1189 |
+
|
1190 |
+
#: modules/titles.php:262
|
1191 |
+
msgid "Page"
|
1192 |
+
msgstr ""
|
1193 |
+
|
1194 |
+
#: modules/titles.php:298
|
1195 |
+
msgid "ID"
|
1196 |
+
msgstr ""
|
1197 |
+
|
1198 |
+
#: modules/titles.php:298
|
1199 |
+
msgid "Title Tag"
|
1200 |
+
msgstr ""
|
1201 |
+
|
1202 |
+
#: modules/titles.php:334
|
1203 |
msgid "Settings & Variables"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
+
#: modules/titles.php:339
|
1207 |
msgid ""
|
1208 |
"\r\n"
|
1209 |
"<ul>\r\n"
|
1221 |
"textboxes below (the “Settings Help” tab includes additional "
|
1222 |
"information on this).\r\n"
|
1223 |
"\t\tYou also have the option of overriding the <code><title></code> "
|
1224 |
+
"tag of an individual post or page by using the textboxes under the “"
|
1225 |
+
"Post” and “Page” tabs below, or by using the “Title "
|
1226 |
+
"Tag” textbox that Title Rewriter adds to the post/page editors.</p></"
|
1227 |
+
"li>\r\n"
|
1228 |
"</ul>\r\n"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: modules/titles.php:353
|
1232 |
msgid ""
|
1233 |
"\r\n"
|
1234 |
"<p>Various variables, surrounded in {curly brackets}, are provided for use "
|
1235 |
"in the title formats.\r\n"
|
1236 |
"All settings support the {blog} variable, which is replaced with the name of "
|
1237 |
+
"the blog, \r\n"
|
1238 |
+
"and the {tagline} variable, which is replaced with the blog tagline as set "
|
1239 |
+
"under <a href='options-general.php' target='_blank'>General Settings</"
|
1240 |
+
"a>.</p>\r\n"
|
1241 |
"<p>Here’s information on each of the settings and its supported "
|
1242 |
"variables:</p>\r\n"
|
1243 |
"<ul>\r\n"
|
1244 |
"\t<li><p><strong>Blog Homepage Title</strong> — Displays on the main "
|
1245 |
"blog posts page.</p></li>\r\n"
|
1246 |
"\t<li><p><strong>Post Title Format</strong> — Displays on single-post "
|
1247 |
+
"pages. Supports these variables:</p>\r\n"
|
1248 |
+
"\t\t<ul>\r\n"
|
1249 |
+
"\t\t\t<li>{post} — The post’s title.</li>\r\n"
|
1250 |
+
"\t\t\t<li>{category} — The title of the post category with the lowest "
|
1251 |
+
"ID number.</li>\r\n"
|
1252 |
+
"\t\t\t<li>{categories} — A natural-language list of the post’s "
|
1253 |
+
"categories (e.g. “Category A, Category B, and Category C”).</li>"
|
1254 |
"\r\n"
|
1255 |
+
"\t\t\t<li>{tags} — A natural-language list of the post’s tags (e."
|
1256 |
+
"g. “Tag A, Tag B, and Tag C”).</li>\r\n"
|
1257 |
+
"\t\t\t<li>{author} — The Display Name of the post’s author.</li>"
|
1258 |
+
"\r\n"
|
1259 |
+
"\t\t\t<li>{author_username}, {author_firstname}, {author_lastname}, "
|
1260 |
+
"{author_nickname} — The username, first name, last name, and nickname "
|
1261 |
+
"of the post’s author, respectively, as set in his or her profile.</li>"
|
1262 |
"\r\n"
|
1263 |
+
"\t\t</ul>\r\n"
|
1264 |
+
"\t<li><p><strong>Page Title Format</strong> — Displays on WordPress "
|
1265 |
+
"Pages. The {page} variable is replaced with the Page’s title. Also "
|
1266 |
+
"supports the same author variables as the Post Title Format.</p></li>\r\n"
|
1267 |
"\t<li><p><strong>Category Title Format</strong> — Displays on category "
|
1268 |
+
"archives. The {category} variable is replaced with the name of the category, "
|
1269 |
+
"and {category_description} is replaced with its description.</p></li>\r\n"
|
1270 |
"\t<li><p><strong>Tag Title Format</strong> — Displays on tag archives. "
|
1271 |
+
"The {tag} variable is replaced with the name of the tag, and "
|
1272 |
+
"{tag_description} is replaced with its description.</p></li>\r\n"
|
1273 |
"\t<li><p><strong>Day Archive Title Format</strong> — Displays on day "
|
1274 |
"archives. Supports these variables:</p>\r\n"
|
1275 |
"\t\t<ul>\r\n"
|
1286 |
"\t<li><p><strong>Year Archive Title Format</strong> — Displays on year "
|
1287 |
"archives. Supports the {year} variable.</p></li>\r\n"
|
1288 |
"\t<li><p><strong>Author Archive Title Format</strong> — Displays on "
|
1289 |
+
"author archives. Supports the same author variables as the Post Title Format "
|
1290 |
+
"box, \r\n"
|
1291 |
+
"\t\ti.e. {author}, {author_username}, {author_firstname}, {author_lastname}, "
|
1292 |
+
"and {author_nickname}.</p></li>\r\n"
|
1293 |
"\t<li><p><strong>Search Title Format</strong> — Displays on the result "
|
1294 |
"pages for WordPress’s blog search function.\r\n"
|
1295 |
"\t\tThe {query} variable is replaced with the search query as-is. The "
|
1310 |
"</ul>\r\n"
|
1311 |
msgstr ""
|
1312 |
|
1313 |
+
#: modules/titles.php:398
|
1314 |
msgid ""
|
1315 |
"<strong>Title Tag</strong> — The exact contents of the <title> "
|
1316 |
"tag. The title appears in visitors' title bars and in search engine result "
|
1328 |
"more."
|
1329 |
msgstr ""
|
1330 |
|
|
|
|
|
|
|
|
|
1331 |
#. Author URI of an extension
|
1332 |
msgid "http://www.seodesignsolutions.com/"
|
1333 |
msgstr ""
|
tabs.js
CHANGED
@@ -32,7 +32,7 @@ function su_init_tabs()
|
|
32 |
|
33 |
/* handler for openeing the last tab after submit (compability version) */
|
34 |
jQuery('#su-tabset ul a').click(function(i){
|
35 |
-
var form = jQuery('#
|
36 |
var action = form.attr("action").split('#', 1) + jQuery(this).attr('href');
|
37 |
// an older bug pops up with some jQuery version(s), which makes it
|
38 |
// necessary to set the form's action attribute by standard javascript
|
32 |
|
33 |
/* handler for openeing the last tab after submit (compability version) */
|
34 |
jQuery('#su-tabset ul a').click(function(i){
|
35 |
+
var form = jQuery('#su-admin-form');
|
36 |
var action = form.attr("action").split('#', 1) + jQuery(this).attr('href');
|
37 |
// an older bug pops up with some jQuery version(s), which makes it
|
38 |
// necessary to set the form's action attribute by standard javascript
|