Version Description
Use Javascript for Return To Top link to make it work on HTML5 sites, and strengthen CSS to ensure footer copyright and trademark widgets are full width
Download this release
Release Info
Developer | powerblogservice |
Plugin | Footer Putter |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.5
- classes/footer-credits-admin.php +1 -5
- classes/footer-credits.php +4 -6
- main.php +3 -3
- readme.txt +10 -3
- screenshot-1.jpg +0 -0
- styles/footer-credits.css +12 -7
classes/footer-credits-admin.php
CHANGED
@@ -10,7 +10,7 @@ class FooterCreditsAdmin {
|
|
10 |
private static $slug;
|
11 |
private static $screen_id;
|
12 |
private static $keys = array('owner', 'site', 'address', 'country', 'telephone',
|
13 |
-
'email', 'courts', 'updated', 'copyright_start_year', 'return_text', '
|
14 |
'footer_class','footer_hook','footer_remove','footer_filter_hook','enable_html5');
|
15 |
private static $tips = array(
|
16 |
'owner' => array('heading' => 'Owner or Business Name', 'tip' => 'Enter the name of the legal entity that owns and operates the site.'),
|
@@ -22,7 +22,6 @@ class FooterCreditsAdmin {
|
|
22 |
'updated' => array('heading' => 'Last Updated' , 'tip' => 'This will be defaulted as today. For example, Oct 23rd, 2012'),
|
23 |
'copyright_start_year' => array('heading' => 'Copyright Start' , 'tip' => 'The start year of the business appears in the copyright statement in the footer and an on the Terms and Conditions page.'),
|
24 |
'return_text' => array('heading' => 'Link Text' , 'tip' => 'The text of the Return To Top link. For example, <i>Return To Top</i> or <i>Back To Top</i>.'),
|
25 |
-
'return_href' => array('heading' => 'Link Anchor' , 'tip' => 'The destination of the Return To Top link. This depends on our theme and also whether you want to go to the top of the page or the top of the content section. Typical values are #content, #header, #top, #page, #wrap or #container.'),
|
26 |
'return_class' => array('heading' => 'Return To Top Class' , 'tip' => 'Add any custom class you want to apply to the Return To Top link.'),
|
27 |
'footer_class' => array('heading' => 'Footer Class' , 'tip' => 'Add any custom class you want to apply to the footer. The plugin comes with a class <i>white</i> that marks the text in the footer white. This is useful where the footer background is a dark color.'),
|
28 |
'footer_hook' => array('heading' => 'Footer Action Hook' , 'tip' => 'The hook where the footer widget area is added to the page. This field is only required if the theme does not already provide a suitable widget area where the footer widgets can be added.'),
|
@@ -116,7 +115,6 @@ class FooterCreditsAdmin {
|
|
116 |
if (call_user_func(array(self::FOOTER, 'is_terms_key'),$option))
|
117 |
$options['terms'][$option] = $val;
|
118 |
else switch($option) {
|
119 |
-
case 'return_href': $options[$option] = '#'.preg_replace('/\W/','',$val); break;
|
120 |
case 'footer_remove' : $options[$option] = !empty($val); break;
|
121 |
case 'footer_hook':
|
122 |
case 'footer_filter_hook': $options[$option] = preg_replace('/\W/','',$val); break;
|
@@ -197,10 +195,8 @@ LEGAL_PANEL;
|
|
197 |
public static function return_panel($post,$metabox){
|
198 |
$options = $metabox['args']['options'];
|
199 |
$tip1 = self::$tooltips->tip('return_text');
|
200 |
-
$tip2 = self::$tooltips->tip('return_href');
|
201 |
print <<< RETURN_PANEL
|
202 |
<label>{$tip1}</label><input type="text" name="return_text" size="20" value="{$options['return_text']}" /><br/>
|
203 |
-
<label>{$tip2}</label><input type="text" name="return_href" size="20" value="{$options['return_href']}" /><br/>
|
204 |
RETURN_PANEL;
|
205 |
}
|
206 |
|
10 |
private static $slug;
|
11 |
private static $screen_id;
|
12 |
private static $keys = array('owner', 'site', 'address', 'country', 'telephone',
|
13 |
+
'email', 'courts', 'updated', 'copyright_start_year', 'return_text', 'return_class',
|
14 |
'footer_class','footer_hook','footer_remove','footer_filter_hook','enable_html5');
|
15 |
private static $tips = array(
|
16 |
'owner' => array('heading' => 'Owner or Business Name', 'tip' => 'Enter the name of the legal entity that owns and operates the site.'),
|
22 |
'updated' => array('heading' => 'Last Updated' , 'tip' => 'This will be defaulted as today. For example, Oct 23rd, 2012'),
|
23 |
'copyright_start_year' => array('heading' => 'Copyright Start' , 'tip' => 'The start year of the business appears in the copyright statement in the footer and an on the Terms and Conditions page.'),
|
24 |
'return_text' => array('heading' => 'Link Text' , 'tip' => 'The text of the Return To Top link. For example, <i>Return To Top</i> or <i>Back To Top</i>.'),
|
|
|
25 |
'return_class' => array('heading' => 'Return To Top Class' , 'tip' => 'Add any custom class you want to apply to the Return To Top link.'),
|
26 |
'footer_class' => array('heading' => 'Footer Class' , 'tip' => 'Add any custom class you want to apply to the footer. The plugin comes with a class <i>white</i> that marks the text in the footer white. This is useful where the footer background is a dark color.'),
|
27 |
'footer_hook' => array('heading' => 'Footer Action Hook' , 'tip' => 'The hook where the footer widget area is added to the page. This field is only required if the theme does not already provide a suitable widget area where the footer widgets can be added.'),
|
115 |
if (call_user_func(array(self::FOOTER, 'is_terms_key'),$option))
|
116 |
$options['terms'][$option] = $val;
|
117 |
else switch($option) {
|
|
|
118 |
case 'footer_remove' : $options[$option] = !empty($val); break;
|
119 |
case 'footer_hook':
|
120 |
case 'footer_filter_hook': $options[$option] = preg_replace('/\W/','',$val); break;
|
195 |
public static function return_panel($post,$metabox){
|
196 |
$options = $metabox['args']['options'];
|
197 |
$tip1 = self::$tooltips->tip('return_text');
|
|
|
198 |
print <<< RETURN_PANEL
|
199 |
<label>{$tip1}</label><input type="text" name="return_text" size="20" value="{$options['return_text']}" /><br/>
|
|
|
200 |
RETURN_PANEL;
|
201 |
}
|
202 |
|
classes/footer-credits.php
CHANGED
@@ -5,7 +5,7 @@ class FooterCredits {
|
|
5 |
const CODE = 'footer-credits'; //element prefix
|
6 |
const OPTIONS_NAME = 'footer_credits_options';
|
7 |
const SIDEBAR_ID = 'last-footer';
|
8 |
-
const VERSION = '1.
|
9 |
private static $version;
|
10 |
protected static $options = array();
|
11 |
protected static $defaults = array(
|
@@ -29,7 +29,6 @@ class FooterCredits {
|
|
29 |
'show_address' => true,
|
30 |
'show_return' => true,
|
31 |
'return_text' => 'Return To Top',
|
32 |
-
'return_href' => '#header',
|
33 |
'return_class' => '',
|
34 |
'footer_class' => '',
|
35 |
'footer_hook' => '',
|
@@ -215,9 +214,8 @@ class FooterCredits {
|
|
215 |
return self::filter_links(wp_nav_menu(array('menu' => $menu, 'echo' => false, 'container' => false)));
|
216 |
}
|
217 |
|
218 |
-
static function return_to_top( $text, $
|
219 |
-
|
220 |
-
return sprintf( '<div class="%1$s"><a href="%2$s" rel="nofollow">%3$s</a></div>', trim($class), esc_url( $href), $text);
|
221 |
}
|
222 |
|
223 |
|
@@ -240,7 +238,7 @@ class FooterCredits {
|
|
240 |
$telephone = self::get_term('telephone');
|
241 |
$address = self::get_term('address');
|
242 |
return (empty($params['show_return']) ? '' :
|
243 |
-
self::return_to_top($params['return_text'], $params['
|
244 |
sprintf('<div id="%1$s" class="%2$s">%3$s%4$s%5$s%6$s</div>%7$s<!-- end #%1$s -->',
|
245 |
self::CODE,
|
246 |
$params['footer_class'],
|
5 |
const CODE = 'footer-credits'; //element prefix
|
6 |
const OPTIONS_NAME = 'footer_credits_options';
|
7 |
const SIDEBAR_ID = 'last-footer';
|
8 |
+
const VERSION = '1.5';
|
9 |
private static $version;
|
10 |
protected static $options = array();
|
11 |
protected static $defaults = array(
|
29 |
'show_address' => true,
|
30 |
'show_return' => true,
|
31 |
'return_text' => 'Return To Top',
|
|
|
32 |
'return_class' => '',
|
33 |
'footer_class' => '',
|
34 |
'footer_hook' => '',
|
214 |
return self::filter_links(wp_nav_menu(array('menu' => $menu, 'echo' => false, 'container' => false)));
|
215 |
}
|
216 |
|
217 |
+
static function return_to_top( $text, $class) {
|
218 |
+
return sprintf( '<div class="%1$s"><a rel="nofollow" href="#" onclick="window.scrollTo(0,0); return false;" >%2$s</a></div>', trim($class), $text);
|
|
|
219 |
}
|
220 |
|
221 |
|
238 |
$telephone = self::get_term('telephone');
|
239 |
$address = self::get_term('address');
|
240 |
return (empty($params['show_return']) ? '' :
|
241 |
+
self::return_to_top($params['return_text'], $params['return_class'])) .
|
242 |
sprintf('<div id="%1$s" class="%2$s">%3$s%4$s%5$s%6$s</div>%7$s<!-- end #%1$s -->',
|
243 |
self::CODE,
|
244 |
$params['footer_class'],
|
main.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
* Plugin Name: Footer Putter
|
4 |
* Plugin URI: http://www.diywebmastery.com/plugins/footer-putter/
|
5 |
* Description: Put a footer on your site that boosts your credibility with both search engines and human visitors.
|
6 |
-
* Version: 1.
|
7 |
* Author: Russell Jamieson
|
8 |
* Author URI: http://www.diywebmastery.com/about/
|
9 |
* License: GPLv2+
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
12 |
-
define('FOOTER_PUTTER_VERSION','1.
|
13 |
define('FOOTER_PUTTER_FRIENDLY_NAME', 'Footer Putter') ;
|
14 |
define('FOOTER_PUTTER_PLUGIN_NAME', plugin_basename(dirname(__FILE__))) ;
|
15 |
define('FOOTER_PUTTER_HOME_URL','http://www.diywebmastery.com/plugins/footer-putter/');
|
@@ -32,4 +32,4 @@ function footer_putter_init() {
|
|
32 |
}
|
33 |
}
|
34 |
add_action ('init', 'footer_putter_init',0); //run before widget init
|
35 |
-
?>
|
3 |
* Plugin Name: Footer Putter
|
4 |
* Plugin URI: http://www.diywebmastery.com/plugins/footer-putter/
|
5 |
* Description: Put a footer on your site that boosts your credibility with both search engines and human visitors.
|
6 |
+
* Version: 1.5
|
7 |
* Author: Russell Jamieson
|
8 |
* Author URI: http://www.diywebmastery.com/about/
|
9 |
* License: GPLv2+
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
12 |
+
define('FOOTER_PUTTER_VERSION','1.5');
|
13 |
define('FOOTER_PUTTER_FRIENDLY_NAME', 'Footer Putter') ;
|
14 |
define('FOOTER_PUTTER_PLUGIN_NAME', plugin_basename(dirname(__FILE__))) ;
|
15 |
define('FOOTER_PUTTER_HOME_URL','http://www.diywebmastery.com/plugins/footer-putter/');
|
32 |
}
|
33 |
}
|
34 |
add_action ('init', 'footer_putter_init',0); //run before widget init
|
35 |
+
?>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.diywebmastery.com/donate/
|
|
4 |
Tags: footer, copyright, rel=nofollow
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.6
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -35,9 +35,16 @@ Put a footer on your site that boosts your credibility with both search engines
|
|
35 |
|
36 |
== Screenshots ==
|
37 |
1. Example of a footer with both a copyright widget and a trademark widget
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
== Changelog ==
|
40 |
|
|
|
41 |
= 1.4.1 = Reinstate support for PHP 5.2
|
42 |
= 1.4 = Added support for HTML5 themes
|
43 |
= 1.3 = Pre-configure according to the WordPress theme
|
@@ -47,8 +54,8 @@ Put a footer on your site that boosts your credibility with both search engines
|
|
47 |
|
48 |
== Upgrade Notice ==
|
49 |
|
50 |
-
= 1.
|
51 |
-
* Optional -
|
52 |
|
53 |
== Links ==
|
54 |
|
4 |
Tags: footer, copyright, rel=nofollow
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.6
|
7 |
+
Stable tag: 1.5
|
8 |
License: GPLv2+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
35 |
|
36 |
== Screenshots ==
|
37 |
1. Example of a footer with both a copyright widget and a trademark widget
|
38 |
+
1. Setting up Footer Credits copyright and address details
|
39 |
+
1. Creating a typical footer menu
|
40 |
+
1. Adding a trademark link
|
41 |
+
1. Adding widgets into the Credibility Footer widget area
|
42 |
+
1. Configuring the Footer Copyright Widget
|
43 |
+
1. Configuring the Footer Trademarks Widget
|
44 |
|
45 |
== Changelog ==
|
46 |
|
47 |
+
= 1.5 = Use Javascript for Return To Top link to make it work on HTML5 sites, and strengthen CSS to ensure footer copyright and trademark widgets are full width
|
48 |
= 1.4.1 = Reinstate support for PHP 5.2
|
49 |
= 1.4 = Added support for HTML5 themes
|
50 |
= 1.3 = Pre-configure according to the WordPress theme
|
54 |
|
55 |
== Upgrade Notice ==
|
56 |
|
57 |
+
= 1.5 =
|
58 |
+
* Optional - Changes to Return To Top Link and Footer CSS to improve support for HTML5 sites.
|
59 |
|
60 |
== Links ==
|
61 |
|
screenshot-1.jpg
DELETED
Binary file
|
styles/footer-credits.css
CHANGED
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#footer .footer-center, #footer .return-center, .footer-center, .return-center { text-align: center; margin: 10px 0px; }
|
2 |
#footer .return-left, .return-left { float: left; width : 20%; }
|
3 |
#footer .footer-right, .footer-right { float: right; text-align: right; width: 70%; margin-bottom: 10px; }
|
@@ -13,10 +24,4 @@
|
|
13 |
text-decoration: underline; }
|
14 |
#footer-credits span.copyright, #footer-credits span.telephone, #footer-credits span.address {
|
15 |
font-weight: normal; letter-spacing : normal; text-transform: none; margin: 0 10px; vertical-align: middle;
|
16 |
-
background: inherit; border : none; float: none; display: inline; }
|
17 |
-
#footer-credits.dark, #footer-credits.dark a, .dark a , .dark a:visited { color : #222222; }
|
18 |
-
#footer-credits.light, #footer-credits.light a, .light a, .light a:visited { color : #DDDDDD; }
|
19 |
-
#footer-credits.white, #footer-credits.white a, .white a, .white a:visited { color : white; }
|
20 |
-
.widget_footer_trademarks { text-align: center; margin: 10px 0;}
|
21 |
-
.widget_footer_trademarks a { margin: 10px; }
|
22 |
-
.widget_footer_trademarks img { border: 0 !important; }
|
1 |
+
.widget_footer_copyright, .widget_footer_trademarks
|
2 |
+
{ margin: 0 !important; padding: 0 !important; width: 100% !important; float:none !important; }
|
3 |
+
.widget_footer_trademarks { text-align: center; }
|
4 |
+
.widget_footer_trademarks a { margin: 10px; }
|
5 |
+
.widget_footer_trademarks img { border: 0 !important; }
|
6 |
+
|
7 |
+
.site-info .custom-footer { margin: 0 !important; border: 0 !important; padding : 0!important; width: 100% !important;}
|
8 |
+
#footer-credits.dark, #footer-credits.dark a, .dark a , .dark a:visited { color : #222222; }
|
9 |
+
#footer-credits.light, #footer-credits.light a, .light a, .light a:visited { color : #DDDDDD; }
|
10 |
+
#footer-credits.white, #footer-credits.white a, .white a, .white a:visited { color : white; }
|
11 |
+
|
12 |
#footer .footer-center, #footer .return-center, .footer-center, .return-center { text-align: center; margin: 10px 0px; }
|
13 |
#footer .return-left, .return-left { float: left; width : 20%; }
|
14 |
#footer .footer-right, .footer-right { float: right; text-align: right; width: 70%; margin-bottom: 10px; }
|
24 |
text-decoration: underline; }
|
25 |
#footer-credits span.copyright, #footer-credits span.telephone, #footer-credits span.address {
|
26 |
font-weight: normal; letter-spacing : normal; text-transform: none; margin: 0 10px; vertical-align: middle;
|
27 |
+
background: inherit; border : none; float: none; display: inline; }
|
|
|
|
|
|
|
|
|
|
|
|