Version Description
Initial release
=
Download this release
Release Info
Developer | powerblogservice |
Plugin | Footer Putter |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- admin.css +30 -0
- admin.php +99 -0
- footer-credits-admin.php +310 -0
- footer-credits.php +419 -0
- icon-32.png +0 -0
- logo.png +0 -0
- main.php +24 -0
- menu-icon.png +0 -0
- readme.txt +52 -0
- screenshot-1.jpg +0 -0
- style.css +19 -0
admin.css
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
div.icon32 { background-image : url(icon-32.png); background-repeat: no-repeat;}
|
2 |
+
#poststuff { margin-right: 20px; }
|
3 |
+
#poststuff input.error, #poststuff select.error { border: 1px solid red; background-color : #FEE; }
|
4 |
+
#poststuff div#message { margin-left: 10px; display: inline; padding: 10px; }
|
5 |
+
#poststuff div#message div.updated { margin-left: 30px; padding: 8px; display: inline; }
|
6 |
+
#poststuff label { display: inline-block; min-width: 200px; margin-right: 10px;}
|
7 |
+
|
8 |
+
/* tooltips */
|
9 |
+
.tooltip {position: relative; cursor: help; display: inline-block; text-decoration: none;
|
10 |
+
color: #222; outline: none; }
|
11 |
+
.tooltip span { visibility: hidden; position: absolute; bottom: 25px; left: 50%;
|
12 |
+
z-index: 999; width: 250px;margin-left: -27px; padding: 10px;border: 2px solid #ccc;
|
13 |
+
opacity: .9;background-color: #ddd;
|
14 |
+
background-image: -webkit-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
|
15 |
+
background-image: -moz-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
|
16 |
+
background-image: -ms-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
|
17 |
+
background-image: -o-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
|
18 |
+
background-image: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
|
19 |
+
-moz-border-radius: 4px;border-radius: 4px;
|
20 |
+
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.5) inset;
|
21 |
+
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.5) inset;
|
22 |
+
box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.5) inset;
|
23 |
+
text-shadow: 0 1px 0 rgba(255,255,255,.4);
|
24 |
+
}
|
25 |
+
.tooltip:hover { border: 0; /* IE6 fix */ }
|
26 |
+
.tooltip:hover span { visibility: visible;}
|
27 |
+
.tooltip span:before,
|
28 |
+
.tooltip span:after { content: ""; position: absolute; z-index: 1000; bottom: -7px; left: 5%;margin-left: 8px;
|
29 |
+
border-top: 8px solid #ddd;border-left: 8px solid transparent;border-right: 8px solid transparent;border-bottom: 0; }
|
30 |
+
.tooltip span:before {border-top-color: #ccc;bottom: -8px;}
|
admin.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class FooterPutterAdmin {
|
3 |
+
const CREDITS = 'FooterCreditsAdmin';
|
4 |
+
private $pagehook;
|
5 |
+
|
6 |
+
function __construct() {
|
7 |
+
add_filter('screen_layout_columns', array(&$this, 'screen_layout_columns'), 10, 2);
|
8 |
+
add_filter('plugin_action_links',array(&$this, 'plugin_action_links'), 10, 2 );
|
9 |
+
add_action('admin_menu', array(&$this,'admin_menu'));
|
10 |
+
call_user_func (array(self::CREDITS,'init'),FOOTER_PUTTER_PLUGIN_NAME,FOOTER_PUTTER_VERSION);
|
11 |
+
}
|
12 |
+
|
13 |
+
function screen_layout_columns($columns, $screen) {
|
14 |
+
if (!defined( 'WP_NETWORK_ADMIN' ) && !defined( 'WP_USER_ADMIN' )) {
|
15 |
+
if ($screen == $this->pagehook) {
|
16 |
+
$columns[$this->pagehook] = 2;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
return $columns;
|
20 |
+
}
|
21 |
+
|
22 |
+
function plugin_action_links( $links, $file ) {
|
23 |
+
if ( is_array($links) && (FOOTER_PUTTER_PATH == $file )) {
|
24 |
+
$settings_link = '<a href="' . admin_url( 'admin.php?page='.FOOTER_PUTTER_PLUGIN_NAME) . '">Settings</a>';
|
25 |
+
array_unshift( $links, $settings_link );
|
26 |
+
}
|
27 |
+
return $links;
|
28 |
+
}
|
29 |
+
|
30 |
+
function admin_menu() {
|
31 |
+
$this->pagehook = add_menu_page(FOOTER_PUTTER_FRIENDLY_NAME, FOOTER_PUTTER_FRIENDLY_NAME, 'manage_options',
|
32 |
+
FOOTER_PUTTER_PLUGIN_NAME, array(&$this,'resources_panel'),plugins_url('/menu-icon.png',__FILE__) );
|
33 |
+
}
|
34 |
+
|
35 |
+
function resources_panel() {
|
36 |
+
$footer_url = call_user_func(array(self::CREDITS, 'get_url'));
|
37 |
+
$home_url = FOOTER_PUTTER_HOME_URL;
|
38 |
+
$version = FOOTER_PUTTER_VERSION;
|
39 |
+
$plugin = FOOTER_PUTTER_FRIENDLY_NAME;
|
40 |
+
$screenshot = plugins_url('screenshot1.jpg',__FILE__);
|
41 |
+
$logo = plugins_url('logo.png',__FILE__);
|
42 |
+
print <<< ADMIN_PANEL
|
43 |
+
<div class="wrap">
|
44 |
+
<h2>{$plugin} {$version} Overview</h2>
|
45 |
+
<img class="alignright" src="{$logo}" alt="Footer Putter Plugin" />
|
46 |
+
|
47 |
+
<p>{$plugin} allows you to put a footer to your site that adds credibility to your site, with BOTH visitors and search engines.</p>
|
48 |
+
<p>Google is looking for some indicators that the site is about a real business.</p>
|
49 |
+
<ol>
|
50 |
+
<li>The name of the business or site owner</li>
|
51 |
+
<li>A copyright notice that is up to date</li>
|
52 |
+
<li>A telephone number</li>
|
53 |
+
<li>A postal address</li>
|
54 |
+
<li>Links to Privacy Policy and Terms of Use pages</p>
|
55 |
+
</ol>
|
56 |
+
|
57 |
+
<p>Human visitors may pay some credence to this information but will likely be more motivated by trade marks, trust marks and service marks.</p>
|
58 |
+
|
59 |
+
<h2>{$plugin} Widgets</h2>
|
60 |
+
|
61 |
+
The plugins define two widgets:
|
62 |
+
<ol>
|
63 |
+
<li>a <b>Footer Copyright Widget</b> that places a line at the foot of your site containing as many of the items listed above that you want to disclose.</li>
|
64 |
+
<li>a <b>Trademarks Widget</b> that displays a line of trademarks that you have previously set up as "Links".
|
65 |
+
</ol>
|
66 |
+
<p>All footer links are rel=nofollow in line with best SEO recommendations.</p>
|
67 |
+
<p>Typically you will drag both widgets into the Custom Footer Widget Area.</p>
|
68 |
+
<p>Your footer will look something like this:</p>
|
69 |
+
<img src="{$screenshot}" alt="Screenshot of Footer Credits Widget Area" />
|
70 |
+
|
71 |
+
<h2>Instructions For WPWhoosh Users</h2>
|
72 |
+
<p>If you have <a href="http://www.wpwhoosh.com/">whooshed</a> this site then all you need to do is replace the sample trademarks with the real trademarks.
|
73 |
+
|
74 |
+
<h2>Instructions For Other Users</h2>
|
75 |
+
<ol>
|
76 |
+
<li>Create a <i>Privacy Policy</i> page with no sidebar and set robots meta as noindex, noarchive.</li>
|
77 |
+
<li>Create a <i>Terms of Use</i> page with no sidebar and set robots meta as noindex, noarchive.</li>
|
78 |
+
<li>Create a page with a contact form.</li>
|
79 |
+
<li>Create a WordPress menu <i>Footer Menu</i> with the above 3 pages.</li>
|
80 |
+
<li>Go to <a href="{$footer_url}">Footer Credits</a> and update the Site Owner details and set the Footer Hook according to your choice of WordPress theme.</li>
|
81 |
+
<li>Drag a <i>Footer Copyright Widget</i> into the <i>Custom Footer Widget Area</i> and select the <i>Footer Menu</i> and optional text if you want to have a "Return To Top" link</li>
|
82 |
+
<li>Add a link for each of your trademarks and put each in a <i>Trademarks</i> link category - you can call this link category as you like</li>
|
83 |
+
<li>Drag a Trademarks widget into the Custom Footer Widget and choose your <i>Trademarks</i> link category</li>
|
84 |
+
</ol>
|
85 |
+
|
86 |
+
<h3>Footer Hook</h3>
|
87 |
+
|
88 |
+
<p>The footer hook is only required if your theme does not already have a footer widget area into which you can drag the two widgets.</p>
|
89 |
+
|
90 |
+
<p>For some themes, the footer hook is left blank, for others use a WordPress hook such as <i>get_footer</i> or <i>wp_footer</i>,
|
91 |
+
or use a theme-specific hook such as <i>twentyten_credits</i>, <i>twentyeleven_credits</i>, <i>genesis_footer</i>, <i>pagelines_leaf</i>, etc</p>
|
92 |
+
|
93 |
+
<h3>Getting Help</h3>
|
94 |
+
<p>Check out the <a href="{$home_url}">Footer Putter Plugin page</a> for more information about the plugin.</p>
|
95 |
+
ADMIN_PANEL;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
$footer_putter_admin = new FooterPutterAdmin();
|
99 |
+
?>
|
footer-credits-admin.php
ADDED
@@ -0,0 +1,310 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class FooterCreditsAdmin {
|
3 |
+
const CLASSNAME = 'FooterCreditsAdmin'; //this class
|
4 |
+
const CODE = 'footer-credits'; //prefix ID of CSS elements
|
5 |
+
const DOMAIN = 'FooterCredits'; //text domain for translation
|
6 |
+
const FOOTER = 'FooterCredits'; //class that builds footer
|
7 |
+
const SLUG = 'footer';
|
8 |
+
private static $version;
|
9 |
+
private static $parenthook;
|
10 |
+
private static $slug;
|
11 |
+
private static $screen_id;
|
12 |
+
private static $initialized = false;
|
13 |
+
private static $keys = array('owner', 'site', 'address', 'country', 'telephone',
|
14 |
+
'email', 'courts', 'updated', 'copyright_start_year', 'return_text', 'return_href', 'return_class',
|
15 |
+
'footer_class','footer_hook');
|
16 |
+
private static $tips = array(
|
17 |
+
'owner' => array('heading' => 'Owner or Business Name', 'tip' => 'Enter the name of the legal entity that owns and operates the site.'),
|
18 |
+
'address' => array('heading' => 'Full Address', 'tip' => 'Enter the full address that you want to appear in the footer and the privacy and terms pages.'),
|
19 |
+
'country' => array('heading' => 'Country', 'tip' => 'Enter the country where the legal entity is domiciled.'),
|
20 |
+
'telephone' => array('heading' => 'Telephone Number', 'tip' => 'Enter a telephone number here if you want it to appear in the footer of the installed site.'),
|
21 |
+
'email' => array('heading' => 'Email Address', 'tip' => 'Enter the email address here if you want it to appear in the privacy statement.'),
|
22 |
+
'courts' => array('heading' => 'Legal Jurisdiction' , 'tip' => 'The Courts that have jurisdiction over any legal disputes regarding this site. For example: <i>the state and federal courts in Santa Clara County, California</i>, or <i>the Law Courts of England and Wales</i>'),
|
23 |
+
'updated' => array('heading' => 'Last Updated' , 'tip' => 'This will be defaulted as today. For example, Oct 23rd, 2012'),
|
24 |
+
'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.'),
|
25 |
+
'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>.'),
|
26 |
+
'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.'),
|
27 |
+
'return_class' => array('heading' => 'Return To Top Class' , 'tip' => 'Add any custom class you want to apply to the Return To Top link.'),
|
28 |
+
'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.'),
|
29 |
+
'footer_hook' => array('heading' => 'Footer 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.')
|
30 |
+
);
|
31 |
+
private static $tooltips;
|
32 |
+
|
33 |
+
public static function init($parent,$version) {
|
34 |
+
if (self::$initialized) return true;
|
35 |
+
self::$initialized = true;
|
36 |
+
self::$version = $version;
|
37 |
+
self::$parenthook = $parent;
|
38 |
+
self::$slug = self::$parenthook . '-' . self::SLUG;
|
39 |
+
add_filter('screen_layout_columns', array(self::CLASSNAME, 'screen_layout_columns'), 10, 2);
|
40 |
+
add_action('admin_menu',array(self::CLASSNAME, 'admin_menu'));
|
41 |
+
self::$tooltips = new FooterTooltip(self::$tips);
|
42 |
+
}
|
43 |
+
|
44 |
+
private static function get_parenthook(){
|
45 |
+
return self::$parenthook;
|
46 |
+
}
|
47 |
+
|
48 |
+
private static function get_version(){
|
49 |
+
return self::$version;
|
50 |
+
}
|
51 |
+
|
52 |
+
private static function get_slug(){
|
53 |
+
return self::$slug;
|
54 |
+
}
|
55 |
+
|
56 |
+
private static function get_screen_id(){
|
57 |
+
return self::$screen_id;
|
58 |
+
}
|
59 |
+
|
60 |
+
private static function get_keys(){
|
61 |
+
return self::$keys;
|
62 |
+
}
|
63 |
+
|
64 |
+
public static function get_url($id='', $noheader = false) {
|
65 |
+
return admin_url('admin.php?page='.self::get_slug().(empty($id) ? '' : ('&id='.$id)).(empty($noheader) ? '' : '&noheader=true'));
|
66 |
+
}
|
67 |
+
|
68 |
+
private static function get_nonce_url($action, $id='', $noheader = false) {
|
69 |
+
return WPWhooshUtils::admin_url(self::get_slug(), $action, $id, $noheader,true,'site');
|
70 |
+
}
|
71 |
+
|
72 |
+
public static function enable_screen($show_screen,$screen) {
|
73 |
+
if ($screen->id == self::get_screen_id())
|
74 |
+
return true;
|
75 |
+
else
|
76 |
+
return $show_screen;
|
77 |
+
}
|
78 |
+
|
79 |
+
public static function screen_layout_columns($columns, $screen) {
|
80 |
+
if (!defined( 'WP_NETWORK_ADMIN' ) && !defined( 'WP_USER_ADMIN' )) {
|
81 |
+
if ($screen == self::get_screen_id()) {
|
82 |
+
$columns[self::get_screen_id()] = 2;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
return $columns;
|
86 |
+
}
|
87 |
+
|
88 |
+
public static function admin_menu() {
|
89 |
+
self::$screen_id = add_submenu_page(self::get_parenthook(), __('Footer Credits'), __('Footer Credits'), 'manage_options',
|
90 |
+
self::get_slug(), array(self::CLASSNAME,'settings_panel'));
|
91 |
+
add_action('load-'.self::get_screen_id(), array(self::CLASSNAME, 'load_page'));
|
92 |
+
add_action('admin_print_styles-'.self::get_screen_id(), array(self::CLASSNAME, 'print_styles'));
|
93 |
+
add_action('admin_footer-'.self::get_screen_id(), array(self::CLASSNAME, 'toggle_postboxes'));
|
94 |
+
}
|
95 |
+
|
96 |
+
public static function print_styles() {
|
97 |
+
wp_enqueue_style(self::CODE, plugins_url('style.css', __FILE__), array(),self::get_version());
|
98 |
+
wp_enqueue_style(self::CODE.'-admin', plugins_url('admin.css', __FILE__), array(),self::get_version());
|
99 |
+
}
|
100 |
+
|
101 |
+
public static function load_page() {
|
102 |
+
$message = isset($_POST['options_update']) ? self::save() : '';
|
103 |
+
wp_enqueue_script('common');
|
104 |
+
wp_enqueue_script('wp-lists');
|
105 |
+
wp_enqueue_script('postbox');
|
106 |
+
$options = call_user_func(array(self::FOOTER, 'get_options'));
|
107 |
+
$callback_params = array ('options' => $options, 'message' => $message);
|
108 |
+
add_meta_box(self::CODE.'-intro', __('Introduction',self::DOMAIN), array(self::CLASSNAME, 'intro_panel'), self::get_screen_id(), 'normal', 'core', $callback_params);
|
109 |
+
add_meta_box(self::CODE.'-owner', __('Site Owner Details',self::DOMAIN), array(self::CLASSNAME, 'owner_panel'), self::get_screen_id(), 'normal', 'core', $callback_params);
|
110 |
+
add_meta_box(self::CODE.'-contact', __('Contact Details',self::DOMAIN), array(self::CLASSNAME, 'contact_panel'), self::get_screen_id(), 'normal', 'core', $callback_params);
|
111 |
+
add_meta_box(self::CODE.'-legal', __('Legal Details',self::DOMAIN), array(self::CLASSNAME, 'legal_panel'), self::get_screen_id(), 'normal', 'core', $callback_params);
|
112 |
+
add_meta_box(self::CODE.'-return', __('Return To Top',self::DOMAIN), array(self::CLASSNAME, 'return_panel'), self::get_screen_id(), 'normal', 'core', $callback_params);
|
113 |
+
add_meta_box(self::CODE.'-classes', __('Custom Classes (Optional)',self::DOMAIN), array(self::CLASSNAME, 'classes_panel'), self::get_screen_id(), 'normal', 'core', $callback_params);
|
114 |
+
add_meta_box(self::CODE.'-example', __('Preview Footer',self::DOMAIN), array(self::CLASSNAME, 'preview_panel'), self::get_screen_id(), 'normal', 'core', $callback_params);
|
115 |
+
add_meta_box(self::CODE.'-advanced', __('Advanced',self::DOMAIN), array(self::CLASSNAME, 'advanced_panel'), self::get_screen_id(), 'normal', 'core');
|
116 |
+
|
117 |
+
$current_screen = get_current_screen();
|
118 |
+
if (method_exists($current_screen,'add_help_tab')) {
|
119 |
+
$current_screen->add_help_tab(
|
120 |
+
array( 'id' => self::CODE.'-overview', 'title' => 'Overview', 'content' => self::help_panel()));
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
public static function save() {
|
125 |
+
check_admin_referer(self::CLASSNAME);
|
126 |
+
$page_options = explode(',', stripslashes($_POST['page_options']));
|
127 |
+
if ($page_options) {
|
128 |
+
$options = call_user_func(array(self::FOOTER, 'get_options'));
|
129 |
+
foreach ($page_options as $option) {
|
130 |
+
$val = array_key_exists($option, $_POST) ? trim(stripslashes($_POST[$option])) : '';
|
131 |
+
if (array_key_exists($option,$options['terms']))
|
132 |
+
$options['terms'][$option] = $val;
|
133 |
+
else switch($option) {
|
134 |
+
case 'return_href': $val = '#'.preg_replace('/\W/','',$val);
|
135 |
+
default: $options[$option] = $val;
|
136 |
+
}
|
137 |
+
} //end for
|
138 |
+
$class='updated fade';
|
139 |
+
$saved = call_user_func(array(self::FOOTER, 'save'), $options) ;
|
140 |
+
if ($saved) {
|
141 |
+
$message = 'Footer Settings saved.';
|
142 |
+
} else
|
143 |
+
$message = 'Footer Settings have not been changed.';
|
144 |
+
} else {
|
145 |
+
$class='error';
|
146 |
+
$message= 'Footer Settings not found!';
|
147 |
+
}
|
148 |
+
return sprintf('<div id="message" class="%1$s "><p>%2$s</p></div>',$class, __($message,self::FOOTER));
|
149 |
+
}
|
150 |
+
|
151 |
+
public static function toggle_postboxes() {
|
152 |
+
$hook = self::get_screen_id();
|
153 |
+
print <<< SCRIPT
|
154 |
+
<script type="text/javascript">
|
155 |
+
//<![CDATA[
|
156 |
+
jQuery(document).ready( function($) {
|
157 |
+
// close postboxes that should be closed
|
158 |
+
$('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
159 |
+
// postboxes setup
|
160 |
+
postboxes.add_postbox_toggles('{$hook}');
|
161 |
+
});
|
162 |
+
//]]>
|
163 |
+
</script>
|
164 |
+
SCRIPT;
|
165 |
+
}
|
166 |
+
|
167 |
+
public static function help_panel(){
|
168 |
+
$result = <<< HELP_PANEL
|
169 |
+
<p>This admin screen is used to set up the values that appear in the footer, and in the Terms and Conditions and Privacy pages.</p>
|
170 |
+
<p>This information supplied here is substituted automatically into the Privacy and Terms pages and footer in the appropriate places.</p>
|
171 |
+
<h4>Copyright Footer</h4>
|
172 |
+
<p>You can set up as many of the following items as you want to appear on a single line in a footer widget:</p>
|
173 |
+
<ul>
|
174 |
+
<li>- Link to About Us page</li>
|
175 |
+
<li>- Link to Contact Us page</li>
|
176 |
+
<li>- Link to Privacy page</li>
|
177 |
+
<li>- Link to Terms page</li>
|
178 |
+
<li>- Copyright sSatement</li>
|
179 |
+
<li>- Business Owner</li>
|
180 |
+
<li>- Telephone</li>
|
181 |
+
<li>- Address</li>
|
182 |
+
</ul>
|
183 |
+
HELP_PANEL;
|
184 |
+
return $result;
|
185 |
+
}
|
186 |
+
|
187 |
+
public static function intro_panel($post,$metabox){
|
188 |
+
$message = $metabox['args']['message'];
|
189 |
+
print <<< INTRO_PANEL
|
190 |
+
<p>The following information can be used in both the footer widget and on the Privacy and Terms pages. See the Help section above for more information.</p>
|
191 |
+
{$message}
|
192 |
+
INTRO_PANEL;
|
193 |
+
}
|
194 |
+
|
195 |
+
public static function owner_panel($post,$metabox){
|
196 |
+
$terms = $metabox['args']['options']['terms'];
|
197 |
+
$tip1 = self::$tooltips->tip('owner');
|
198 |
+
$tip2 = self::$tooltips->tip('address');
|
199 |
+
$tip3 = self::$tooltips->tip('country');
|
200 |
+
print <<< OWNER_PANEL
|
201 |
+
<label>{$tip1}</label><input type="text" name="owner" size="25" value="{$terms['owner']}" /><br/>
|
202 |
+
<label>{$tip2}</label><input type="text" name="address" size="80" value="{$terms['address']}" /><br/>
|
203 |
+
<label>{$tip3}</label><input type="text" name="country" size="25" value="{$terms['country']}" /><br/>
|
204 |
+
OWNER_PANEL;
|
205 |
+
}
|
206 |
+
|
207 |
+
public static function contact_panel($post,$metabox){
|
208 |
+
$terms = $metabox['args']['options']['terms'];
|
209 |
+
$tip2 = self::$tooltips->tip('telephone');
|
210 |
+
$tip1 = self::$tooltips->tip('email');
|
211 |
+
print <<< CONTACT_PANEL
|
212 |
+
<label>{$tip1}</label><input type="text" name="email" size="30" value="{$terms['email']}" /><br/>
|
213 |
+
<label>{$tip2}</label><input type="text" name="telephone" size="20" value="{$terms['telephone']}" /><br/>
|
214 |
+
CONTACT_PANEL;
|
215 |
+
}
|
216 |
+
|
217 |
+
public static function legal_panel($post,$metabox){
|
218 |
+
$terms = $metabox['args']['options']['terms'];
|
219 |
+
$tip1 = self::$tooltips->tip('courts');
|
220 |
+
$tip2 = self::$tooltips->tip('updated');
|
221 |
+
$tip3 = self::$tooltips->tip('copyright_start_year');
|
222 |
+
print <<< LEGAL_PANEL
|
223 |
+
<label>{$tip1}</label><input type="text" name="courts" size="80" value="{$terms['courts']}" /><br/>
|
224 |
+
<label>{$tip2}</label><input type="text" name="updated" size="20" value="{$terms['updated']}" /><br/>
|
225 |
+
<label>{$tip3}</label><input type="text" name="copyright_start_year" size="5" value="{$terms['copyright_start_year']}" /><br/>
|
226 |
+
LEGAL_PANEL;
|
227 |
+
}
|
228 |
+
|
229 |
+
public static function return_panel($post,$metabox){
|
230 |
+
$options = $metabox['args']['options'];
|
231 |
+
$tip1 = self::$tooltips->tip('return_text');
|
232 |
+
$tip2 = self::$tooltips->tip('return_href');
|
233 |
+
print <<< RETURN_PANEL
|
234 |
+
<label>{$tip1}</label><input type="text" name="return_text" size="20" value="{$options['return_text']}" /><br/>
|
235 |
+
<label>{$tip2}</label><input type="text" name="return_href" size="20" value="{$options['return_href']}" /><br/>
|
236 |
+
RETURN_PANEL;
|
237 |
+
}
|
238 |
+
|
239 |
+
public static function classes_panel(){
|
240 |
+
$options = call_user_func(array(self::FOOTER, 'get_options'));
|
241 |
+
$tip1 = self::$tooltips->tip('footer_class');
|
242 |
+
$tip2 = self::$tooltips->tip('return_class');
|
243 |
+
print <<< CLASSES_PANEL
|
244 |
+
<label>{$tip1}</label><input type="text" name="footer_class" size="30" value="{$options['footer_class']}" /><br/>
|
245 |
+
<label>{$tip2}</label><input type="text" name="return_class" size="30" value="{$options['return_class']}" /><br/>
|
246 |
+
CLASSES_PANEL;
|
247 |
+
}
|
248 |
+
|
249 |
+
public static function preview_panel($post,$metabox){
|
250 |
+
$options = $metabox['args']['options'];
|
251 |
+
echo call_user_func(array(self::FOOTER, 'footer'),array('nav_menu' => 'Footer Menu'));
|
252 |
+
}
|
253 |
+
|
254 |
+
public static function advanced_panel(){
|
255 |
+
$options = call_user_func(array(self::FOOTER, 'get_options'));
|
256 |
+
$tip1 = self::$tooltips->tip('footer_hook');
|
257 |
+
print <<< ADVANCED_PANEL
|
258 |
+
<p>You can place the Copyright and Trademark widgets in any existing Widget area.</p>
|
259 |
+
<p>However, if your theme does not have a suitably located Widget Area in the footer then you can create one by specifying the hook
|
260 |
+
where the Widget Area will be located.</p>
|
261 |
+
<p>You may use a standard WordPress hook like <i>get_footer</i> or <i>wp_footer</i> or choose a hook that is theme-specific such as <i>twentyten_credits</i>,
|
262 |
+
<i>twentyeleven_credits</i> or <i>pagelines_leaf</i>.</p>
|
263 |
+
<p>If you using a Genesis child theme and the theme does not have a suitable widget area then use the hook <i>genesis_footer</i>.</p>
|
264 |
+
<label>{$tip1}</label><input type="text" name="footer_hook" size="30" value="{$options['footer_hook']}" /><br/>
|
265 |
+
ADVANCED_PANEL;
|
266 |
+
}
|
267 |
+
|
268 |
+
public static function settings_panel() {
|
269 |
+
$this_url = $_SERVER['REQUEST_URI'];
|
270 |
+
$keys = implode(',',self::get_keys());
|
271 |
+
$title = sprintf('<h2>%1$s</h2>', __('Footer Credits Settings', self::DOMAIN));
|
272 |
+
|
273 |
+
?>
|
274 |
+
<div class="wrap">
|
275 |
+
<?php screen_icon(); echo $title; ?>
|
276 |
+
<div id="poststuff" class="metabox-holder">
|
277 |
+
<div id="post-body">
|
278 |
+
<div id="post-body-content">
|
279 |
+
<form id="footer_options" method="post" action="<?php echo $this_url; ?>">
|
280 |
+
<?php do_meta_boxes(self::get_screen_id(), 'normal', null); ?>
|
281 |
+
<p class="submit">
|
282 |
+
<input type="submit" class="button-primary" name="options_update" value="Save Changes" />
|
283 |
+
<input type="hidden" name="page_options" value="<?php echo $keys; ?>" />
|
284 |
+
<?php wp_nonce_field(self::CLASSNAME); ?>
|
285 |
+
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
286 |
+
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?>
|
287 |
+
</p>
|
288 |
+
</form>
|
289 |
+
</div>
|
290 |
+
</div>
|
291 |
+
<br class="clear"/>
|
292 |
+
</div>
|
293 |
+
</div>
|
294 |
+
<?php
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
class FooterTooltip {
|
299 |
+
const DOMAIN = "FooterCredits";
|
300 |
+
private $labels = array();
|
301 |
+
function __construct($labels) {
|
302 |
+
$this->labels = $labels;
|
303 |
+
}
|
304 |
+
function tip($label) {
|
305 |
+
$heading = array_key_exists($label,$this->labels) ? __($this->labels[$label]['heading'],self::DOMAIN) : '';
|
306 |
+
$tip = array_key_exists($label,$this->labels) ? __($this->labels[$label]['tip'],self::DOMAIN) : '';
|
307 |
+
return sprintf('<a href="#" class="tooltip">%1$s<span>%2$s</span></a>',$heading, $tip);
|
308 |
+
}
|
309 |
+
}
|
310 |
+
?>
|
footer-credits.php
ADDED
@@ -0,0 +1,419 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class FooterCredits {
|
3 |
+
const CLASSNAME = 'FooterCredits'; //name of class - must be same as line above - hard code for performance
|
4 |
+
const DOMAIN = 'FooterCredits'; //text domain for translation
|
5 |
+
const CODE = 'footer-credits'; //shortcode
|
6 |
+
const OPTIONS_NAME = 'footer_credits_options';
|
7 |
+
const SIDEBAR_ID = 'last-footer';
|
8 |
+
private static $version;
|
9 |
+
protected static $options = array();
|
10 |
+
protected static $defaults = array(
|
11 |
+
'terms' => array(
|
12 |
+
'site' => '',
|
13 |
+
'owner' => '',
|
14 |
+
'copyright' => '',
|
15 |
+
'copyright_start_year' => '',
|
16 |
+
'country' => '',
|
17 |
+
'courts' => '',
|
18 |
+
'email' => '',
|
19 |
+
'telephone' => '',
|
20 |
+
'address' => '',
|
21 |
+
'updated' => ''),
|
22 |
+
'nav_menu' => 0,
|
23 |
+
'separator' => ' · ',
|
24 |
+
'center' => true,
|
25 |
+
'show_copyright' => true,
|
26 |
+
'show_telephone' => true,
|
27 |
+
'show_address' => true,
|
28 |
+
'show_return' => true,
|
29 |
+
'return_text' => 'Return To Top',
|
30 |
+
'return_href' => '#header',
|
31 |
+
'return_class' => '',
|
32 |
+
'footer_class' => '',
|
33 |
+
'footer_hook' => ''
|
34 |
+
);
|
35 |
+
|
36 |
+
private static function get_version(){
|
37 |
+
return self::$version;
|
38 |
+
}
|
39 |
+
static function init($version) {
|
40 |
+
self::$version = $version;
|
41 |
+
add_action('widgets_init',array(self::CLASSNAME,'register'),20);
|
42 |
+
add_filter( 'wp_nav_menu_items', array(self::CLASSNAME, 'fix_home_link'), 10, 2 );
|
43 |
+
if (!is_admin()) add_action('wp',array(self::CLASSNAME,'prepare'));
|
44 |
+
}
|
45 |
+
|
46 |
+
static function register() {
|
47 |
+
self::register_sidebars();
|
48 |
+
self::register_widgets();
|
49 |
+
}
|
50 |
+
|
51 |
+
static function prepare() {
|
52 |
+
if (!is_admin()) {
|
53 |
+
add_shortcode(self::CODE.'-copyright', array(self::CLASSNAME, 'copyright_owner' ) );
|
54 |
+
add_shortcode(self::CODE.'-menu', array(self::CLASSNAME, 'footer_menu' ) );
|
55 |
+
add_shortcode(self::CODE, array(self::CLASSNAME, 'footer' ) );
|
56 |
+
|
57 |
+
add_filter('widget_text', 'do_shortcode', 11);
|
58 |
+
|
59 |
+
add_action('wp_enqueue_scripts',array(self::CLASSNAME, 'add_styles' ));
|
60 |
+
|
61 |
+
//insert custom footer at specified hook
|
62 |
+
if ($footer_hook = self::get_option('footer_hook')) add_action( $footer_hook, array(self::CLASSNAME, 'custom_footer'));
|
63 |
+
|
64 |
+
if (is_page('terms') || is_page('privacy'))
|
65 |
+
add_filter('the_content', array(self::CLASSNAME, 'terms_filter') );
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
static function register_sidebars() {
|
70 |
+
if (self::get_option('footer_hook'))
|
71 |
+
register_sidebar( array(
|
72 |
+
'id' => self::SIDEBAR_ID,
|
73 |
+
'name' => __( 'Custom Footer Widget Area', self::CLASSNAME ),
|
74 |
+
'description' => __( 'Custom footer section for copyright, trademarks, etc', self::CLASSNAME),
|
75 |
+
'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">',
|
76 |
+
'after_widget' => '</div></div>'
|
77 |
+
) );
|
78 |
+
}
|
79 |
+
|
80 |
+
static function register_widgets() {
|
81 |
+
register_widget( 'Footer_Putter_Copyright_Widget' );
|
82 |
+
register_widget( 'Footer_Putter_TradeMark_Widget' );
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
static function add_styles() {
|
87 |
+
wp_enqueue_style(self::CLASSNAME, plugins_url('style.css',__FILE__), array(), self::get_version());
|
88 |
+
}
|
89 |
+
|
90 |
+
static function fix_home_link( $content, $args) {
|
91 |
+
if (strpos($content, '<a>Home</a>') !== FALSE) {
|
92 |
+
$class = is_front_page()? ' class="current_page_item"' : '';
|
93 |
+
$content = str_replace ('<a>Home</a>',sprintf('<a href="%1$s"%2$s>Home</a>',home_url(),$class),$content);
|
94 |
+
}
|
95 |
+
return $content;
|
96 |
+
}
|
97 |
+
|
98 |
+
static function sanitize_terms($new_terms) {
|
99 |
+
$new_terms = wp_parse_args($new_terms, self::$defaults['terms']); //ensure terms are complete
|
100 |
+
$new_terms['site'] = self::get_default_site();
|
101 |
+
$new_terms['copyright'] = self::get_copyright($new_terms); //generate copyright
|
102 |
+
return $new_terms;
|
103 |
+
}
|
104 |
+
|
105 |
+
static function save($new_options) {
|
106 |
+
$options = self::get_options(false);
|
107 |
+
$new_options = wp_parse_args( $new_options, $options);
|
108 |
+
$new_options['terms'] = self::sanitize_terms($new_options['terms']);
|
109 |
+
$updated = update_option(self::OPTIONS_NAME,$new_options);
|
110 |
+
if ($updated) self::get_options(false);
|
111 |
+
return $updated;
|
112 |
+
}
|
113 |
+
|
114 |
+
static function get_options ($cache = true) {
|
115 |
+
if ($cache && (count(self::$options) > 0)) return self::$options;
|
116 |
+
|
117 |
+
$the_options = array();
|
118 |
+
$the_options = get_option(self::OPTIONS_NAME);
|
119 |
+
if (empty($the_options)) {
|
120 |
+
self::$options = self::$defaults;
|
121 |
+
} else {
|
122 |
+
self::$options = shortcode_atts( self::$defaults, $the_options);
|
123 |
+
}
|
124 |
+
return self::$options;
|
125 |
+
}
|
126 |
+
|
127 |
+
static function get_option($option_name) {
|
128 |
+
$options = self::get_options();
|
129 |
+
if ($option_name && $options && array_key_exists($option_name,$options))
|
130 |
+
return $options[$option_name];
|
131 |
+
else
|
132 |
+
return false;
|
133 |
+
}
|
134 |
+
|
135 |
+
static function get_terms() {
|
136 |
+
return self::get_option('terms');
|
137 |
+
}
|
138 |
+
|
139 |
+
static function get_term($term_name) {
|
140 |
+
$options = self::get_options();
|
141 |
+
$terms = is_array($options) && array_key_exists('terms',$options) ? $options['terms'] : false;
|
142 |
+
if ($term_name && $terms && array_key_exists($term_name,$terms) && $terms[$term_name])
|
143 |
+
return $terms[$term_name];
|
144 |
+
else
|
145 |
+
return self::get_default_term($term_name);
|
146 |
+
}
|
147 |
+
|
148 |
+
static function get_default_term($key) {
|
149 |
+
$default='';
|
150 |
+
switch ($key) {
|
151 |
+
case 'owner' : $default = self::get_term('site'); break;
|
152 |
+
case 'copyright' : $default = self::get_copyright(self::get_term('copyright_start_year')); break;
|
153 |
+
case 'copyright_start_year': $default = date('Y'); break;
|
154 |
+
case 'country' : $default = 'The United States'; break;
|
155 |
+
case 'courts' : $default = ucwords(sprintf('the courts of %1$s',self::get_option('country'))); break;
|
156 |
+
case 'email' : $default = 'privacy@'.strtolower(self::get_term('site')); break;
|
157 |
+
case 'site' : $default = self::get_default_site(); break;
|
158 |
+
case 'updated' : $default = date('d M Y'); break;
|
159 |
+
default: $default=''; //default is blank for others
|
160 |
+
}
|
161 |
+
return $default;
|
162 |
+
}
|
163 |
+
|
164 |
+
static function get_default_site() {
|
165 |
+
$domain = strtolower(parse_url(site_url(),PHP_URL_HOST));
|
166 |
+
$p = strpos($domain,'www.') ;
|
167 |
+
if (($p !== FALSE) && ($p == 0)) $domain = substr($domain,4);
|
168 |
+
return ucwords($domain);
|
169 |
+
}
|
170 |
+
|
171 |
+
static function get_copyright($startyear){
|
172 |
+
$thisyear = date("Y");
|
173 |
+
if(empty( $startyear)) $startyear = $thisyear;
|
174 |
+
return sprintf('Copyright © %1$s%2$s', $startyear, $thisyear == $startyear ? '' : ("-".$thisyear));
|
175 |
+
}
|
176 |
+
|
177 |
+
static function copyright_owner($attr){
|
178 |
+
$defaults['owner'] = self::get_term('owner');
|
179 |
+
$defaults['copyright_start_year'] = self::get_term('copyright_start_year');
|
180 |
+
$params = shortcode_atts( $defaults, $attr ); //apply plugin defaults
|
181 |
+
return sprintf('<span class="copyright">%1$s %2$s</span>',
|
182 |
+
self::get_copyright($params['copyright_start_year']), $params['owner']);
|
183 |
+
}
|
184 |
+
|
185 |
+
static function format_address ($address, $separator) {
|
186 |
+
$s='';
|
187 |
+
$addlines = explode(',', trim($address));
|
188 |
+
foreach ($addlines as $a) {
|
189 |
+
$a = trim($a);
|
190 |
+
if (!empty($a)) $s .= $a . $separator;
|
191 |
+
}
|
192 |
+
return $s;
|
193 |
+
}
|
194 |
+
|
195 |
+
static function footer_menu($menu) {
|
196 |
+
return self::filter_links(wp_nav_menu(array('menu' => $menu, 'echo' => false, 'container' => false)));
|
197 |
+
}
|
198 |
+
|
199 |
+
static function return_to_top( $text, $href, $class) {
|
200 |
+
if ('#'==$href) $href = self::$defaults['return_href'];
|
201 |
+
return sprintf( '<div class="%1$s"><a href="%2$s" rel="nofollow">%3$s</a></div>', trim($class), esc_url( $href), $text);
|
202 |
+
}
|
203 |
+
|
204 |
+
|
205 |
+
static function footer($atts = array()) {
|
206 |
+
$params = shortcode_atts( self::get_options(), $atts ); //apply plugin defaults
|
207 |
+
if ($params['center']) {
|
208 |
+
$line_separator = $params['separator'];
|
209 |
+
$params['return_class'] .= ' return-center';
|
210 |
+
$params['footer_class'] .= ' footer-center';
|
211 |
+
$clear = '';
|
212 |
+
} else {
|
213 |
+
$line_separator = '<br/>';
|
214 |
+
$params['return_class'] .= ' return-left';
|
215 |
+
$params['footer_class'] .= ' footer-right';
|
216 |
+
$clear = '<div class="clear"></div>';
|
217 |
+
}
|
218 |
+
$copyright = self::copyright_owner(self::get_terms());
|
219 |
+
$tel = self::get_term('telephone');
|
220 |
+
$address = self::get_term('address');
|
221 |
+
return (empty($params['show_return']) ? '' :
|
222 |
+
self::return_to_top($params['return_text'], $params['return_href'], $params['return_class'])) .
|
223 |
+
sprintf('<div id="%1$s" class="%2$s">%3$s%4$s%5$s%6$s</div>%7$s<!-- end #%1$s -->',
|
224 |
+
self::CODE,
|
225 |
+
$params['footer_class'],
|
226 |
+
(empty($params['nav_menu']) ? '' : self::footer_menu($params['nav_menu'])),
|
227 |
+
(empty($params['show_copyright']) ? '' : sprintf('%1$s%2$s', $line_separator, $copyright)),
|
228 |
+
((empty($telephone) || empty($params['show_telephone'])) ? '' : sprintf('%1$s<span class="telephone">%2$s</span>', $line_separator, $telephone) ),
|
229 |
+
((empty($address) || empty($params['show_address'])) ? '' : sprintf('%1$s<span class="address">%2$s%3$s</span>', $line_separator, self::format_address($address, $params['separator']), self::get_term('country')) ),
|
230 |
+
$clear
|
231 |
+
);
|
232 |
+
}
|
233 |
+
|
234 |
+
static function terms_filter($content) {
|
235 |
+
if ($terms = self::get_terms()) {
|
236 |
+
$from = array();
|
237 |
+
$to = array();
|
238 |
+
foreach ($terms as $term => $value) {
|
239 |
+
$from[] = '%%'.$term.'%%';
|
240 |
+
$to[] = $value;
|
241 |
+
}
|
242 |
+
return str_replace($from,$to,$content);
|
243 |
+
}
|
244 |
+
return $content;
|
245 |
+
}
|
246 |
+
|
247 |
+
static function custom_footer() {
|
248 |
+
if ( is_active_sidebar( self::SIDEBAR_ID) ) {
|
249 |
+
echo '<div class="custom-footer">';
|
250 |
+
dynamic_sidebar( self::SIDEBAR_ID );
|
251 |
+
echo '</div><!-- end .custom-footer -->';
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
static function add_footer_filter() {
|
256 |
+
add_filter('wp_list_bookmarks', array(self::CLASSNAME,'filter_links'),20); //nofollow links in custom footer widgets
|
257 |
+
}
|
258 |
+
|
259 |
+
static function filter_links( $content) {
|
260 |
+
return preg_replace_callback( '/<a([^>]*)>(.*?)<\/a[^>]*>/is', array( self::CLASSNAME, 'nofollow_link' ), $content );
|
261 |
+
}
|
262 |
+
|
263 |
+
static function nofollow_link($matches) { //make link nofollow
|
264 |
+
$attrs = shortcode_parse_atts( stripslashes ($matches[ 1 ]) );
|
265 |
+
if (isset($attrs['rel'])) return $matches[ 0 ]; //skip if already has a rel attribute
|
266 |
+
$atts='';
|
267 |
+
foreach ( $attrs AS $key => $value ) $atts .= sprintf('%1$s="%2$s" ', $key, $value);
|
268 |
+
$atts = substr( $atts, 0, -1 );
|
269 |
+
return sprintf('<a rel="nofollow" %1$s>%2$s</a>', $atts, $matches[ 2 ]);
|
270 |
+
}
|
271 |
+
}
|
272 |
+
|
273 |
+
class Footer_Putter_Copyright_Widget extends WP_Widget {
|
274 |
+
|
275 |
+
const DOMAIN = 'FooterCredits';
|
276 |
+
|
277 |
+
function __construct() {
|
278 |
+
$widget_ops = array( 'description' => __( "A widget displaying menu links, copyright and company details" ) );
|
279 |
+
parent::__construct('footer_copyright', __('Footer Copyright Widget'), $widget_ops);
|
280 |
+
}
|
281 |
+
|
282 |
+
function widget( $args, $instance ) {
|
283 |
+
extract( $args );
|
284 |
+
$footer_args=array();
|
285 |
+
echo $before_widget;
|
286 |
+
echo call_user_func(array(FOOTER_CREDITS,'footer'),$instance);
|
287 |
+
echo $after_widget;
|
288 |
+
}
|
289 |
+
|
290 |
+
function update( $new_instance, $old_instance ) {
|
291 |
+
$instance = $old_instance;
|
292 |
+
$instance['nav_menu'] = !empty($new_instance['nav_menu']) ? $new_instance['nav_menu'] : 0;
|
293 |
+
$instance['show_copyright'] = !empty($new_instance['show_copyright']) ? 1 : 0;
|
294 |
+
$instance['show_telephone'] = !empty($new_instance['show_telephone']) ? 1 : 0;
|
295 |
+
$instance['show_address'] = !empty($new_instance['show_address']) ? 1 : 0;
|
296 |
+
$instance['center'] = !empty($new_instance['center']) ? 1 : 0;;
|
297 |
+
$instance['show_return'] = !empty($new_instance['show_return']) ? 1 : 0;
|
298 |
+
return $instance;
|
299 |
+
}
|
300 |
+
|
301 |
+
function form( $instance ) {
|
302 |
+
$instance = wp_parse_args( (array) $instance,
|
303 |
+
array( 'show_return' => true,'nav_menu' => 0,'show_copyright' => true,'show_telephone' => true,'show_address' => true,'center' => true ) );
|
304 |
+
$nav_menu = isset( $instance['nav_menu'] ) ? (int) $instance['nav_menu'] : 0;
|
305 |
+
$show_return = isset( $instance['show_return'] ) ? (bool) $instance['show_return'] : false;
|
306 |
+
$show_copyright = isset( $instance['show_copyright'] ) ? (bool) $instance['show_copyright'] : false;
|
307 |
+
$show_telephone = isset( $instance['show_telephone'] ) ? (bool) $instance['show_telephone'] : false;
|
308 |
+
$show_address = isset( $instance['show_address'] ) ? (bool) $instance['show_address'] : false;
|
309 |
+
$center = isset( $instance['center'] ) ? (bool) $instance['center'] : false;
|
310 |
+
|
311 |
+
$menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
|
312 |
+
if ( !$menus ) {
|
313 |
+
echo '<p>'. sprintf( __('No menus have been created yet. <a href="%s">Create some</a>.', self::DOMAIN ), admin_url('nav-menus.php') ) .'</p>';
|
314 |
+
return;
|
315 |
+
}
|
316 |
+
?>
|
317 |
+
<p>
|
318 |
+
<label for="<?php echo $this->get_field_id('nav_menu'); ?>"><?php _e('Select Footer Menu:', self::DOMAIN ); ?></label>
|
319 |
+
<select id="<?php echo $this->get_field_id('nav_menu'); ?>" name="<?php echo $this->get_field_name('nav_menu'); ?>">
|
320 |
+
<?php
|
321 |
+
$selected = empty($nav_menu) ? ' selected="selected"' : '';
|
322 |
+
echo ('<option'.$selected.' value="0">Do not show a menu</option>');
|
323 |
+
foreach ( $menus as $menu ) {
|
324 |
+
$selected = $nav_menu == $menu->term_id ? ' selected="selected"' : '';
|
325 |
+
echo '<option'. $selected .' value="'. $menu->term_id .'">'. $menu->name .'</option>';
|
326 |
+
}
|
327 |
+
?>
|
328 |
+
</select>
|
329 |
+
</p>
|
330 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_copyright', self::DOMAIN ); ?>" name="<?php echo $this->get_field_name('show_copyright'); ?>"<?php checked( $show_copyright ); ?> />
|
331 |
+
<label for="<?php echo $this->get_field_id('show_copyright'); ?>"><?php _e( 'Show Copyright' ); ?></label><br />
|
332 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_telephone', self::DOMAIN ); ?>" name="<?php echo $this->get_field_name('show_telephone'); ?>"<?php checked( $show_telephone ); ?> />
|
333 |
+
<label for="<?php echo $this->get_field_id('show_telephone'); ?>"><?php _e( 'Show Telephone number', self::DOMAIN ); ?></label><br />
|
334 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_address', self::DOMAIN ); ?>" name="<?php echo $this->get_field_name('show_address'); ?>"<?php checked( $show_address ); ?> />
|
335 |
+
<label for="<?php echo $this->get_field_id('show_address'); ?>"><?php _e( 'Show Address', self::DOMAIN ); ?></label><br />
|
336 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('center', self::DOMAIN ); ?>" name="<?php echo $this->get_field_name('center'); ?>"<?php checked( $center ); ?> />
|
337 |
+
<label for="<?php echo $this->get_field_id('center'); ?>"><?php _e( 'Center Menu',self::DOMAIN ); ?></label><br/>
|
338 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_return', self::DOMAIN ); ?>" name="<?php echo $this->get_field_name('show_return'); ?>"<?php checked( $show_return ); ?> />
|
339 |
+
<label for="<?php echo $this->get_field_id('show_return'); ?>"><?php _e( 'Show Return To Top Link' ); ?></label><br />
|
340 |
+
<?php
|
341 |
+
}
|
342 |
+
}
|
343 |
+
|
344 |
+
class Footer_Putter_TradeMark_Widget extends WP_Widget {
|
345 |
+
const DOMAIN = 'FooterCredits';
|
346 |
+
|
347 |
+
function __construct() {
|
348 |
+
$widget_ops = array('description' => __( "Trademarks, Service Marks and Kitemarks" ) );
|
349 |
+
parent::__construct('footer_trademarks', __('TradeMarks Widget'), $widget_ops);
|
350 |
+
}
|
351 |
+
|
352 |
+
function widget( $args, $instance ) {
|
353 |
+
extract($args, EXTR_SKIP);
|
354 |
+
|
355 |
+
$category = isset($instance['category']) ? $instance['category'] : false;
|
356 |
+
$orderby = isset( $instance['orderby'] ) ? $instance['orderby'] : 'name';
|
357 |
+
$order = $orderby == 'rating' ? 'DESC' : 'ASC';
|
358 |
+
$limit = isset( $instance['limit'] ) ? $instance['limit'] : -1;
|
359 |
+
|
360 |
+
$links = wp_list_bookmarks(apply_filters('widget_links_args', array(
|
361 |
+
'echo' => 0,
|
362 |
+
'title_before' => $before_title, 'title_after' => $after_title,
|
363 |
+
'title_li' => '', 'categorize' => false,
|
364 |
+
'before' => '', 'after' => '',
|
365 |
+
'category_before' => '', 'category_after' => '',
|
366 |
+
'show_images' => true, 'show_description' => false,
|
367 |
+
'show_name' => false, 'show_rating' => false,
|
368 |
+
'category' => $category, 'class' => 'trademark widget',
|
369 |
+
'orderby' => $orderby, 'order' => $order,
|
370 |
+
'limit' => $limit,
|
371 |
+
)));
|
372 |
+
echo $before_widget;
|
373 |
+
echo call_user_func(array(FOOTER_CREDITS,'filter_links'),$links);
|
374 |
+
echo $after_widget;
|
375 |
+
}
|
376 |
+
|
377 |
+
function update( $new_instance, $old_instance ) {
|
378 |
+
$new_instance = (array) $new_instance;
|
379 |
+
|
380 |
+
$instance['orderby'] = 'name';
|
381 |
+
if ( in_array( $new_instance['orderby'], array( 'name', 'rating', 'id', 'rand' ) ) )
|
382 |
+
$instance['orderby'] = $new_instance['orderby'];
|
383 |
+
|
384 |
+
$instance['category'] = intval( $new_instance['category'] );
|
385 |
+
$instance['limit'] = ! empty( $new_instance['limit'] ) ? intval( $new_instance['limit'] ) : -1;
|
386 |
+
|
387 |
+
return $instance;
|
388 |
+
}
|
389 |
+
|
390 |
+
function form( $instance ) {
|
391 |
+
$instance = wp_parse_args( (array) $instance, array( 'category' => false, 'orderby' => 'name', 'limit' => -1 ) );
|
392 |
+
$link_cats = get_terms( 'link_category' );
|
393 |
+
if ( ! $limit = intval( $instance['limit'] ) ) { $limit = -1; } ?>
|
394 |
+
<p>
|
395 |
+
<label for="<?php echo $this->get_field_id('category'); ?>"><?php _e( 'Select Link Category for Your Trademarks:', self::DOMAIN ); ?></label>
|
396 |
+
<select class="widefat" id="<?php echo $this->get_field_id('category'); ?>" name="<?php echo $this->get_field_name('category'); ?>">
|
397 |
+
<?php
|
398 |
+
foreach ( $link_cats as $link_cat ) {
|
399 |
+
echo '<option value="' . intval($link_cat->term_id) . '"'
|
400 |
+
. ( $link_cat->term_id == $instance['category'] ? ' selected="selected"' : '' )
|
401 |
+
. '>' . $link_cat->name . "</option>\n";
|
402 |
+
}
|
403 |
+
?>
|
404 |
+
</select>
|
405 |
+
<label for="<?php echo $this->get_field_id('orderby'); ?>"><?php _e( 'Sort by:', self::DOMAIN ); ?></label>
|
406 |
+
<select name="<?php echo $this->get_field_name('orderby'); ?>" id="<?php echo $this->get_field_id('orderby'); ?>" class="widefat">
|
407 |
+
<option value="name"<?php selected( $instance['orderby'], 'name' ); ?>><?php _e( 'Link title', self::DOMAIN); ?></option>
|
408 |
+
<option value="rating"<?php selected( $instance['orderby'], 'rating' ); ?>><?php _e( 'Link rating', self::DOMAIN ); ?></option>
|
409 |
+
<option value="id"<?php selected( $instance['orderby'], 'id' ); ?>><?php _e( 'Link ID', self::DOMAIN ); ?></option>
|
410 |
+
<option value="rand"<?php selected( $instance['orderby'], 'rand' ); ?>><?php _e( 'Random', self::DOMAIN ); ?></option>
|
411 |
+
</select>
|
412 |
+
</p>
|
413 |
+
<p>
|
414 |
+
<label for="<?php echo $this->get_field_id('limit'); ?>"><?php _e( 'Number of links to show:', self::DOMAIN ); ?></label>
|
415 |
+
<input id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" type="text" value="<?php echo $limit == -1 ? '' : intval( $limit ); ?>" size="3" />
|
416 |
+
</p>
|
417 |
+
<?php
|
418 |
+
}
|
419 |
+
}
|
icon-32.png
ADDED
Binary file
|
logo.png
ADDED
Binary file
|
main.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
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.0
|
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.0');
|
13 |
+
define('FOOTER_PUTTER_FRIENDLY_NAME', 'Footer Putter') ;
|
14 |
+
define('FOOTER_PUTTER_PLUGIN_NAME', 'footer-putter') ;
|
15 |
+
define('FOOTER_PUTTER_HOME_URL','http://www.diywebmastery.com/plugins/footer-putter/');
|
16 |
+
define('FOOTER_CREDITS','FooterCredits');
|
17 |
+
$dir = dirname(__FILE__) . '/';
|
18 |
+
require_once($dir . 'footer-credits.php');
|
19 |
+
call_user_func(array(FOOTER_CREDITS,'init'),FOOTER_PUTTER_VERSION);
|
20 |
+
if (is_admin()) {
|
21 |
+
require_once($dir . 'footer-credits-admin.php');
|
22 |
+
require_once($dir . 'admin.php');
|
23 |
+
}
|
24 |
+
?>
|
menu-icon.png
ADDED
Binary file
|
readme.txt
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Footer Putter ===
|
2 |
+
Contributors: powerblogservice, diywebmastery
|
3 |
+
Donate link: http://www.diywebmastery.com/donate/
|
4 |
+
Tags: footer, copyright, rel=nofollow
|
5 |
+
Requires at least: 3.0
|
6 |
+
Tested up to: 3.5
|
7 |
+
Stable tag: 1.0
|
8 |
+
License: GPLv2+
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Put a footer on your site that boosts your credibility with both search engines and human visitors.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
* Footer Putter can create two widgets: a Footer Copyright Widget and a Trademarks Widget
|
15 |
+
* Include your site accreditations to demonstrate that your business meets the required standards for your industry
|
16 |
+
* Create a footer that gives your site the credibility that it belongs to a real business
|
17 |
+
* Include a footer menu with links to Contact, Privacy and Terms and Conditions Pages
|
18 |
+
* Include a copyright statement that updates automatically when the year changes - an out of date copyright is a negative signal for Google
|
19 |
+
* Include a telephone number to prove you are a real business
|
20 |
+
* Include a postal address to prove you are a real business
|
21 |
+
* Supports both a single line centred footer and a multi-line right aligned footer
|
22 |
+
* The Footer hook setting allows you to add the footer in just the right place on themes that do not have suitable widget areas
|
23 |
+
* Ensures all links in the footer widgets are rel=nofollow in line with best SEO recommendations
|
24 |
+
|
25 |
+
== Installation ==
|
26 |
+
|
27 |
+
* Install Footer Putter either via the WordPress.org plugin directory, or by uploading the zip file to your server
|
28 |
+
|
29 |
+
== Frequently Asked Questions ==
|
30 |
+
|
31 |
+
* Why is a footer important? By creating an appropriate footer you can enhance the credibility of your site by informing visitors on how to contact you, asserting copyright over the site content, setting out the legal terms and conditions for using the site, and establishing the trade associations or other bodies that recognize the legitimacy of your business.
|
32 |
+
|
33 |
+
* Why use rel=nofollow links? Links in the footer appear on every page on the site so you want to tell the search engines not to follow these links. After all, just because every page on the site may link to the "About Us", "Contact Us", "Terms of Service", and "Privacy Policy" pages doesn't mean you want these to be the top ranking pages on your site after the home page.
|
34 |
+
|
35 |
+
== Screenshots ==
|
36 |
+
1. Example of a footer with both a copyright widget and a trademark widget
|
37 |
+
|
38 |
+
== Changelog ==
|
39 |
+
|
40 |
+
= 1.0 = Initial release
|
41 |
+
|
42 |
+
== Upgrade Notice ==
|
43 |
+
|
44 |
+
= 1.0 =
|
45 |
+
* Mandatory - initial version
|
46 |
+
|
47 |
+
== Links ==
|
48 |
+
|
49 |
+
Here are some of the useful Footer Putter WordPress Plugin links
|
50 |
+
|
51 |
+
* Footer Putter Plugin: http://www.diywebmastery.com/plugins/footer-putter/
|
52 |
+
* Compatible Themes and Hooks: http://www.diywebmastery.com/footer-credits-compatible-themes-and-hooks
|
screenshot-1.jpg
ADDED
Binary file
|
style.css
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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; }
|
4 |
+
#footer #footer-credits ul, #footer #footer-credits ul li, #footer-credits ul, #footer-credits ul li {
|
5 |
+
display : inline-block; list-style-type: none; background: none; border: 0; margin: 0px; padding: 0; vertical-align: middle; }
|
6 |
+
#footer #footer-credits ul li:before, #footer-credits ul li:before {
|
7 |
+
content : '\B7'; }
|
8 |
+
#footer #footer-credits ul li:first-child:before, #footer-credits ul li:first-child:before {
|
9 |
+
content : ''; }
|
10 |
+
#footer #footer-credits ul li a, #footer-credits ul li a {
|
11 |
+
text-decoration: none; color: inherit; font-weight: normal; letter-spacing : normal; text-transform: none; margin:0 10px; }
|
12 |
+
#footer #footer-credits ul li a:hover, #footer-credits ul li a:hover {
|
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; }
|
17 |
+
.custom-footer .white a, #footer-credits.white { color : white; }
|
18 |
+
.custom-footer, .widget_footer_trademarks { text-align: center; margin: 10px 0;}
|
19 |
+
.custom-footer .widget_footer_trademarks a, .widget_footer_trademarks a { margin: 10px; }
|