Passed
Push — master ( c6bf03...ba123f )
by SILENT
02:44
created
assets/admin.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -25,20 +25,20 @@  discard block
 block discarded – undo
25 25
  */
26 26
 function disable_default_dashboard_widgets() {
27 27
 	global $wp_meta_boxes;
28
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity'] );        // Activity Widget.
29
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); // Comments Widget.
30
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );  // Incoming Links Widget.
31
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );         // Plugins Widget.
28
+	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); // Activity Widget.
29
+	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); // Comments Widget.
30
+	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // Incoming Links Widget.
31
+	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); // Plugins Widget.
32 32
 
33
-	unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] );       // Quick Press Widget.
34
-	unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts'] );     // Recent Drafts Widget.
35
-	unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );           // WordPress related feed.
36
-	unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );         //
33
+	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); // Quick Press Widget.
34
+	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); // Recent Drafts Widget.
35
+	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); // WordPress related feed.
36
+	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); //
37 37
 
38 38
 	// remove plugin dashboard boxes
39
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget'] );           // Yoast's SEO Plugin Widget.
40
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard'] );        // Gravity Forms Plugin Widget.
41
-	unset( $wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now'] );   // bbPress Plugin Widget.
39
+	unset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']); // Yoast's SEO Plugin Widget.
40
+	unset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']); // Gravity Forms Plugin Widget.
41
+	unset($wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now']); // bbPress Plugin Widget.
42 42
 
43 43
 	/*
44 44
 	Have more plugin widgets you'd like to remove?
@@ -61,31 +61,31 @@  discard block
 block discarded – undo
61 61
  * RSS Dasboars Widget
62 62
  */
63 63
 function strip_rss_dashboard_widget() {
64
-	if ( function_exists( 'fetch_feed' ) ) {
65
-		$feed = fetch_feed( 'https://silent-comics.tumblr.com/rss/' );// specify the source feed.
66
-		if ( is_wp_error( $feed ) ) {
64
+	if (function_exists('fetch_feed')) {
65
+		$feed = fetch_feed('https://silent-comics.tumblr.com/rss/'); // specify the source feed.
66
+		if (is_wp_error($feed)) {
67 67
 			return;
68 68
 		}
69
-			$limit = $feed->get_item_quantity( 7 );                        // specify number of items.
70
-			$items = $feed->get_items( 0, $limit );                        // create an array of items.
69
+			$limit = $feed->get_item_quantity(7); // specify number of items.
70
+			$items = $feed->get_items(0, $limit); // create an array of items.
71 71
 	}
72
-	if ( 0 ) { echo '<div>The RSS Feed is either empty or unavailable.</div>'; // fallback message.
72
+	if (0) { echo '<div>The RSS Feed is either empty or unavailable.</div>'; // fallback message.
73 73
 		return;
74 74
 	}
75
-	foreach ( $items as $item ) { ?>
75
+	foreach ($items as $item) { ?>
76 76
 
77 77
 			<h4 style="margin-bottom: 1em; max-width: 384px;">
78
-				<a href="<?php echo esc_url( $item->get_permalink() ); ?>" title="" target="_blank">
79
-					<?php echo esc_attr( $item->get_title() ); ?>
78
+				<a href="<?php echo esc_url($item->get_permalink()); ?>" title="" target="_blank">
79
+					<?php echo esc_attr($item->get_title()); ?>
80 80
 					<br>
81 81
 				</a>
82 82
 			</h4>
83 83
 
84
-			<?php echo esc_html( mysql2date( __( 'j F Y @ g:i a', 'strip' ), $item->get_date( 'Y-m-d H:i:s' ) ) ); ?>
84
+			<?php echo esc_html(mysql2date(__('j F Y @ g:i a', 'strip'), $item->get_date('Y-m-d H:i:s'))); ?>
85 85
 
86 86
 			<p style="margin-top: 1.2em;
87 87
 					  #strip_rss_dashboard_widget .postbox.postbox-container { width: 12px; }">
88
-			<?php echo wp_kses_post( substr( $item->get_description(), 0, 742 ) ); ?>
88
+			<?php echo wp_kses_post(substr($item->get_description(), 0, 742)); ?>
89 89
 			</p>
90 90
 			<?php
91 91
 	}
@@ -95,16 +95,16 @@  discard block
 block discarded – undo
95 95
  * Calling all custom dashboard widgets.
96 96
  */
97 97
 function strip_custom_dashboard_widgets() {
98
-	wp_add_dashboard_widget( 'strip_rss_dashboard_widget', __( 'SILENT COMICS on tumblr', 'strip' ), 'strip_rss_dashboard_widget' );
98
+	wp_add_dashboard_widget('strip_rss_dashboard_widget', __('SILENT COMICS on tumblr', 'strip'), 'strip_rss_dashboard_widget');
99 99
 	/**
100 100
 	* Be sure to drop any other created Dashboard Widgets.
101 101
 	* in this function and they will all load.
102 102
 	*/
103 103
 }
104 104
 // removing the dashboard widgets.
105
-add_action( 'wp_dashboard_setup', 'disable_default_dashboard_widgets' );
105
+add_action('wp_dashboard_setup', 'disable_default_dashboard_widgets');
106 106
 // adding any custom widgets.
107
-add_action( 'wp_dashboard_setup', 'strip_custom_dashboard_widgets' );
107
+add_action('wp_dashboard_setup', 'strip_custom_dashboard_widgets');
108 108
 
109 109
 
110 110
 /************* CUSTOM LOGIN PAGE *****************/
@@ -115,10 +115,10 @@  discard block
 block discarded – undo
115 115
  * See http://codex.wordpress.org/Plugin_API/Action_Reference/login_enqueue_scripts.
116 116
  */
117 117
 function strip_login_css() {
118
-	 wp_enqueue_style( 'strip_login_css', get_template_directory_uri() . '/assets/css/login.css', false );
118
+	 wp_enqueue_style('strip_login_css', get_template_directory_uri() . '/assets/css/login.css', false);
119 119
 
120 120
 	// Enqueue custom font to the login form.
121
-	wp_enqueue_style( 'strip_inconsolata_css', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null );
121
+	wp_enqueue_style('strip_inconsolata_css', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null);
122 122
 }
123 123
 
124 124
 /**
@@ -135,12 +135,12 @@  discard block
 block discarded – undo
135 135
 	 * @return blog title.
136 136
 	 */
137 137
 function strip_login_title() {
138
-	return get_option( 'blogname' ); }
138
+	return get_option('blogname'); }
139 139
 
140 140
 // calling only on the login page.
141
-add_action( 'login_enqueue_scripts', 'strip_login_css', 10 );
142
-add_filter( 'login_headerurl', 'strip_login_url' );
143
-add_filter( 'login_headertitle', 'strip_login_title' );
141
+add_action('login_enqueue_scripts', 'strip_login_css', 10);
142
+add_filter('login_headerurl', 'strip_login_url');
143
+add_filter('login_headertitle', 'strip_login_title');
144 144
 
145 145
 /************* CUSTOMIZE ADMIN *******************/
146 146
 
@@ -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.