Skip to content

Commit 0f8a024

Browse files
committed
Disable Credits and other tweaks
Credits can now be disabled. I also fixed other small amenities.
1 parent 93c0e74 commit 0f8a024

17 files changed

+59
-38
lines changed

404.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* The template for displaying 404 pages (Not Found).
44
*
55
* @package WordPress
6-
* @subpackage Starkers
7-
* @since Starkers 3.0
6+
* @subpackage wpbootstrap
7+
* @since wpbootstrap 0.1
88
*/
99

1010
get_header(); ?>

archive.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* Learn more: http://codex.wordpress.org/Template_Hierarchy
99
*
1010
* @package WordPress
11-
* @subpackage Starkers
12-
* @since Starkers 3.0
11+
* @subpackage wpbootstrap
12+
* @since wpbootstrap 0.1
1313
*/
1414

1515
get_header(); ?>

attachment.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* The template for displaying attachments.
44
*
55
* @package WordPress
6-
* @subpackage Starkers
7-
* @since Starkers 3.0
6+
* @subpackage wpbootstrap
7+
* @since wpbootstrap 0.1
88
*/
99

1010
get_header(); ?>

author.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* The template for displaying Author Archive pages.
44
*
55
* @package WordPress
6-
* @subpackage Starkers
7-
* @since Starkers 3.0
6+
* @subpackage wpbootstrap
7+
* @since wpbootstrap 0.1
88
*/
99

1010
get_header(); ?>

category.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* The template for displaying Category Archive pages.
44
*
55
* @package WordPress
6-
* @subpackage Starkers
7-
* @since Starkers 3.0
6+
* @subpackage wpbootstrap
7+
* @since wpbootstrap 0.1
88
*/
99

1010
get_header(); ?>

comments.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* located in the functions.php file.
99
*
1010
* @package WordPress
11-
* @subpackage Starkers
12-
* @since Starkers 3.0
11+
* @subpackage wpbootstrap
12+
* @since wpbootstrap 0.1
1313
*/
1414
?>
1515

footer.php

+14-8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* after. Calls sidebar-footer.php for bottom widgets.
77
*
88
* @package WordPress
9-
* @subpackage Starkers
10-
* @since Starkers 3.0
9+
* @subpackage wpbootstrap
10+
* @since wpbootstrap 0.1
1111
*/
1212
?>
1313
<footer>
@@ -21,19 +21,25 @@
2121
global $sa_options;
2222
$sa_settings = get_option( 'sa_options', $sa_options );
2323
?>
24+
2425
<?php
2526
if( $sa_settings['iubenda_id'] != '' ) :
2627
?>
2728
<a href="http://www.iubenda.com/privacy-policy/<?php echo $sa_settings['iubenda_id']; ?>" class="iubenda-green-xs" id="iubenda-embed" title="Privacy Policy">Privacy Policy (by iubenda)</a>
2829
<script type="text/javascript" src="http://cdn.iubenda.com/iubenda.js"></script>
2930
<?php endif; ?>
31+
32+
<?php
33+
if( $sa_settings['credits'] == 'true' ) :
34+
?>
35+
36+
<div style="float: right">
37+
<a href="http://wpbootstrap.iubenda.com/">Bootstrap for Wordpress</a> is a theme based on the <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap toolkit</a>
38+
-
39+
<a href="http://wordpress.org/" title="Semantic Personal Publishing Platform" rel="generator">Proudly powered by WordPress </a>
40+
</div>
3041

31-
32-
<div style="float: right">
33-
<a href="http://wpbootstrap.iubenda.com/">Bootstrap for Wordpress</a> is a theme based on the <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap toolkit</a>
34-
-
35-
<a href="http://wordpress.org/" title="Semantic Personal Publishing Platform" rel="generator">Proudly powered by WordPress </a>
36-
</div>
42+
<?php endif; ?>
3743

3844
<?php
3945
/* Always have wp_footer() just before the closing </body>

functions.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
* For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
3535
*
3636
* @package WordPress
37-
* @subpackage Starkers
38-
* @since Starkers 3.0
37+
* @subpackage wpbootstrap
38+
* @since wpbootstrap 0.1
3939
*/
4040

4141
/**

header.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* Displays all of the <head> section and everything up till <div id="main">
66
*
77
* @package WordPress
8-
* @subpackage Starkers
9-
* @since Starkers 3.0
8+
* @subpackage wpbootstrap
9+
* @since wpbootstrap 0.1
1010
*/
1111
?>
1212
<!DOCTYPE html>

index.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* Learn more: http://codex.wordpress.org/Template_Hierarchy
1010
*
1111
* @package WordPress
12-
* @subpackage Starkers
13-
* @since Starkers 3.0
12+
* @subpackage wpbootstrap
13+
* @since wpbootstrap 0.1
1414
*/
1515

1616
get_header(); ?>

loop.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* <code>get_template_part( 'loop', 'index' );</code>
1515
*
1616
* @package WordPress
17-
* @subpackage Starkers
18-
* @since Starkers 3.0
17+
* @subpackage wpbootstrap
18+
* @since wpbootstrap 0.1
1919
*/
2020
?>
2121
<?php

page.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* different template.
99
*
1010
* @package WordPress
11-
* @subpackage Starkers
12-
* @since Starkers 3.0
11+
* @subpackage wpbootstrap
12+
* @since wpbootstrap 0.1
1313
*/
1414

1515
get_header(); ?>

search.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* The template for displaying Search Results pages.
44
*
55
* @package WordPress
6-
* @subpackage Starkers
7-
* @since Starkers 3.0
6+
* @subpackage wpbootstrap
7+
* @since wpbootstrap 0.1
88
*/
99

1010
get_header(); ?>

sidebar.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* The Sidebar containing the primary and secondary widget areas.
44
*
55
* @package WordPress
6-
* @subpackage Starkers
7-
* @since Starkers 3.0
6+
* @subpackage wpbootstrap
7+
* @since wpbootstrap 0.1
88
*/
99
?>
1010

single.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* The Template for displaying all single posts.
44
*
55
* @package WordPress
6-
* @subpackage Starkers
7-
* @since Starkers 3.0
6+
* @subpackage wpbootstrap
7+
* @since wpbootstrap 0.1
88
*/
99

1010
get_header(); ?>

tag.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* The template for displaying Tag Archive pages.
44
*
55
* @package WordPress
6-
* @subpackage Starkers
7-
* @since Starkers 3.0
6+
* @subpackage wpbootstrap
7+
* @since wpbootstrap 0.1
88
*/
99

1010
get_header(); ?>

theme-options.php

+15
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
$sa_options = array(
55
'social_buttons' => false,
66
'sidebar_feed' => true,
7+
'credits' => true,
78
'compact_homepage' => false,
89
'nav_view' => 'pills',
910
'iubenda_id' => '',
@@ -131,6 +132,14 @@ function sa_theme_options_page() {
131132
</td>
132133
</tr>
133134

135+
<tr valign="top"><th scope="row">Credits</th>
136+
<td>
137+
<p>
138+
<input type="checkbox" id="credits" name="sa_options[credits]" value="1" <?php checked( true, $settings['credits'] ); ?> />
139+
<label for="credits">Enable the credits on the footer</label>
140+
</p>
141+
</td>
142+
</tr>
134143

135144
</table>
136145

@@ -154,6 +163,12 @@ function sa_validate_options( $input ) {
154163
// We verify if the input is a boolean value
155164
$input['social_buttons'] = ( $input['social_buttons'] == 1 ? 1 : 0 );
156165

166+
// If the checkbox has not been checked, we void it
167+
if ( ! isset( $input['credits'] ) )
168+
$input['credits'] = null;
169+
// We verify if the input is a boolean value
170+
$input['credits'] = ( $input['credits'] == 1 ? 1 : 0 );
171+
157172
// If the checkbox has not been checked, we void it
158173
if ( ! isset( $input['sidebar_feed'] ) )
159174
$input['sidebar_feed'] = null;

0 commit comments

Comments
 (0)