@@ -96,9 +96,9 @@ |
||
96 | 96 | function strip_custom_dashboard_widgets() { |
97 | 97 | wp_add_dashboard_widget( 'strip_rss_dashboard_widget', __( 'SILENT COMICS blog', 'strip' ), 'strip_rss_dashboard_widget' ); |
98 | 98 | /** |
99 | - * Be sure to drop any other created Dashboard Widgets. |
|
100 | - * in this function and they will all load. |
|
101 | - */ |
|
99 | + * Be sure to drop any other created Dashboard Widgets. |
|
100 | + * in this function and they will all load. |
|
101 | + */ |
|
102 | 102 | } |
103 | 103 | // removing the dashboard widgets. |
104 | 104 | add_action( 'wp_dashboard_setup', 'disable_default_dashboard_widgets' ); |
@@ -25,20 +25,20 @@ discard block |
||
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,30 +61,30 @@ discard block |
||
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://silentcomics.com/feed.xml' );// specify the source feed. |
|
66 | - if ( is_wp_error( $feed ) ) { |
|
64 | + if (function_exists('fetch_feed')) { |
|
65 | + $feed = fetch_feed('https://silentcomics.com/feed.xml'); // specify the source feed. |
|
66 | + if (is_wp_error($feed)) { |
|
67 | 67 | return; |
68 | 68 | } |
69 | - $limit = $feed->get_item_quantity( 3 ); // specify number of items. |
|
70 | - $items = $feed->get_items( 0, $limit ); // create an array of items. |
|
69 | + $limit = $feed->get_item_quantity(3); // 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 | 84 | <p style="margin-top: 1.2em; |
85 | 85 | #strip_rss_dashboard_widget .postbox.postbox-container { width: 12px; }"> |
86 | - <?php echo esc_html( mysql2date( __( 'j F Y @ g:i a', 'strip' ), $item->get_date( 'Y-m-d H:i:s' ) ) ); ?> |
|
87 | - <?php echo wp_kses_post( substr( $item->get_description(), 0, 742 ) ); ?> |
|
86 | + <?php echo esc_html(mysql2date(__('j F Y @ g:i a', 'strip'), $item->get_date('Y-m-d H:i:s'))); ?> |
|
87 | + <?php echo wp_kses_post(substr($item->get_description(), 0, 742)); ?> |
|
88 | 88 | </p> |
89 | 89 | <?php |
90 | 90 | } |
@@ -94,16 +94,16 @@ discard block |
||
94 | 94 | * Calling all custom dashboard widgets. |
95 | 95 | */ |
96 | 96 | function strip_custom_dashboard_widgets() { |
97 | - wp_add_dashboard_widget( 'strip_rss_dashboard_widget', __( 'SILENT COMICS blog', 'strip' ), 'strip_rss_dashboard_widget' ); |
|
97 | + wp_add_dashboard_widget('strip_rss_dashboard_widget', __('SILENT COMICS blog', 'strip'), 'strip_rss_dashboard_widget'); |
|
98 | 98 | /** |
99 | 99 | * Be sure to drop any other created Dashboard Widgets. |
100 | 100 | * in this function and they will all load. |
101 | 101 | */ |
102 | 102 | } |
103 | 103 | // removing the dashboard widgets. |
104 | -add_action( 'wp_dashboard_setup', 'disable_default_dashboard_widgets' ); |
|
104 | +add_action('wp_dashboard_setup', 'disable_default_dashboard_widgets'); |
|
105 | 105 | // adding any custom widgets. |
106 | -add_action( 'wp_dashboard_setup', 'strip_custom_dashboard_widgets' ); |
|
106 | +add_action('wp_dashboard_setup', 'strip_custom_dashboard_widgets'); |
|
107 | 107 | |
108 | 108 | |
109 | 109 | /************* CUSTOM LOGIN PAGE *****************/ |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | * See http://codex.wordpress.org/Plugin_API/Action_Reference/login_enqueue_scripts. |
115 | 115 | */ |
116 | 116 | function strip_login_css() { |
117 | - wp_enqueue_style( 'strip_login_css', get_template_directory_uri() . '/assets/css/login.css', false ); |
|
117 | + wp_enqueue_style('strip_login_css', get_template_directory_uri() . '/assets/css/login.css', false); |
|
118 | 118 | |
119 | 119 | // Enqueue custom font to the login form. |
120 | - wp_enqueue_style( 'strip_inconsolata_css', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null ); |
|
120 | + wp_enqueue_style('strip_inconsolata_css', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -134,12 +134,12 @@ discard block |
||
134 | 134 | * @return blog title. |
135 | 135 | */ |
136 | 136 | function strip_login_title() { |
137 | - return get_option( 'blogname' ); } |
|
137 | + return get_option('blogname'); } |
|
138 | 138 | |
139 | 139 | // calling only on the login page. |
140 | -add_action( 'login_enqueue_scripts', 'strip_login_css', 10 ); |
|
141 | -add_filter( 'login_headerurl', 'strip_login_url' ); |
|
142 | -add_filter( 'login_headertitle', 'strip_login_title' ); |
|
140 | +add_action('login_enqueue_scripts', 'strip_login_css', 10); |
|
141 | +add_filter('login_headerurl', 'strip_login_url'); |
|
142 | +add_filter('login_headertitle', 'strip_login_title'); |
|
143 | 143 | |
144 | 144 | /************* CUSTOMIZE ADMIN *******************/ |
145 | 145 | |
@@ -155,10 +155,10 @@ discard block |
||
155 | 155 | */ |
156 | 156 | function strip_custom_admin_footer() { |
157 | 157 | ?> |
158 | - <span id="footer-thankyou"><a href="<?php echo esc_url( __( 'https://silent-comics.com/', 'strip' ) ); ?>"><?php printf( esc_html__( 'Developed by %s', 'strip' ), 'Silent Comics' ); ?></a> |
|
158 | + <span id="footer-thankyou"><a href="<?php echo esc_url(__('https://silent-comics.com/', 'strip')); ?>"><?php printf(esc_html__('Developed by %s', 'strip'), 'Silent Comics'); ?></a> |
|
159 | 159 | <span class="sep"> | </span> |
160 | - <a href="<?php echo esc_url( __( 'https://github.com/SilentComics/Strip/', 'strip' ) ); ?>"><?php printf( esc_html__( 'Contribute on %s', 'strip' ), 'GitHub' ); ?></a> |
|
160 | + <a href="<?php echo esc_url(__('https://github.com/SilentComics/Strip/', 'strip')); ?>"><?php printf(esc_html__('Contribute on %s', 'strip'), 'GitHub'); ?></a> |
|
161 | 161 | <?php } |
162 | 162 | |
163 | 163 | // adding it to the admin area. |
164 | -add_filter( 'admin_footer_text', 'strip_custom_admin_footer' ); |
|
164 | +add_filter('admin_footer_text', 'strip_custom_admin_footer'); |
@@ -1,1 +1,1 @@ |
||
1 | -<a href="<?php echo esc_url( site_url( '/' ) ); ?>" class="logo"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 198 99"><style>.logo :hover{fill: #ff99cc;}:visited {fill: #000;}</style> <path d="M15.4 44.2c-4.1 0-7.1-3.2-7.6-7.1l-4.1 1.2c1.2 5.9 5.8 9.9 11.9 9.9c6.6 0 12-5.1 12-11.8 c0-6.1-4.2-8.6-9.2-10.7l-2.5-1.1c-2.6-1.2-6-2.7-6-6c0-3.5 2.9-5.9 6.3-5.9c3.2 0 5.1 1.5 6.6 4.1l3.4-2.2c-2-3.7-5.6-5.9-9.9-5.9 c-5.7 0-10.7 3.8-10.7 9.7c0 5.5 3.8 7.7 8.3 9.8l2.3 1c3.5 1.6 7 3.1 7 7.6C23.3 41.1 19.5 44.2 15.4 44.2z"/><rect x="42.5" y="9.4" width="4.3" height="38.2"/><polygon points="63.6,9.4 63.6,47.5 78.3,47.5 78.3,43.6 67.8,43.6 67.8,9.4"/><polygon points="111.4,13.3 111.4,9.4 91.6,9.4 91.6,47.5 111.4,47.5 111.4,43.6 95.9,43.6 95.9,28.6 111,28.6 111,24.7 95.9,24.7 95.9,13.3"/><polygon points="157.3,38.9 127.5,7.8 127.5,47.5 131.8,47.5 131.8,18.1 161.5,49.2 161.5,9.4 157.3,9.4"/><polygon points="175.2,13.3 184.4,13.3 184.4,47.5 188.7,47.5 188.7,13.3 198,13.3 198,9.4 175.2,9.4"/><path d="M19.9 90.3c4 0 8.1-1.4 11.4-3.7v-5.3c-3 3-7.2 5.1-11.5 5.1c-8.5 0-15.5-7.4-15.5-15.8 c0-8.4 6.9-15.8 15.4-15.8c4.4 0 8.6 1.9 11.6 5.1v-5.3c-3.4-2.5-7.1-3.7-11.4-3.7C9 50.9 0 59.8 0 70.8C0 81.6 9.1 90.3 19.9 90.3 z"/><path d="M36.5 70.7c0 11 9 19.7 19.9 19.7c10.9 0 19.9-8.7 19.9-19.7c0-10.9-9-19.8-19.9-19.8 C45.5 50.9 36.5 59.7 36.5 70.7z M56.4 54.8C65.2 54.8 72 62 72 70.6c0 8.6-7 15.8-15.6 15.8c-8.7 0-15.6-7.2-15.6-15.8 C40.8 62 47.7 54.8 56.4 54.8z"/><polygon points="79.3,89.7 83.6,89.7 88.5,63.9 88.6,63.9 100.9,91.2 113.2,63.9 113.3,63.9 118.2,89.7 122.5,89.7 114.8,49.4 100.9,81.4 87,49.4"/><rect x="127.5" y="51.5" width="4.3" height="38.1"/><path d="M156.9 54.8c4.4 0 8.6 1.9 11.6 5.1v-5.3c-3.4-2.5-7.1-3.7-11.4-3.7c-10.9 0-19.9 9-19.9 19.9 c0 10.8 9.1 19.6 19.9 19.6c4 0 8.1-1.4 11.4-3.7v-5.3c-3 3-7.2 5.1-11.5 5.1c-8.5 0-15.5-7.4-15.5-15.8 C141.6 62.2 148.4 54.8 156.9 54.8z"/><path d="M185.7 86.4c-4.1 0-7.1-3.2-7.6-7.1l-4.1 1.2c1.2 5.9 5.8 9.9 11.9 9.9c6.6 0 12-5.1 12-11.8 c0-6.1-4.2-8.6-9.2-10.7l-2.5-1.1c-2.6-1.2-6-2.7-6-6c0-3.5 2.9-5.9 6.3-5.9c3.2 0 5.1 1.5 6.6 4.1l3.4-2.2c-2-3.7-5.6-5.9-9.9-5.9 c-5.7 0-10.7 3.8-10.7 9.7c0 5.5 3.8 7.7 8.3 9.8l2.3 1c3.5 1.6 7 3.1 7 7.6C193.6 83.3 189.8 86.4 185.7 86.4z"/><rect y="97" width="198" height="2"/><rect y="0" width="198" height="2"/></svg></a> |
|
1 | +<a href="<?php echo esc_url(site_url('/')); ?>" class="logo"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 198 99"><style>.logo :hover{fill: #ff99cc;}:visited {fill: #000;}</style> <path d="M15.4 44.2c-4.1 0-7.1-3.2-7.6-7.1l-4.1 1.2c1.2 5.9 5.8 9.9 11.9 9.9c6.6 0 12-5.1 12-11.8 c0-6.1-4.2-8.6-9.2-10.7l-2.5-1.1c-2.6-1.2-6-2.7-6-6c0-3.5 2.9-5.9 6.3-5.9c3.2 0 5.1 1.5 6.6 4.1l3.4-2.2c-2-3.7-5.6-5.9-9.9-5.9 c-5.7 0-10.7 3.8-10.7 9.7c0 5.5 3.8 7.7 8.3 9.8l2.3 1c3.5 1.6 7 3.1 7 7.6C23.3 41.1 19.5 44.2 15.4 44.2z"/><rect x="42.5" y="9.4" width="4.3" height="38.2"/><polygon points="63.6,9.4 63.6,47.5 78.3,47.5 78.3,43.6 67.8,43.6 67.8,9.4"/><polygon points="111.4,13.3 111.4,9.4 91.6,9.4 91.6,47.5 111.4,47.5 111.4,43.6 95.9,43.6 95.9,28.6 111,28.6 111,24.7 95.9,24.7 95.9,13.3"/><polygon points="157.3,38.9 127.5,7.8 127.5,47.5 131.8,47.5 131.8,18.1 161.5,49.2 161.5,9.4 157.3,9.4"/><polygon points="175.2,13.3 184.4,13.3 184.4,47.5 188.7,47.5 188.7,13.3 198,13.3 198,9.4 175.2,9.4"/><path d="M19.9 90.3c4 0 8.1-1.4 11.4-3.7v-5.3c-3 3-7.2 5.1-11.5 5.1c-8.5 0-15.5-7.4-15.5-15.8 c0-8.4 6.9-15.8 15.4-15.8c4.4 0 8.6 1.9 11.6 5.1v-5.3c-3.4-2.5-7.1-3.7-11.4-3.7C9 50.9 0 59.8 0 70.8C0 81.6 9.1 90.3 19.9 90.3 z"/><path d="M36.5 70.7c0 11 9 19.7 19.9 19.7c10.9 0 19.9-8.7 19.9-19.7c0-10.9-9-19.8-19.9-19.8 C45.5 50.9 36.5 59.7 36.5 70.7z M56.4 54.8C65.2 54.8 72 62 72 70.6c0 8.6-7 15.8-15.6 15.8c-8.7 0-15.6-7.2-15.6-15.8 C40.8 62 47.7 54.8 56.4 54.8z"/><polygon points="79.3,89.7 83.6,89.7 88.5,63.9 88.6,63.9 100.9,91.2 113.2,63.9 113.3,63.9 118.2,89.7 122.5,89.7 114.8,49.4 100.9,81.4 87,49.4"/><rect x="127.5" y="51.5" width="4.3" height="38.1"/><path d="M156.9 54.8c4.4 0 8.6 1.9 11.6 5.1v-5.3c-3.4-2.5-7.1-3.7-11.4-3.7c-10.9 0-19.9 9-19.9 19.9 c0 10.8 9.1 19.6 19.9 19.6c4 0 8.1-1.4 11.4-3.7v-5.3c-3 3-7.2 5.1-11.5 5.1c-8.5 0-15.5-7.4-15.5-15.8 C141.6 62.2 148.4 54.8 156.9 54.8z"/><path d="M185.7 86.4c-4.1 0-7.1-3.2-7.6-7.1l-4.1 1.2c1.2 5.9 5.8 9.9 11.9 9.9c6.6 0 12-5.1 12-11.8 c0-6.1-4.2-8.6-9.2-10.7l-2.5-1.1c-2.6-1.2-6-2.7-6-6c0-3.5 2.9-5.9 6.3-5.9c3.2 0 5.1 1.5 6.6 4.1l3.4-2.2c-2-3.7-5.6-5.9-9.9-5.9 c-5.7 0-10.7 3.8-10.7 9.7c0 5.5 3.8 7.7 8.3 9.8l2.3 1c3.5 1.6 7 3.1 7 7.6C193.6 83.3 189.8 86.4 185.7 86.4z"/><rect y="97" width="198" height="2"/><rect y="0" width="198" height="2"/></svg></a> |