- Timestamp:
- 01/31/2024 03:57:10 PM (15 months ago)
- Location:
- starbox/trunk
- Files:
-
- 5 edited
-
classes/Tools.php (modified) (2 diffs)
-
models/Frontend.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
-
starbox.php (modified) (2 diffs)
-
themes/admin/UserSettings.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
starbox/trunk/classes/Tools.php
r2964031 r3029599 171 171 172 172 /** 173 * Clear the field string 174 * 175 * @param $value 176 * @return mixed|null|string|string[] 177 */ 178 public static function sanitizeField($value) 179 { 180 181 if(is_array($value)){ 182 return array_map(array('ABH_Classes_Tools', 'sanitizeField'), $value); 183 } 184 185 if (is_string($value) && $value <> '') { 186 187 $search = array( 188 "'<!--(.*?)-->'is", 189 "'<script[^>]*?>.*?<\/script>'si", // strip out javascript 190 "'<style[^>]*?>.*?<\/style>'si", // strip out styles 191 "'<form.*?<\/form>'si", 192 "'<iframe.*?<\/iframe>'si", 193 "'<!--(.*?)-->'is", 194 "'<script>.*?<\/script>'si", // strip out javascript 195 "'<style>.*?<\/style>'si", // strip out styles 196 ); 197 $value = preg_replace($search, "", $value); 198 199 $search = array( 200 "/ /si", 201 "/\s{2,}/", 202 ); 203 $value = preg_replace($search, " ", $value); 204 205 //more sanitization 206 $value = wp_strip_all_tags($value); 207 $value = ent2ncr($value); 208 $value = trim($value); 209 210 $value = ABH_Classes_Tools::i18n($value); 211 212 } 213 214 return $value; 215 } 216 217 218 /** 173 219 * Get a value from $_POST / $_GET 174 220 * if unavailable, take a default value … … 183 229 } 184 230 185 $ret = sanitize_text_field((isset($_POST[$key]) ? $_POST[$key] : $defaultValue)); 231 $ret = (isset($_POST[$key]) ? $_POST[$key] : $defaultValue); 232 $ret = ABH_Classes_Tools::sanitizeField($ret); 186 233 187 234 return wp_unslash($ret); -
starbox/trunk/models/Frontend.php
r2964031 r3029599 62 62 63 63 $content .= ' 64 <div class="abh_box abh_box_' . $this->position . ' abh_box_' . $this->details['abh_theme']. '">64 <div class="abh_box abh_box_' . $this->position . ' abh_box_' . esc_attr($this->details['abh_theme']) . '"> 65 65 <ul class="abh_tabs"> 66 <li class="abh_about abh_active"><a href="#abh_about">' . __('About', _ABH_PLUGIN_NAME_) . '</a></li>67 <li class="abh_posts"><a href="#abh_posts">' . __('Latest Posts', _ABH_PLUGIN_NAME_) . '</a></li>66 <li class="abh_about abh_active"><a href="#abh_about">' . esc_html__('About', _ABH_PLUGIN_NAME_) . '</a></li> 67 <li class="abh_posts"><a href="#abh_posts">' . esc_html__('Latest Posts', _ABH_PLUGIN_NAME_) . '</a></li> 68 68 </ul> 69 69 <div class="abh_tab_content">' . … … 84 84 public function getProfileImage() { 85 85 if (isset($this->details['abh_gravatar']) && $this->details['abh_gravatar'] <> '' && file_exists(_ABH_GRAVATAR_DIR_ . $this->details['abh_gravatar'])) { 86 $image = '<img src="' . _ABH_GRAVATAR_URL_ . $this->details['abh_gravatar'] . '" class="photo" width="' . ABH_IMAGESIZE . '" alt="' . $this->author->display_name. '" />';86 $image = '<img src="' . _ABH_GRAVATAR_URL_ . $this->details['abh_gravatar'] . '" class="photo" width="' . ABH_IMAGESIZE . '" alt="' . esc_attr($this->author->display_name) . '" />'; 87 87 } else { 88 $image = get_avatar($this->author->ID, ABH_IMAGESIZE, '', $this->author->display_name);88 $image = get_avatar($this->author->ID, ABH_IMAGESIZE, '', esc_attr($this->author->display_name)); 89 89 } 90 90 … … 121 121 if (ABH_AUTHORLINK) { 122 122 if ($this->author->user_url) { 123 $content .= '<a href = "' . $this->author->user_url . '" class="url" target = "_blank" title = "' . $this->author->display_name. '" ' . $nofollow . ' > ' . $this->getProfileImage() . '</a > ';123 $content .= '<a href = "' . esc_url($this->author->user_url) . '" class="url" target = "_blank" title = "' . esc_attr($this->author->display_name) . '" ' . $nofollow . ' > ' . $this->getProfileImage() . '</a > '; 124 124 } else { 125 $content .= '<a href = "' . get_author_posts_url($this->author->ID) . '" class="url" title = "' . $this->author->display_name. '" > ' . $this->getProfileImage() . '</a > ';125 $content .= '<a href = "' . get_author_posts_url($this->author->ID) . '" class="url" title = "' . esc_attr($this->author->display_name) . '" > ' . $this->getProfileImage() . '</a > '; 126 126 } 127 127 } else { … … 131 131 <div class="abh_social"> ' . $this->getSocial($this->single) . '</div> 132 132 <div class="abh_text"> 133 <div class="abh_name fn name" ' . (($this->single) ? 'itemprop="name"' : '') . ' ' . ((ABH_Classes_Tools::getOption('abh_titlefontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_titlefontsize') . ' !important;"' : '') . '>' . (ABH_AUTHORLINK ? (($this->author->user_url) ? '<a href="' . $this->author->user_url . '" class="url" target="_blank" ' . $nofollow . '>' . $this->author->display_name . '</a>' : '<a href="' . get_author_posts_url($this->author->ID) . '" class="url">' . $this->author->display_name . '</a>') : $this->author->display_name) . '</div>134 <div class="abh_job" ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_descfontsize') . ' !important;"' : '') . '>' . (($this->details['abh_title'] <> '' && $this->details['abh_company'] <> '') ? '<span class="title" ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_descfontsize') . ' !important;"' : '') . '>' . $this->details['abh_title'] . '</span> ' . __('at', _ABH_PLUGIN_NAME_) . ' <span class="org" ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_descfontsize') . ' !important;"' : '') . '>' . (($this->details['abh_company_url'] <> '') ? sprintf('<a href="%s" target="_blank">%s</a>', $this->details['abh_company_url'], $this->details['abh_company']) : $this->details['abh_company']) . '</span>' : '') . '</div>133 <div class="abh_name fn name" ' . (($this->single) ? 'itemprop="name"' : '') . ' ' . ((ABH_Classes_Tools::getOption('abh_titlefontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_titlefontsize') . ' !important;"' : '') . '>' . (ABH_AUTHORLINK ? (($this->author->user_url) ? '<a href="' . esc_url($this->author->user_url) . '" class="url" target="_blank" ' . $nofollow . '>' . esc_html($this->author->display_name) . '</a>' : '<a href="' . get_author_posts_url($this->author->ID) . '" class="url">' . esc_html($this->author->display_name) . '</a>') : esc_html($this->author->display_name)) . '</div> 134 <div class="abh_job" ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_descfontsize') . ' !important;"' : '') . '>' . (($this->details['abh_title'] <> '' && $this->details['abh_company'] <> '') ? '<span class="title" ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_descfontsize') . ' !important;"' : '') . '>' . esc_html($this->details['abh_title']) . '</span> ' . __('at', _ABH_PLUGIN_NAME_) . ' <span class="org" ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_descfontsize') . ' !important;"' : '') . '>' . (($this->details['abh_company_url'] <> '') ? sprintf('<a href="%s" target="_blank">%s</a>', esc_url($this->details['abh_company_url']), esc_attr($this->details['abh_company'])) : esc_attr($this->details['abh_company'])) . '</span>' : '') . '</div> 135 135 <div class="description note abh_description" ' . (($this->single) ? 'itemprop="description"' : '') . ' ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_descfontsize') . ' !important;"' : '') . '>' . ((isset($this->details['abh_extra_description']) && $this->details['abh_extra_description'] <> '') ? nl2br($this->details['abh_extra_description']) : nl2br($this->author->user_description)) . '</div> 136 136 </div> … … 165 165 <section class="abh_posts_tab abh_tab" > 166 166 <div class="abh_image"> 167 ' . (ABH_AUTHORLINK ? (($this->author->user_url) ? '<a href="' . $this->author->user_url . '" class="url" target="_blank" title="' . $this->author->display_name . '" ' . $nofollow . '>' . $this->getProfileImage() . '</a>' : '<a href="' . get_author_posts_url($this->author->ID) . '" class="url" title="' . $this->author->display_name. '">' . $this->getProfileImage() . '</a>') : $this->getProfileImage()) . '167 ' . (ABH_AUTHORLINK ? (($this->author->user_url) ? '<a href="' . esc_url($this->author->user_url) . '" class="url" target="_blank" title="' . esc_attr($this->author->display_name) . '" ' . $nofollow . '>' . $this->getProfileImage() . '</a>' : '<a href="' . get_author_posts_url($this->author->ID) . '" class="url" title="' . esc_attr($this->author->display_name) . '">' . $this->getProfileImage() . '</a>') : $this->getProfileImage()) . ' 168 168 </div> 169 169 <div class="abh_social"> ' . $this->getSocial() . '</div> 170 170 <div class="abh_text"> 171 <div class="abh_name" ' . ((ABH_Classes_Tools::getOption('abh_titlefontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_titlefontsize') . ' !important;"' : '') . '>' . sprintf(__('Latest posts by %s', _ABH_PLUGIN_NAME_), $this->author->display_name) . ' <span class="abh_allposts">' . (ABH_AUTHORLINK ? '(<a href="' . get_author_posts_url($this->author->ID) . '">' . __('see all', _ABH_PLUGIN_NAME_) . '</a>)' : '') . '</span></div>171 <div class="abh_name" ' . ((ABH_Classes_Tools::getOption('abh_titlefontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_titlefontsize') . ' !important;"' : '') . '>' . sprintf(__('Latest posts by %s', _ABH_PLUGIN_NAME_), esc_attr($this->author->display_name)) . ' <span class="abh_allposts">' . (ABH_AUTHORLINK ? '(<a href="' . get_author_posts_url($this->author->ID) . '">' . __('see all', _ABH_PLUGIN_NAME_) . '</a>)' : '') . '</span></div> 172 172 <div class="abh_description note" >' . $this->getLatestPosts() . '</div> 173 173 </div> … … 204 204 if (isset($this->details['abh_facebook']) && $this->details['abh_facebook'] <> '') { 205 205 $count++; 206 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_facebook'], 'http') === false) ? 'http://facebook.com/' : '') . $this->details['abh_facebook']. '" title="' . __('Facebook', _ABH_PLUGIN_NAME_) . '" class="abh_facebook" target="_blank" ' . $nofollow . '></a>';206 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_facebook'], 'http') === false) ? 'http://facebook.com/' : '') . esc_attr($this->details['abh_facebook']) . '" title="' . __('Facebook', _ABH_PLUGIN_NAME_) . '" class="abh_facebook" target="_blank" ' . $nofollow . '></a>'; 207 207 } 208 208 if (isset($this->details['abh_twitter']) && $this->details['abh_twitter'] <> '') { 209 209 $count++; 210 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_twitter'], 'http') === false) ? 'http://twitter.com/' : '') . $this->details['abh_twitter']. '" title="' . __('Twitter', _ABH_PLUGIN_NAME_) . '" class="abh_twitter" target="_blank" ' . $nofollow . '></a>';210 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_twitter'], 'http') === false) ? 'http://twitter.com/' : '') . esc_attr($this->details['abh_twitter']) . '" title="' . __('Twitter', _ABH_PLUGIN_NAME_) . '" class="abh_twitter" target="_blank" ' . $nofollow . '></a>'; 211 211 } 212 212 if (isset($this->details['abh_linkedin']) && $this->details['abh_linkedin'] <> '') { 213 213 $count++; 214 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_linkedin'], 'http') === false) ? 'http://www.linkedin.com/in/' : '') . $this->details['abh_linkedin']. '" title="' . __('LinkedIn', _ABH_PLUGIN_NAME_) . '" class="abh_linkedin" target="_blank" ' . $nofollow . '></a>';214 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_linkedin'], 'http') === false) ? 'http://www.linkedin.com/in/' : '') . esc_attr($this->details['abh_linkedin']) . '" title="' . __('LinkedIn', _ABH_PLUGIN_NAME_) . '" class="abh_linkedin" target="_blank" ' . $nofollow . '></a>'; 215 215 } 216 216 if (isset($this->details['abh_instagram']) && $this->details['abh_instagram'] <> '') { 217 217 $count++; 218 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_instagram'], 'http') === false) ? 'http://instagram.com/' : '') . $this->details['abh_instagram']. '" title="' . __('Instagram', _ABH_PLUGIN_NAME_) . '" class="abh_instagram" target="_blank" ' . $nofollow . '></a>';218 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_instagram'], 'http') === false) ? 'http://instagram.com/' : '') . esc_attr($this->details['abh_instagram']) . '" title="' . __('Instagram', _ABH_PLUGIN_NAME_) . '" class="abh_instagram" target="_blank" ' . $nofollow . '></a>'; 219 219 } 220 220 if (isset($this->details['abh_flickr']) && $this->details['abh_flickr'] <> '') { 221 221 $count++; 222 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_flickr'], 'http') === false) ? 'http://www.flickr.com/photos/' : '') . $this->details['abh_flickr']. '" title="' . __('Flickr', _ABH_PLUGIN_NAME_) . '" class="abh_flickr" target="_blank" ' . $nofollow . '></a>';222 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_flickr'], 'http') === false) ? 'http://www.flickr.com/photos/' : '') . esc_attr($this->details['abh_flickr']) . '" title="' . __('Flickr', _ABH_PLUGIN_NAME_) . '" class="abh_flickr" target="_blank" ' . $nofollow . '></a>'; 223 223 } 224 224 if (isset($this->details['abh_pinterest']) && $this->details['abh_pinterest'] <> '') { 225 225 $count++; 226 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_pinterest'], 'http') === false) ? 'http://pinterest.com/' : '') . $this->details['abh_pinterest']. '" title="' . __('Pinterest', _ABH_PLUGIN_NAME_) . '" class="abh_pinterest" target="_blank" ' . $nofollow . '></a>';226 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_pinterest'], 'http') === false) ? 'http://pinterest.com/' : '') . esc_attr($this->details['abh_pinterest']) . '" title="' . __('Pinterest', _ABH_PLUGIN_NAME_) . '" class="abh_pinterest" target="_blank" ' . $nofollow . '></a>'; 227 227 } 228 228 if (isset($this->details['abh_tumblr']) && $this->details['abh_tumblr'] <> '') { 229 229 $count++; 230 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_tumblr'], 'http') === false) ? 'http://' . $this->details['abh_tumblr'] . '.tumblr.com/' : $this->details['abh_tumblr']) . '" title="' . __('Tumblr', _ABH_PLUGIN_NAME_) . '" class="abh_tumblr" target="_blank" ' . $nofollow . '></a>';230 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_tumblr'], 'http') === false) ? 'http://' . esc_attr($this->details['abh_tumblr']) . '.tumblr.com/' : esc_attr($this->details['abh_tumblr'])) . '" title="' . __('Tumblr', _ABH_PLUGIN_NAME_) . '" class="abh_tumblr" target="_blank" ' . $nofollow . '></a>'; 231 231 } 232 232 if (isset($this->details['abh_youtube']) && $this->details['abh_youtube'] <> '') { 233 233 $count++; 234 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_youtube'], 'http') === false) ? 'http://www.youtube.com/user/' : '') . $this->details['abh_youtube']. '" title="' . __('YouTube', _ABH_PLUGIN_NAME_) . '" class="abh_youtube" target="_blank" ' . $nofollow . '></a>';234 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_youtube'], 'http') === false) ? 'http://www.youtube.com/user/' : '') . esc_attr($this->details['abh_youtube']) . '" title="' . __('YouTube', _ABH_PLUGIN_NAME_) . '" class="abh_youtube" target="_blank" ' . $nofollow . '></a>'; 235 235 } 236 236 if (isset($this->details['abh_vimeo']) && $this->details['abh_vimeo'] <> '') { 237 237 $count++; 238 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_vimeo'], 'http') === false) ? 'http://vimeo.com/' : '') . $this->details['abh_vimeo']. '" title="' . __('Vimeo', _ABH_PLUGIN_NAME_) . '" class="abh_vimeo" target="_blank" ' . $nofollow . '></a>';238 $content .= '<a ' . (($itemprop) ? 'itemprop="sameAs"' : '') . ' href="' . ((strpos($this->details['abh_vimeo'], 'http') === false) ? 'http://vimeo.com/' : '') . esc_attr($this->details['abh_vimeo']) . '" title="' . __('Vimeo', _ABH_PLUGIN_NAME_) . '" class="abh_vimeo" target="_blank" ' . $nofollow . '></a>'; 239 239 } 240 240 … … 251 251 252 252 if ($count > 0 && isset($this->details['abh_socialtext']) && $this->details['abh_socialtext'] <> '') 253 $content = '<div style="clear: both; font-size:12px; font-weight:normal; width: 85px; margin: 0 0 2px auto; line-height: 20px;">' . $this->details['abh_socialtext']. '</div>' . $content;253 $content = '<div style="clear: both; font-size:12px; font-weight:normal; width: 85px; margin: 0 0 2px auto; line-height: 20px;">' . esc_html($this->details['abh_socialtext']) . '</div>' . $content; 254 254 255 255 return $content; … … 287 287 if (!$found) 288 288 continue; 289 //echo '<pre>' . print_r($category, true) . '</pre>';290 289 } 291 290 -
starbox/trunk/readme.txt
r3028775 r3029599 104 104 105 105 == Changelog == 106 = 3. 4.9=106 = 3.5.0 = 107 107 * Update security on User setting 108 108 * Fixed Small Bugs -
starbox/trunk/starbox.php
r3028851 r3029599 8 8 * Author: Squirrly UK 9 9 * Description: Starbox is the Author Box for Humans. Professional Themes to choose from, HTML5, Social Media Profiles, Google Authorship 10 * Version: 3. 4.910 * Version: 3.5.0 11 11 * Author URI: https://www.squirrly.co/wordpress-seo-by-squirrly 12 12 * License: GPLv2 or later … … 27 27 28 28 /* SET THE CURRENT VERSION ABOVE AND BELOW */ 29 define('ABH_VERSION', '3. 4.9');29 define('ABH_VERSION', '3.5.0'); 30 30 31 31 if (!defined('ABHP_VERSION')) { -
starbox/trunk/themes/admin/UserSettings.php
r2964031 r3029599 1 <?php defined('ABSPATH') || die('Cheatin\' uh?'); ?>1 <?php defined('ABSPATH') || die('Cheatin\' uh?'); if(!isset($view)) return;?> 2 2 <div id="abh_settings" > 3 3 <a id="abh_settings"></a> 4 <div id="abh_settings_title" ><?php _e('Starbox Settings for this Author', _ABH_PLUGIN_NAME_); ?></div>4 <div id="abh_settings_title" ><?php echo esc_html__('Starbox Settings for this Author', _ABH_PLUGIN_NAME_); ?></div> 5 5 <div id="abh_settings_body"> 6 6 <div id="abh_settings_left" > … … 9 9 <div class="abh_switch"> 10 10 <input id="abh_use_on" type="radio" class="abh_switch-input" name="abh_use" value="1" <?php echo (($view->author['abh_use'] == 1) ? "checked" : '') ?> /> 11 <label for="abh_use_on" class="abh_switch-label abh_switch-label-off"><?php _e('Yes', _ABH_PLUGIN_NAME_); ?></label>11 <label for="abh_use_on" class="abh_switch-label abh_switch-label-off"><?php echo esc_html__('Yes', _ABH_PLUGIN_NAME_); ?></label> 12 12 <input id="abh_use_off" type="radio" class="abh_switch-input" name="abh_use" value="0" <?php echo ((!$view->author['abh_use'] == 1) ? "checked" : '') ?> /> 13 <label for="abh_use_off" class="abh_switch-label abh_switch-label-on"><?php _e('No', _ABH_PLUGIN_NAME_); ?></label>13 <label for="abh_use_off" class="abh_switch-label abh_switch-label-on"><?php echo esc_html__('No', _ABH_PLUGIN_NAME_); ?></label> 14 14 <span class="abh_switch-selection"></span> 15 15 </div> 16 <span><?php _e('Show the StarBox for this author', _ABH_PLUGIN_NAME_); ?></span>16 <span><?php echo esc_html__('Show the StarBox for this author', _ABH_PLUGIN_NAME_); ?></span> 17 17 </div> 18 18 19 19 </fieldset> 20 20 <fieldset> 21 <legend><?php _e('Change the Profile Image', _ABH_PLUGIN_NAME_); ?></legend>21 <legend><?php echo esc_html__('Change the Profile Image', _ABH_PLUGIN_NAME_); ?></legend> 22 22 <div class="abh_gravatar"> 23 23 <p> 24 <?php _e('File types: JPG, JPEG, GIF and PNG. Ideal image size is: 80x80', _ABH_PLUGIN_NAME_); ?>24 <?php echo esc_html__('File types: JPG, JPEG, GIF and PNG. Ideal image size is: 80x80', _ABH_PLUGIN_NAME_); ?> 25 25 </p> 26 <p><span class="sq_settings_info"><?php echo ((defined('ABH_MESSAGE_FAVICON')) ? ABH_MESSAGE_FAVICON: '') ?></span></p>26 <p><span class="sq_settings_info"><?php echo ((defined('ABH_MESSAGE_FAVICON')) ? esc_attr(ABH_MESSAGE_FAVICON) : '') ?></span></p> 27 27 <div> 28 28 <?php if (isset($view->author['abh_gravatar']) && $view->author['abh_gravatar'] <> '' && file_exists(_ABH_GRAVATAR_DIR_ . $view->author['abh_gravatar'])) { ?> 29 <img src="<?php echo _ABH_GRAVATAR_URL_ . $view->author['abh_gravatar'] . '?' . time() ?>" width="<?php echo ABH_IMAGESIZE?>" class="photo" />29 <img src="<?php echo esc_url(_ABH_GRAVATAR_URL_) . esc_attr($view->author['abh_gravatar']) . '?' . esc_attr(time()) ?>" width="<?php echo esc_attr(ABH_IMAGESIZE)?>" class="photo" /> 30 30 <?php 31 31 } else { … … 36 36 <div class="abh_upload"> 37 37 <input type="file" name="abh_gravatar" autocomplete="off" /> 38 <input type="submit" id="abh_gravatar_update" name="abh_update" value="<?php _e('Upload', _ABH_PLUGIN_NAME_) ?>" />39 <div class="abh_upload_reset"><label for="abh_resetgravatar"><?php _e('Reset the uploaded image', _ABH_PLUGIN_NAME_); ?></label><input name="abh_resetgravatar" type="checkbox" value="1" /></div>40 <span class="abh_settings_info"><?php echo sprintf( __('You can also set your image on %shttps://en.gravatar.com/%s for your email address', _ABH_PLUGIN_NAME_), '<a href="https://en.gravatar.com/" target="_blank">', '</a>'); ?></span>38 <input type="submit" id="abh_gravatar_update" name="abh_update" value="<?php echo esc_attr__('Upload', _ABH_PLUGIN_NAME_) ?>" /> 39 <div class="abh_upload_reset"><label for="abh_resetgravatar"><?php echo esc_html__('Reset the uploaded image', _ABH_PLUGIN_NAME_); ?></label><input name="abh_resetgravatar" type="checkbox" value="1" /></div> 40 <span class="abh_settings_info"><?php echo sprintf(esc_attr__('You can also set your image on %shttps://en.gravatar.com/%s for your email address', _ABH_PLUGIN_NAME_), '<a href="https://en.gravatar.com/" target="_blank">', '</a>'); ?></span> 41 41 </div> 42 42 </div> … … 45 45 </fieldset> 46 46 <fieldset> 47 <legend><?php _e('Theme settings:', _ABH_PLUGIN_NAME_); ?></legend>47 <legend><?php echo esc_html__('Theme settings:', _ABH_PLUGIN_NAME_); ?></legend> 48 48 <div class="abh_option_content"> 49 49 <div class="abh_select"> … … 55 55 $position = 'default'; 56 56 ?> 57 <option value="default" <?php echo (($position == 'default') ? 'selected="selected"' : '') ?>><?php _e('Default', _ABH_PLUGIN_NAME_); ?></option>58 <option value="up" <?php echo (($position == 'up') ? 'selected="selected"' : '') ?>><?php _e('Up', _ABH_PLUGIN_NAME_); ?></option>59 <option value="down" <?php echo (($position == 'down') ? 'selected="selected"' : '') ?>><?php _e('Down', _ABH_PLUGIN_NAME_); ?></option>57 <option value="default" <?php echo (($position == 'default') ? 'selected="selected"' : '') ?>><?php echo esc_html__('Default', _ABH_PLUGIN_NAME_); ?></option> 58 <option value="up" <?php echo (($position == 'up') ? 'selected="selected"' : '') ?>><?php echo esc_html__('Up', _ABH_PLUGIN_NAME_); ?></option> 59 <option value="down" <?php echo (($position == 'down') ? 'selected="selected"' : '') ?>><?php echo esc_html__('Down', _ABH_PLUGIN_NAME_); ?></option> 60 60 </select> 61 61 </div> 62 <span><?php _e('The Author Box position', _ABH_PLUGIN_NAME_); ?></span>62 <span><?php echo esc_html__('The Author Box position', _ABH_PLUGIN_NAME_); ?></span> 63 63 </div> 64 64 … … 74 74 75 75 foreach ($view->themes as $name) { 76 echo '<option value="' . $name . '" ' . (($theme == $name) ? 'selected="selected"' : '') . ' >' . ucfirst($name) . '</option>';76 echo '<option value="' . esc_attr($name) . '" ' . (($theme == $name) ? 'selected="selected"' : '') . ' >' . esc_html(ucfirst($name)) . '</option>'; 77 77 } 78 78 ?> 79 79 </select> 80 80 </div> 81 <span><?php _e('This Author\'s theme', _ABH_PLUGIN_NAME_); ?></span>81 <span><?php echo esc_html__('This Author\'s theme', _ABH_PLUGIN_NAME_); ?></span> 82 82 83 83 </div> … … 88 88 <?php 89 89 foreach (ABH_Classes_Tools::getOption('abh_titlefontsizes') as $name) { 90 echo '<option value="' . $name . '" ' . ((ABH_Classes_Tools::getOption('abh_titlefontsize') == $name) ? 'selected="selected"' : '') . ' >' . $name. '</option>';90 echo '<option value="' . esc_attr($name) . '" ' . ((ABH_Classes_Tools::getOption('abh_titlefontsize') == $name) ? 'selected="selected"' : '') . ' >' . esc_html($name) . '</option>'; 91 91 } 92 92 ?> 93 93 </select> 94 94 </div> 95 <span><?php _e('Choose the size of the name', _ABH_PLUGIN_NAME_); ?></span>95 <span><?php echo esc_html__('Choose the size of the name', _ABH_PLUGIN_NAME_); ?></span> 96 96 97 97 <div class="abh_select"> … … 99 99 <?php 100 100 foreach (ABH_Classes_Tools::getOption('abh_descfontsizes') as $name) { 101 echo '<option value="' . $name . '" ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') == $name) ? 'selected="selected"' : '') . ' >' . $name. '</option>';101 echo '<option value="' . esc_attr($name) . '" ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') == $name) ? 'selected="selected"' : '') . ' >' . esc_html($name) . '</option>'; 102 102 } 103 103 ?> 104 104 </select> 105 105 </div> 106 <span><?php _e('Choose the size of the description', _ABH_PLUGIN_NAME_); ?></span>106 <span><?php echo esc_html__('Choose the size of the description', _ABH_PLUGIN_NAME_); ?></span> 107 107 </div> 108 108 109 <div id="abh_box_preview_title"><?php _e('Preview mode (change the theme)', _ABH_PLUGIN_NAME_); ?></div>109 <div id="abh_box_preview_title"><?php echo esc_html__('Preview mode (change the theme)', _ABH_PLUGIN_NAME_); ?></div> 110 110 <div id="abh_box_preview"><?php 111 111 if ($theme == 'default') 112 112 $theme = ABH_Classes_Tools::getOption('abh_theme'); 113 113 if (file_exists((_ABH_ALL_THEMES_DIR_ . $theme . '/js/frontend.js'))) 114 echo '<script type="text/javascript" src="' . _ABH_ALL_THEMES_URL_ . $theme . '/js/frontend.js?ver=' . ABH_VERSION. '"></script>';115 echo '<link rel="stylesheet" href="' . _ABH_ALL_THEMES_URL_ . $theme . '/css/frontend.css?ver=' . ABH_VERSION. '" type="text/css" media="all" />';114 echo '<script type="text/javascript" src="' . esc_url(_ABH_ALL_THEMES_URL_ . $theme . '/js/frontend.js?ver=' . ABH_VERSION) . '"></script>'; 115 echo '<link rel="stylesheet" href="' . esc_url(_ABH_ALL_THEMES_URL_ . $theme . '/css/frontend.css?ver=' . ABH_VERSION) . '" type="text/css" media="all" />'; 116 116 117 117 echo ABH_Classes_ObjController::getController('ABH_Controllers_Frontend')->showBox($view->user->ID); … … 119 119 </fieldset> 120 120 <fieldset> 121 <legend><?php _e('Job settings:', _ABH_PLUGIN_NAME_); ?></legend>121 <legend><?php echo esc_html__('Job settings:', _ABH_PLUGIN_NAME_); ?></legend> 122 122 <div> 123 <p><span><?php _e('Job Title:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_title" value="<?php echo $view->author['abh_title']; ?>" size="30" /></p>124 <p><span><?php _e('Company:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_company" value="<?php echo $view->author['abh_company']; ?>" size="30" /></p>125 <p><span><?php _e('Company URL:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_company_url" value="<?php echo $view->author['abh_company_url']; ?>" size="30" /></p>123 <p><span><?php echo esc_html__('Job Title:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_title" value="<?php echo esc_attr($view->author['abh_title']); ?>" size="30" /></p> 124 <p><span><?php echo esc_html__('Company:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_company" value="<?php echo esc_attr($view->author['abh_company']); ?>" size="30" /></p> 125 <p><span><?php echo esc_html__('Company URL:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_company_url" value="<?php echo esc_url($view->author['abh_company_url']); ?>" size="30" /></p> 126 126 <p class="abh_description_author"></p> 127 <p class="abh_show_extra_description" <?php echo (($view->author['abh_extra_description'] == '') ? '' : 'style="display: none"'); ?>><?php _e('add custom author bio >>', _ABH_PLUGIN_NAME_); ?></p>127 <p class="abh_show_extra_description" <?php echo (($view->author['abh_extra_description'] == '') ? '' : 'style="display: none"'); ?>><?php echo esc_html__('add custom author bio >>', _ABH_PLUGIN_NAME_); ?></p> 128 128 <p class="abh_extra_description" <?php echo (($view->author['abh_extra_description'] <> '') ? '' : 'style="display: none"'); ?>> 129 <span> </span><span style="font-size:12px; font-weight: normal; margin-left: 15px; font-style: italic;"><?php _e('By adding text here, you will replace the above description with this one', _ABH_PLUGIN_NAME_); ?></span>129 <span> </span><span style="font-size:12px; font-weight: normal; margin-left: 15px; font-style: italic;"><?php echo esc_html__('By adding text here, you will replace the above description with this one', _ABH_PLUGIN_NAME_); ?></span> 130 130 <br style="clear:both;" /> 131 <span><?php _e('Author BIO:', _ABH_PLUGIN_NAME_); ?></span> <textarea id="abh_extra_description" name="abh_extra_description" ><?php echo $view->author['abh_extra_description']; ?></textarea>131 <span><?php echo esc_html__('Author BIO:', _ABH_PLUGIN_NAME_); ?></span> <textarea id="abh_extra_description" name="abh_extra_description" ><?php echo esc_html($view->author['abh_extra_description']); ?></textarea> 132 132 <br style="clear:both;" /> 133 <span> </span><a href="javascript:void(0);" onclick="jQuery('#abh_extra_description').val('')" style="font-size:12px; font-weight: normal; margin-left: 15px;"><?php _e('Clear the custom description and show the default description', _ABH_PLUGIN_NAME_); ?></a>133 <span> </span><a href="javascript:void(0);" onclick="jQuery('#abh_extra_description').val('')" style="font-size:12px; font-weight: normal; margin-left: 15px;"><?php echo esc_html__('Clear the custom description and show the default description', _ABH_PLUGIN_NAME_); ?></a> 134 134 </p> 135 135 </div> 136 136 </fieldset> 137 137 <fieldset > 138 <legend><?php _e('Social settings:', _ABH_PLUGIN_NAME_); ?></legend>138 <legend><?php echo esc_html__('Social settings:', _ABH_PLUGIN_NAME_); ?></legend> 139 139 140 140 <div id="abh_option_social" > 141 141 <p class="abh_social_text" style="height:30px; line-height: 30px;"> 142 <span><?php _e('Social text (12 chars):', _ABH_PLUGIN_NAME_); ?></span>143 <span ><input name="abh_socialtext" value="<?php echo $view->author['abh_socialtext']; ?>" size="30" maxlength="12" style="min-width: 100px; width: 100px;" /></span>144 <span style="font-size:12px; font-weight: normal; font-style: italic; margin-left: 5px;"><?php _e('eq. "Follow me"', _ABH_PLUGIN_NAME_); ?></span>142 <span><?php echo esc_html__('Social text (12 chars):', _ABH_PLUGIN_NAME_); ?></span> 143 <span ><input name="abh_socialtext" value="<?php echo esc_attr($view->author['abh_socialtext']); ?>" size="30" maxlength="12" style="min-width: 100px; width: 100px;" /></span> 144 <span style="font-size:12px; font-weight: normal; font-style: italic; margin-left: 5px;"><?php echo esc_html__('eq. "Follow me"', _ABH_PLUGIN_NAME_); ?></span> 145 145 </p> 146 <p><span class="abh_social_settings abh_twitter"></span><span><?php _e('Twitter:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_twitter" value="<?php echo $view->author['abh_twitter']; ?>" size="30" /></p>147 <p><span class="abh_social_settings abh_facebook"></span><span><?php _e('Facebook:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_facebook" value="<?php echo $view->author['abh_facebook']; ?>" size="30" /></p>148 <p style="font-size: 18px; color: red;"><?php echo sprintf( __('Need more Socials Links and High Priority support? Visit %sStarbox PRO%s', _ABH_PLUGIN_NAME_), '<a href="http://starbox.squirrly.co/product/starbox-the-author-box-for-humans/" target="_blank">', '</a>'); ?></p>146 <p><span class="abh_social_settings abh_twitter"></span><span><?php echo esc_html__('Twitter:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_twitter" value="<?php echo esc_attr($view->author['abh_twitter']); ?>" size="30" /></p> 147 <p><span class="abh_social_settings abh_facebook"></span><span><?php echo esc_html__('Facebook:', _ABH_PLUGIN_NAME_); ?></span> <input type="text" name="abh_facebook" value="<?php echo esc_attr($view->author['abh_facebook']); ?>" size="30" /></p> 148 <p style="font-size: 18px; color: red;"><?php echo sprintf(esc_html__('Need more Socials Links and High Priority support? Visit %sStarbox PRO%s', _ABH_PLUGIN_NAME_), '<a href="http://starbox.squirrly.co/product/starbox-the-author-box-for-humans/" target="_blank">', '</a>'); ?></p> 149 149 <div class="abh_option_content"> 150 150 <div class="abh_switch"> 151 151 <input id="abh_nofollow_social_on" type="radio" class="abh_switch-input" name="abh_nofollow_social" value="1" <?php echo ((!$view->author['abh_nofollow_social'] == 0) ? "checked" : '') ?> /> 152 <label for="abh_nofollow_social_on" class="abh_switch-label abh_switch-label-off"><?php _e('Yes', _ABH_PLUGIN_NAME_); ?></label>152 <label for="abh_nofollow_social_on" class="abh_switch-label abh_switch-label-off"><?php echo esc_html__('Yes', _ABH_PLUGIN_NAME_); ?></label> 153 153 <input id="abh_nofollow_social_off" type="radio" class="abh_switch-input" name="abh_nofollow_social" value="0" <?php echo (($view->author['abh_nofollow_social'] == 0) ? "checked" : '') ?> /> 154 <label for="abh_nofollow_social_off" class="abh_switch-label abh_switch-label-on"><?php _e('No', _ABH_PLUGIN_NAME_); ?></label>154 <label for="abh_nofollow_social_off" class="abh_switch-label abh_switch-label-on"><?php echo esc_html__('No', _ABH_PLUGIN_NAME_); ?></label> 155 155 <span class="abh_switch-selection"></span> 156 156 </div> 157 <span><?php _e('Add rel="nofollow" to Social links and user URL', _ABH_PLUGIN_NAME_); ?></span>157 <span><?php echo esc_html__('Add rel="nofollow" to Social links and user URL', _ABH_PLUGIN_NAME_); ?></span> 158 158 </div> 159 159 <div class="abh_option_content"> 160 160 <div class="abh_switch"> 161 161 <input id="abh_noopener_social_on" type="radio" class="abh_switch-input" name="abh_noopener_social" value="1" <?php echo ((!$view->author['abh_noopener_social'] == 0) ? "checked" : '') ?> /> 162 <label for="abh_noopener_social_on" class="abh_switch-label abh_switch-label-off"><?php _e('Yes', _ABH_PLUGIN_NAME_); ?></label>162 <label for="abh_noopener_social_on" class="abh_switch-label abh_switch-label-off"><?php echo esc_html__('Yes', _ABH_PLUGIN_NAME_); ?></label> 163 163 <input id="abh_noopener_social_off" type="radio" class="abh_switch-input" name="abh_noopener_social" value="0" <?php echo (($view->author['abh_noopener_social'] == 0) ? "checked" : '') ?> /> 164 <label for="abh_noopener_social_off" class="abh_switch-label abh_switch-label-on"><?php _e('No', _ABH_PLUGIN_NAME_); ?></label>164 <label for="abh_noopener_social_off" class="abh_switch-label abh_switch-label-on"><?php echo esc_html__('No', _ABH_PLUGIN_NAME_); ?></label> 165 165 <span class="abh_switch-selection"></span> 166 166 </div> 167 <span><?php _e('Add rel="noopener" to Social links and user URL', _ABH_PLUGIN_NAME_); ?></span>167 <span><?php echo esc_html__('Add rel="noopener" to Social links and user URL', _ABH_PLUGIN_NAME_); ?></span> 168 168 </div> 169 169 <div class="abh_option_content"> 170 170 <div class="abh_switch"> 171 171 <input id="abh_noreferrer_social_on" type="radio" class="abh_switch-input" name="abh_noreferrer_social" value="1" <?php echo ((!$view->author['abh_noreferrer_social'] == 0) ? "checked" : '') ?> /> 172 <label for="abh_noreferrer_social_on" class="abh_switch-label abh_switch-label-off"><?php _e('Yes', _ABH_PLUGIN_NAME_); ?></label>172 <label for="abh_noreferrer_social_on" class="abh_switch-label abh_switch-label-off"><?php echo esc_html__('Yes', _ABH_PLUGIN_NAME_); ?></label> 173 173 <input id="abh_noreferrer_social_off" type="radio" class="abh_switch-input" name="abh_noreferrer_social" value="0" <?php echo (($view->author['abh_noreferrer_social'] == 0) ? "checked" : '') ?> /> 174 <label for="abh_noreferrer_social_off" class="abh_switch-label abh_switch-label-on"><?php _e('No', _ABH_PLUGIN_NAME_); ?></label>174 <label for="abh_noreferrer_social_off" class="abh_switch-label abh_switch-label-on"><?php echo esc_html__('No', _ABH_PLUGIN_NAME_); ?></label> 175 175 <span class="abh_switch-selection"></span> 176 176 </div> 177 <span><?php _e('Add rel="noreferrer" to Social links and user URL', _ABH_PLUGIN_NAME_); ?></span>177 <span><?php echo esc_html__('Add rel="noreferrer" to Social links and user URL', _ABH_PLUGIN_NAME_); ?></span> 178 178 </div> 179 179
Note: See TracChangeset
for help on using the changeset viewer.