eddiemachado 13 лет назад
Родитель
Сommit
37e0d6bdd2
1 измененных файлов с 20 добавлено и 20 удалено
  1. 20 20
      library/admin.php

+ 20 - 20
library/admin.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-/* 
+/*
 This file handles the admin area and functions.
 This file handles the admin area and functions.
 You can use this file to make changes to the
 You can use this file to make changes to the
 dashboard. Updates to this page are coming soon.
 dashboard. Updates to this page are coming soon.
@@ -26,15 +26,15 @@ function disable_default_dashboard_widgets() {
 
 
 	// remove_meta_box('dashboard_quick_press', 'dashboard', 'core');  // Quick Press Widget
 	// remove_meta_box('dashboard_quick_press', 'dashboard', 'core');  // Quick Press Widget
 	remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core');   // Recent Drafts Widget
 	remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core');   // Recent Drafts Widget
-	remove_meta_box('dashboard_primary', 'dashboard', 'core');         // 
+	remove_meta_box('dashboard_primary', 'dashboard', 'core');         //
 	remove_meta_box('dashboard_secondary', 'dashboard', 'core');       //
 	remove_meta_box('dashboard_secondary', 'dashboard', 'core');       //
-	
-	// removing plugin dashboard boxes 
+
+	// removing plugin dashboard boxes
 	remove_meta_box('yoast_db_widget', 'dashboard', 'normal');         // Yoast's SEO Plugin Widget
 	remove_meta_box('yoast_db_widget', 'dashboard', 'normal');         // Yoast's SEO Plugin Widget
-	
-	/* 
-	have more plugin widgets you'd like to remove? 
-	share them with us so we can get a list of 
+
+	/*
+	have more plugin widgets you'd like to remove?
+	share them with us so we can get a list of
 	the most commonly used. :D
 	the most commonly used. :D
 	https://github.com/eddiemachado/bones/issues
 	https://github.com/eddiemachado/bones/issues
 	*/
 	*/
@@ -42,7 +42,7 @@ function disable_default_dashboard_widgets() {
 
 
 /*
 /*
 Now let's talk about adding your own custom Dashboard widget.
 Now let's talk about adding your own custom Dashboard widget.
-Sometimes you want to show clients feeds relative to their 
+Sometimes you want to show clients feeds relative to their
 site's content. For example, the NBA.com feed for a sports
 site's content. For example, the NBA.com feed for a sports
 site. Here is an example Dashboard Widget that displays recent
 site. Here is an example Dashboard Widget that displays recent
 entries from an RSS Feed.
 entries from an RSS Feed.
@@ -51,7 +51,7 @@ For more information on creating Dashboard Widgets, view:
 http://digwp.com/2010/10/customize-wordpress-dashboard/
 http://digwp.com/2010/10/customize-wordpress-dashboard/
 */
 */
 
 
-// RSS Dashboard Widget 
+// RSS Dashboard Widget
 function bones_rss_dashboard_widget() {
 function bones_rss_dashboard_widget() {
 	if(function_exists('fetch_feed')) {
 	if(function_exists('fetch_feed')) {
 		include_once(ABSPATH . WPINC . '/feed.php');               // include the required file
 		include_once(ABSPATH . WPINC . '/feed.php');               // include the required file
@@ -59,7 +59,7 @@ function bones_rss_dashboard_widget() {
 		$limit = $feed->get_item_quantity(7);                      // specify number of items
 		$limit = $feed->get_item_quantity(7);                      // specify number of items
 		$items = $feed->get_items(0, $limit);                      // create an array of items
 		$items = $feed->get_items(0, $limit);                      // create an array of items
 	}
 	}
-	if ($limit == 0) echo '<div>The RSS Feed is either empty or unavailable.</div>';   // fallback message 
+	if ($limit == 0) echo '<div>The RSS Feed is either empty or unavailable.</div>';   // fallback message
 	else foreach ($items as $item) : ?>
 	else foreach ($items as $item) : ?>
 
 
 	<h4 style="margin-bottom: 0;">
 	<h4 style="margin-bottom: 0;">
@@ -68,16 +68,16 @@ function bones_rss_dashboard_widget() {
 		</a>
 		</a>
 	</h4>
 	</h4>
 	<p style="margin-top: 0.5em;">
 	<p style="margin-top: 0.5em;">
-		<?php echo substr($item->get_description(), 0, 200); ?> 
+		<?php echo substr($item->get_description(), 0, 200); ?>
 	</p>
 	</p>
-	<?php endforeach; 
+	<?php endforeach;
 }
 }
 
 
 // calling all custom dashboard widgets
 // calling all custom dashboard widgets
 function bones_custom_dashboard_widgets() {
 function bones_custom_dashboard_widgets() {
 	wp_add_dashboard_widget('bones_rss_dashboard_widget', 'Recently on Themble (Customize on admin.php)', 'bones_rss_dashboard_widget');
 	wp_add_dashboard_widget('bones_rss_dashboard_widget', 'Recently on Themble (Customize on admin.php)', 'bones_rss_dashboard_widget');
 	/*
 	/*
-	Be sure to drop any other created Dashboard Widgets 
+	Be sure to drop any other created Dashboard Widgets
 	in this function and they will all load.
 	in this function and they will all load.
 	*/
 	*/
 }
 }
@@ -91,17 +91,17 @@ add_action('wp_dashboard_setup', 'bones_custom_dashboard_widgets');
 
 
 /************* CUSTOM LOGIN PAGE *****************/
 /************* CUSTOM LOGIN PAGE *****************/
 
 
-// calling your own login css so you can style it 
+// calling your own login css so you can style it
 function bones_login_css() {
 function bones_login_css() {
 	/* i couldn't get wp_enqueue_style to work :( */
 	/* i couldn't get wp_enqueue_style to work :( */
 	echo '<link rel="stylesheet" href="' . get_stylesheet_directory_uri() . '/library/css/login.css">';
 	echo '<link rel="stylesheet" href="' . get_stylesheet_directory_uri() . '/library/css/login.css">';
 }
 }
 
 
-// changing the logo link from wordpress.org to your site 
-function bones_login_url() {  echo home_url(); }
+// changing the logo link from wordpress.org to your site
+function bones_login_url() {  return home_url(); }
 
 
-// changing the alt text on the logo to show your site name 
-function bones_login_title() { echo get_option('blogname'); }
+// changing the alt text on the logo to show your site name
+function bones_login_title() { return get_option('blogname'); }
 
 
 // calling it only on the login page
 // calling it only on the login page
 add_action('login_head', 'bones_login_css');
 add_action('login_head', 'bones_login_css');
@@ -114,7 +114,7 @@ add_filter('login_headertitle', 'bones_login_title');
 /*
 /*
 I don't really reccomend editing the admin too much
 I don't really reccomend editing the admin too much
 as things may get funky if Wordpress updates. Here
 as things may get funky if Wordpress updates. Here
-are a few funtions which you can choose to use if 
+are a few funtions which you can choose to use if
 you like.
 you like.
 */
 */