Passed
Push — master ( 7aa3c1...048399 )
by SILENT
03:08
created
assets/admin.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -26,20 +26,20 @@  discard block
 block discarded – undo
26 26
  */
27 27
 function disable_default_dashboard_widgets() {
28 28
 	global $wp_meta_boxes;
29
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity'] );        // Activity Widget.
30
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); // Comments Widget.
31
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );  // Incoming Links Widget.
32
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );         // Plugins Widget.
29
+	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); // Activity Widget.
30
+	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); // Comments Widget.
31
+	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // Incoming Links Widget.
32
+	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); // Plugins Widget.
33 33
 
34
-	unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] );       // Quick Press Widget.
35
-	unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts'] );     // Recent Drafts Widget.
36
-	unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );           // WordPress related feed.
37
-	unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );         //
34
+	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); // Quick Press Widget.
35
+	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); // Recent Drafts Widget.
36
+	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); // WordPress related feed.
37
+	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); //
38 38
 
39 39
 	// remove plugin dashboard boxes
40
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget'] );           // Yoast's SEO Plugin Widget.
41
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard'] );        // Gravity Forms Plugin Widget.
42
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now'] );   // bbPress Plugin Widget.
40
+	unset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']); // Yoast's SEO Plugin Widget.
41
+	unset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']); // Gravity Forms Plugin Widget.
42
+	unset($wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now']); // bbPress Plugin Widget.
43 43
 
44 44
 	/*
45 45
 	Have more plugin widgets you'd like to remove?
@@ -62,27 +62,27 @@  discard block
 block discarded – undo
62 62
  * RSS Dasboars Widget
63 63
  */
64 64
 function strip_rss_dashboard_widget() {
65
-	if ( function_exists( 'fetch_feed' ) ) {
66
-		$feed = fetch_feed( 'https://silent-comics.tumblr.com/rss/' );// specify the source feed.
67
-		if ( is_wp_error( $feed ) ) {
65
+	if (function_exists('fetch_feed')) {
66
+		$feed = fetch_feed('https://silent-comics.tumblr.com/rss/'); // specify the source feed.
67
+		if (is_wp_error($feed)) {
68 68
 			return;
69 69
 		}
70
-			$limit = $feed->get_item_quantity( 7 );                        // specify number of items.
71
-			$items = $feed->get_items( 0, $limit );                        // create an array of items.
70
+			$limit = $feed->get_item_quantity(7); // specify number of items.
71
+			$items = $feed->get_items(0, $limit); // create an array of items.
72 72
 	}
73
-	if ( 0 ) { echo '<div>The RSS Feed is either empty or unavailable.</div>'; // fallback message.
73
+	if (0) { echo '<div>The RSS Feed is either empty or unavailable.</div>'; // fallback message.
74 74
 		return;
75 75
 	}
76
-	foreach ( $items as $item ) { ?>
76
+	foreach ($items as $item) { ?>
77 77
 
78 78
 			<h4 style="margin-bottom: 0;">
79
-				<a href="<?php echo $item->get_permalink(); ?>" title="<?php echo mysql2date( __( 'j F Y @ g:i a', 'strip' ), $item->get_date( 'Y-m-d H:i:s' ) ); ?>" target="_blank">
80
-					<?php echo esc_attr( $item->get_title() ); ?>
79
+				<a href="<?php echo $item->get_permalink(); ?>" title="<?php echo mysql2date(__('j F Y @ g:i a', 'strip'), $item->get_date('Y-m-d H:i:s')); ?>" target="_blank">
80
+					<?php echo esc_attr($item->get_title()); ?>
81 81
 				</a>
82 82
 			</h4>
83 83
 			<p style="margin-top: 0.5em;
84 84
 					  .inside { max-width: 240px;}">
85
-			<?php echo substr( $item->get_description(), 0, 600 ); ?>
85
+			<?php echo substr($item->get_description(), 0, 600); ?>
86 86
 			</p>
87 87
 			<?php
88 88
 	}
@@ -92,16 +92,16 @@  discard block
 block discarded – undo
92 92
  * Calling all custom dashboard widgets.
93 93
  */
94 94
 function strip_custom_dashboard_widgets() {
95
-	wp_add_dashboard_widget( 'strip_rss_dashboard_widget', __( 'SILENT COMICS on tumblr', 'strip' ), 'strip_rss_dashboard_widget' );
95
+	wp_add_dashboard_widget('strip_rss_dashboard_widget', __('SILENT COMICS on tumblr', 'strip'), 'strip_rss_dashboard_widget');
96 96
 	/**
97 97
 	* Be sure to drop any other created Dashboard Widgets.
98 98
 	* in this function and they will all load.
99 99
 	*/
100 100
 }
101 101
 // removing the dashboard widgets.
102
-add_action( 'wp_dashboard_setup', 'disable_default_dashboard_widgets' );
102
+add_action('wp_dashboard_setup', 'disable_default_dashboard_widgets');
103 103
 // adding any custom widgets.
104
-add_action( 'wp_dashboard_setup', 'strip_custom_dashboard_widgets' );
104
+add_action('wp_dashboard_setup', 'strip_custom_dashboard_widgets');
105 105
 
106 106
 
107 107
 /************* CUSTOM LOGIN PAGE *****************/
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
  * See http://codex.wordpress.org/Plugin_API/Action_Reference/login_enqueue_scripts.
113 113
  */
114 114
 function strip_login_css() {
115
-	 wp_enqueue_style( 'strip_login_css', get_template_directory_uri() . '/assets/css/login.css', false );
115
+	 wp_enqueue_style('strip_login_css', get_template_directory_uri() . '/assets/css/login.css', false);
116 116
 
117 117
 	// Enqueue custom font to the login form.
118
-	wp_enqueue_style( 'inconsolata', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null );
118
+	wp_enqueue_style('inconsolata', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null);
119 119
 }
120 120
 
121 121
 /**
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
 	 * @return blog title.
133 133
 	 */
134 134
 function strip_login_title() {
135
-	return get_option( 'blogname' ); }
135
+	return get_option('blogname'); }
136 136
 
137 137
 // calling it only on the login page.
138
-add_action( 'login_enqueue_scripts', 'strip_login_css', 10 );
138
+add_action('login_enqueue_scripts', 'strip_login_css', 10);
139 139
 // Add custom font to the login form.
140
-add_action( 'login_enqueue_scripts', 'inconsolata.css', 10 );
141
-add_filter( 'login_headerurl', 'strip_login_url' );
142
-add_filter( 'login_headertitle', 'strip_login_title' );
140
+add_action('login_enqueue_scripts', 'inconsolata.css', 10);
141
+add_filter('login_headerurl', 'strip_login_url');
142
+add_filter('login_headertitle', 'strip_login_title');
143 143
 
144 144
 
145 145
 /************* CUSTOMIZE ADMIN *******************/
@@ -156,10 +156,10 @@  discard block
 block discarded – undo
156 156
  */
157 157
 function strip_custom_admin_footer() {
158 158
 	?>
159
-	<span id="footer-thankyou"><a href="<?php echo esc_url( __( 'http://silent-comics.com/', 'strip' ) ); ?>"><?php printf( esc_html__( 'Developed by %s', 'strip' ), 'Silent Comics' ); ?></a>
159
+	<span id="footer-thankyou"><a href="<?php echo esc_url(__('http://silent-comics.com/', 'strip')); ?>"><?php printf(esc_html__('Developed by %s', 'strip'), 'Silent Comics'); ?></a>
160 160
 			<span class="sep"> | </span>
161
-			<a href="<?php echo esc_url( __( 'https://github.com/SilentComics/Strip/', 'strip' ) ); ?>"><?php printf( esc_html__( 'Contribute on %s', 'strip' ), 'GitHub' ); ?></a>
161
+			<a href="<?php echo esc_url(__('https://github.com/SilentComics/Strip/', 'strip')); ?>"><?php printf(esc_html__('Contribute on %s', 'strip'), 'GitHub'); ?></a>
162 162
 <?php }
163 163
 
164 164
 // adding it to the admin area.
165
-add_filter( 'admin_footer_text', 'strip_custom_admin_footer' );
165
+add_filter('admin_footer_text', 'strip_custom_admin_footer');
Please login to merge, or discard this patch.