@@ -1,3 +1,3 @@ |
||
1 | -<a href="<?php echo esc_url( site_url( '/' ) ); ?>" class="logo"><object type="image/svg+xml" data="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTggOTkiPjxzdHlsZT4uc3R5bGUwe2ZpbGw6ICMwMDA7fTpob3ZlciB7ZmlsbDogI0ZGNzM2OTt9PC9zdHlsZT4gPHBhdGggZD0iTTE1LjQgNDQuMmMtNC4xIDAtNy4xLTMuMi03LjYtNy4xbC00LjEgMS4yYzEuMiA1LjkgNS44IDkuOSAxMS45IDkuOWM2LjYgMCAxMi01LjEgMTItMTEuOCBjMC02LjEtNC4yLTguNi05LjItMTAuN2wtMi41LTEuMWMtMi42LTEuMi02LTIuNy02LTZjMC0zLjUgMi45LTUuOSA2LjMtNS45YzMuMiAwIDUuMSAxLjUgNi42IDQuMWwzLjQtMi4yYy0yLTMuNy01LjYtNS45LTkuOS01LjkgYy01LjcgMC0xMC43IDMuOC0xMC43IDkuN2MwIDUuNSAzLjggNy43IDguMyA5LjhsMi4zIDFjMy41IDEuNiA3IDMuMSA3IDcuNkMyMy4zIDQxLjEgMTkuNSA0NC4yIDE1LjQgNDQuMnoiLz48cmVjdCB4PSI0Mi41IiB5PSI5LjQiIHdpZHRoPSI0LjMiIGhlaWdodD0iMzguMiIvPjxwb2x5Z29uIHBvaW50cz0iNjMuNiw5LjQgNjMuNiw0Ny41IDc4LjMsNDcuNSA3OC4zLDQzLjYgNjcuOCw0My42IDY3LjgsOS40Ii8+PHBvbHlnb24gcG9pbnRzPSIxMTEuNCwxMy4zIDExMS40LDkuNCA5MS42LDkuNCA5MS42LDQ3LjUgMTExLjQsNDcuNSAxMTEuNCw0My42IDk1LjksNDMuNiA5NS45LDI4LjYgMTExLDI4LjYgMTExLDI0LjcgOTUuOSwyNC43IDk1LjksMTMuMyIvPjxwb2x5Z29uIHBvaW50cz0iMTU3LjMsMzguOSAxMjc |
|
1 | +<a href="<?php echo esc_url(site_url('/')); ?>" class="logo"><object type="image/svg+xml" data="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTggOTkiPjxzdHlsZT4uc3R5bGUwe2ZpbGw6ICMwMDA7fTpob3ZlciB7ZmlsbDogI0ZGNzM2OTt9PC9zdHlsZT4gPHBhdGggZD0iTTE1LjQgNDQuMmMtNC4xIDAtNy4xLTMuMi03LjYtNy4xbC00LjEgMS4yYzEuMiA1LjkgNS44IDkuOSAxMS45IDkuOWM2LjYgMCAxMi01LjEgMTItMTEuOCBjMC02LjEtNC4yLTguNi05LjItMTAuN2wtMi41LTEuMWMtMi42LTEuMi02LTIuNy02LTZjMC0zLjUgMi45LTUuOSA2LjMtNS45YzMuMiAwIDUuMSAxLjUgNi42IDQuMWwzLjQtMi4yYy0yLTMuNy01LjYtNS45LTkuOS01LjkgYy01LjcgMC0xMC43IDMuOC0xMC43IDkuN2MwIDUuNSAzLjggNy43IDguMyA5LjhsMi4zIDFjMy41IDEuNiA3IDMuMSA3IDcuNkMyMy4zIDQxLjEgMTkuNSA0NC4yIDE1LjQgNDQuMnoiLz48cmVjdCB4PSI0Mi41IiB5PSI5LjQiIHdpZHRoPSI0LjMiIGhlaWdodD0iMzguMiIvPjxwb2x5Z29uIHBvaW50cz0iNjMuNiw5LjQgNjMuNiw0Ny41IDc4LjMsNDcuNSA3OC4zLDQzLjYgNjcuOCw0My42IDY3LjgsOS40Ii8+PHBvbHlnb24gcG9pbnRzPSIxMTEuNCwxMy4zIDExMS40LDkuNCA5MS42LDkuNCA5MS42LDQ3LjUgMTExLjQsNDcuNSAxMTEuNCw0My42IDk1LjksNDMuNiA5NS45LDI4LjYgMTExLDI4LjYgMTExLDI0LjcgOTUuOSwyNC43IDk1LjksMTMuMyIvPjxwb2x5Z29uIHBvaW50cz0iMTU3LjMsMzguOSAxMjc |
|
2 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iNTEuNSIgd2lkdGg9IjQuMyIgaGVpZ2h0PSIzOC4xIi8+PHBhdGggZD0iTTE1Ni45IDU0LjhjNC40IDAgOC42IDEuOSAxMS42IDUuMXYtNS4zYy0zLjQtMi41LTcuMS0zLjctMTEuNC0zLjdjLTEwLjkgMC0xOS45IDktMTkuOSAxOS45IGMwIDEwLjggOS4xIDE5LjYgMTkuOSAxOS42YzQgMCA4LjEtMS40IDExLjQtMy43di01LjNjLTMgMy03LjIgNS4xLTExLjUgNS4xYy04LjUgMC0xNS41LTcuNC0xNS41LTE1LjggQzE0MS42IDYyLjIgMTQ4LjQgNTQuOCAxNTYuOSA1NC44eiIvPjxwYXRoIGQ9Ik0xODUuNyA4Ni40Yy00LjEgMC03LjEtMy4yLTcuNi03LjFsLTQuMSAxLjJjMS4yIDUuOSA1LjggOS45IDExLjkgOS45YzYuNiAwIDEyLTUuMSAxMi0xMS44IGMwLTYuMS00LjItOC42LTkuMi0xMC43bC0yLjUtMS4xYy0yLjYtMS4yLTYtMi43LTYtNmMwLTMuNSAyLjktNS45IDYuMy01LjljMy4yIDAgNS4xIDEuNSA2LjYgNC4xbDMuNC0yLjJjLTItMy43LTUuNi01LjktOS45LTUuOSBjLTUuNyAwLTEwLjcgMy44LTEwLjcgOS43YzAgNS41IDMuOCA3LjcgOC4zIDkuOGwyLjMgMWMzLjUgMS42IDcgMy4xIDcgNy42QzE5My42IDgzLjMgMTg5LjggODYuNCAxODUuNyA4Ni40eiIvPjxyZWN0IHk9Ijk3IiB3aWR0aD0iMTk4IiBoZWlnaHQ9IjIiLz48cmVjdCB5PSIwIiB3aWR0aD0iMTk4IiBoZWlnaHQ9IjIiLz48L3N2Zz4="><img src="silent-comics-logo.png"></object></a> |
@@ -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'); |