Permalink
Browse files

Disable Credits and other tweaks

Credits can now be disabled. I also fixed other small amenities.
  • Loading branch information...
1 parent 93c0e74 commit 0f8a024ec7abc67aff7a12ebb62e92adb9538673 @Facens committed Sep 3, 2011
Showing with 59 additions and 38 deletions.
  1. +2 −2 404.php
  2. +2 −2 archive.php
  3. +2 −2 attachment.php
  4. +2 −2 author.php
  5. +2 −2 category.php
  6. +2 −2 comments.php
  7. +14 −8 footer.php
  8. +2 −2 functions.php
  9. +2 −2 header.php
  10. +2 −2 index.php
  11. +2 −2 loop.php
  12. +2 −2 page.php
  13. +2 −2 search.php
  14. +2 −2 sidebar.php
  15. +2 −2 single.php
  16. +2 −2 tag.php
  17. +15 −0 theme-options.php
View
4 404.php
@@ -3,8 +3,8 @@
* The template for displaying 404 pages (Not Found).
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
4 archive.php
@@ -8,8 +8,8 @@
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
4 attachment.php
@@ -3,8 +3,8 @@
* The template for displaying attachments.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
4 author.php
@@ -3,8 +3,8 @@
* The template for displaying Author Archive pages.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
4 category.php
@@ -3,8 +3,8 @@
* The template for displaying Category Archive pages.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
4 comments.php
@@ -8,8 +8,8 @@
* located in the functions.php file.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
?>
View
22 footer.php
@@ -6,8 +6,8 @@
* after. Calls sidebar-footer.php for bottom widgets.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
?>
<footer>
@@ -21,19 +21,25 @@
global $sa_options;
$sa_settings = get_option( 'sa_options', $sa_options );
?>
+
<?php
if( $sa_settings['iubenda_id'] != '' ) :
?>
<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>
<script type="text/javascript" src="http://cdn.iubenda.com/iubenda.js"></script>
<?php endif; ?>
+
+ <?php
+ if( $sa_settings['credits'] == 'true' ) :
+ ?>
+
+ <div style="float: right">
+ <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>
+ -
+ <a href="http://wordpress.org/" title="Semantic Personal Publishing Platform" rel="generator">Proudly powered by WordPress </a>
+ </div>
-
- <div style="float: right">
- <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>
- -
- <a href="http://wordpress.org/" title="Semantic Personal Publishing Platform" rel="generator">Proudly powered by WordPress </a>
- </div>
+ <?php endif; ?>
<?php
/* Always have wp_footer() just before the closing </body>
View
4 functions.php
@@ -34,8 +34,8 @@
* For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
/**
View
4 header.php
@@ -5,8 +5,8 @@
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
?>
<!DOCTYPE html>
View
4 index.php
@@ -9,8 +9,8 @@
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
4 loop.php
@@ -14,8 +14,8 @@
* <code>get_template_part( 'loop', 'index' );</code>
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
?>
<?php
View
4 page.php
@@ -8,8 +8,8 @@
* different template.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
4 search.php
@@ -3,8 +3,8 @@
* The template for displaying Search Results pages.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
4 sidebar.php
@@ -3,8 +3,8 @@
* The Sidebar containing the primary and secondary widget areas.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
?>
View
4 single.php
@@ -3,8 +3,8 @@
* The Template for displaying all single posts.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
4 tag.php
@@ -3,8 +3,8 @@
* The template for displaying Tag Archive pages.
*
* @package WordPress
- * @subpackage Starkers
- * @since Starkers 3.0
+ * @subpackage wpbootstrap
+ * @since wpbootstrap 0.1
*/
get_header(); ?>
View
15 theme-options.php
@@ -4,6 +4,7 @@
$sa_options = array(
'social_buttons' => false,
'sidebar_feed' => true,
+ 'credits' => true,
'compact_homepage' => false,
'nav_view' => 'pills',
'iubenda_id' => '',
@@ -131,6 +132,14 @@ function sa_theme_options_page() {
</td>
</tr>
+ <tr valign="top"><th scope="row">Credits</th>
+ <td>
+ <p>
+ <input type="checkbox" id="credits" name="sa_options[credits]" value="1" <?php checked( true, $settings['credits'] ); ?> />
+ <label for="credits">Enable the credits on the footer</label>
+ </p>
+ </td>
+ </tr>
</table>
@@ -155,6 +164,12 @@ function sa_validate_options( $input ) {
$input['social_buttons'] = ( $input['social_buttons'] == 1 ? 1 : 0 );
// If the checkbox has not been checked, we void it
+ if ( ! isset( $input['credits'] ) )
+ $input['credits'] = null;
+ // We verify if the input is a boolean value
+ $input['credits'] = ( $input['credits'] == 1 ? 1 : 0 );
+
+ // If the checkbox has not been checked, we void it
if ( ! isset( $input['sidebar_feed'] ) )
$input['sidebar_feed'] = null;
// We verify if the input is a boolean value

0 comments on commit 0f8a024

Please sign in to comment.