Changeset 3298356
- Timestamp:
- 05/21/2025 10:51:55 PM (9 months ago)
- Location:
- wp-about-author/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (2 diffs)
-
wp-about-author-admin.php (modified) (1 diff)
-
wp-about-author.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-about-author/trunk/readme.txt
r3298349 r3298356 5 5 Requires at least: 5.6 6 6 Tested up to: 6.8 7 Stable tag: 1.6. 17 Stable tag: 1.6.2 8 8 License: GPLv2 9 9 Requires PHP: 7.4 … … 53 53 == Changelog == 54 54 55 The current version is 1.6.1 (2025.05.21) 55 The current version is 1.6.2 (2025.05.21) 56 57 = 1.6.2 (2025.05.21) = 58 * Fixed layout selector bug caused by stray whitespace in value 59 * Improved escaping in admin settings output for security compliance 60 * Verified nonce usage and sanitized background color input on save 61 * Passed Plugin Check security audit and resolved all flagged issues 56 62 57 63 = 1.6.1 (2025.05.21) = -
wp-about-author/trunk/wp-about-author-admin.php
r3298349 r3298356 92 92 $general_content .= wp_nonce_field('wp-about-author-update-options', '_wpnonce', true, false); 93 93 } 94 $general_content .= '<p><strong>' . __("Display On Front Page", 'wp-about-author') . '</strong><br />95 <input type="checkbox" name="wp_author_display_front" id="wp_author_display_front" ' . checked($wp_about_author_settings['wp_author_display_front'], 'on', false) . ' />96 <label for="wp_author_display_front">Display author box on the front page at the top of each entry.</label></p>';97 $general_content .= '<p><strong>' . __("Display In Archives", 'wp-about-author') . '</strong><br />98 <input type="checkbox" name="wp_author_display_archives" id="wp_author_display_archives" ' . checked($wp_about_author_settings['wp_author_display_archives'], 'on', false) . ' />99 <label for="wp_author_display_archives">Display author box on the archive pages at the top of each entry.</label></p>';100 $general_content .= '<p><strong>' . __("Display In Search Results", 'wp-about-author') . '</strong><br />101 <input type="checkbox" name="wp_author_display_search" id="wp_author_display_search" ' . checked($wp_about_author_settings['wp_author_display_search'], 'on', false) . ' />102 <label for="wp_author_display_search">Display author box on the search page at the top of each entry.</label></p>';103 $general_content .= '<p><strong>' . __("Display On Individual Posts", 'wp-about-author') . '</strong><br />104 <input type="checkbox" name="wp_author_display_posts" id="wp_author_display_posts" ' . checked($wp_about_author_settings['wp_author_display_posts'], 'on', false) . ' />105 <label for="wp_author_display_posts">Display author box on individual posts at the top of the entry.</label></p>';106 $general_content .= '<p><strong>' . __("Display On Individual Pages", 'wp-about-author') . '</strong><br />107 <input type="checkbox" name="wp_author_display_pages" id="wp_author_display_pages" ' . checked($wp_about_author_settings['wp_author_display_pages'], 'on', false) . ' />108 <label for="wp_author_display_pages">Display author box on individual pages at the top of the entry.</label></p>';109 $general_content .= '<p><strong>' . __("Display In RSS Feeds", 'wp-about-author') . '</strong><br />110 <input type="checkbox" name="wp_author_display_feed" id="wp_author_display_feed" ' . checked($wp_about_author_settings['wp_author_display_feed'], 'on', false) . ' />111 <label for="wp_author_display_feed">Display author box in feeds at the top of each entry.</label></p>';112 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-general', 'Display Settings', $general_content);113 114 $box_content .= '<p><strong>' . __("Box Layout", 'wp-about-author') . '</strong><br />115 <select name="layout" id="wp-layout">116 <option value="default" ' . selected($wp_about_author_settings['layout'], 'default', false) . '>Left Avatar with Right Text</option>117 <option value="right" ' . selected($wp_about_author_settings['layout'], 'right', false) . '>Right Avatar with Left Text</option>118 <option value="center-image" ' . selected($wp_about_author_settings['layout'], 'center-image', false) . '>Centered Avatar Above Text</option>119 <option value="center-text" ' . selected($wp_about_author_settings['layout'], 'center-text', false) . '>Centered Text Above Avatar</option>120 </select><br /><label for="wp-layout">The layout of the author box.</label></p>';121 $box_content .= '<p><strong>' . __("Box Background Color", 'wp-about-author') . '</strong><br />122 <input type="text" name="wp_author_alert_bg" id="box-background-color" value="' . $wp_about_author_settings['wp_author_alert_bg']. '" /><br />123 <label for="box-background-color">By default, the background color of the box is transparent.</label></p>';94 $general_content .= '<p><strong>' . esc_html__("Display On Front Page", 'wp-about-author') . '</strong><br /> 95 <input type="checkbox" name="wp_author_display_front" id="wp_author_display_front" ' . checked($wp_about_author_settings['wp_author_display_front'], 'on', false) . ' /> 96 <label for="wp_author_display_front">' . esc_html__('Display author box on the front page at the top of each entry.', 'wp-about-author') . '</label></p>'; 97 $general_content .= '<p><strong>' . esc_html__("Display In Archives", 'wp-about-author') . '</strong><br /> 98 <input type="checkbox" name="wp_author_display_archives" id="wp_author_display_archives" ' . checked($wp_about_author_settings['wp_author_display_archives'], 'on', false) . ' /> 99 <label for="wp_author_display_archives">' . esc_html__('Display author box on the archive pages at the top of each entry.', 'wp-about-author') . '</label></p>'; 100 $general_content .= '<p><strong>' . esc_html__("Display In Search Results", 'wp-about-author') . '</strong><br /> 101 <input type="checkbox" name="wp_author_display_search" id="wp_author_display_search" ' . checked($wp_about_author_settings['wp_author_display_search'], 'on', false) . ' /> 102 <label for="wp_author_display_search">' . esc_html__('Display author box on the search page at the top of each entry.', 'wp-about-author') . '</label></p>'; 103 $general_content .= '<p><strong>' . esc_html__("Display On Individual Posts", 'wp-about-author') . '</strong><br /> 104 <input type="checkbox" name="wp_author_display_posts" id="wp_author_display_posts" ' . checked($wp_about_author_settings['wp_author_display_posts'], 'on', false) . ' /> 105 <label for="wp_author_display_posts">' . esc_html__('Display author box on individual posts at the top of the entry.', 'wp-about-author') . '</label></p>'; 106 $general_content .= '<p><strong>' . esc_html__("Display On Individual Pages", 'wp-about-author') . '</strong><br /> 107 <input type="checkbox" name="wp_author_display_pages" id="wp_author_display_pages" ' . checked($wp_about_author_settings['wp_author_display_pages'], 'on', false) . ' /> 108 <label for="wp_author_display_pages">' . esc_html__('Display author box on individual pages at the top of the entry.', 'wp-about-author') . '</label></p>'; 109 $general_content .= '<p><strong>' . esc_html__("Display In RSS Feeds", 'wp-about-author') . '</strong><br /> 110 <input type="checkbox" name="wp_author_display_feed" id="wp_author_display_feed" ' . checked($wp_about_author_settings['wp_author_display_feed'], 'on', false) . ' /> 111 <label for="wp_author_display_feed">' . esc_html__('Display author box in feeds at the top of each entry.', 'wp-about-author') . '</label></p>'; 112 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-general', esc_html__('Display Settings', 'wp-about-author'), $general_content); 113 114 $box_content .= '<p><strong>' . esc_html__("Box Layout", 'wp-about-author') . '</strong><br /> 115 <select name="layout" id="wp-layout"> 116 <option value="default" ' . selected($wp_about_author_settings['layout'], 'default', false) . '>Left Avatar with Right Text</option> 117 <option value="right" ' . selected($wp_about_author_settings['layout'], 'right', false) . '>Right Avatar with Left Text</option> 118 <option value="center-image" ' . selected($wp_about_author_settings['layout'], 'center-image', false) . '>Centered Avatar Above Text</option> 119 <option value="center-text" ' . selected($wp_about_author_settings['layout'], 'center-text', false) . '>Centered Text Above Avatar</option> 120 </select><br /><label for="wp-layout">' . esc_html__('The layout of the author box.', 'wp-about-author') . '</label></p>'; 121 $box_content .= '<p><strong>' . esc_html__("Box Background Color", 'wp-about-author') . '</strong><br /> 122 <input type="text" name="wp_author_alert_bg" id="box-background-color" value="' . esc_attr($wp_about_author_settings['wp_author_alert_bg']) . '" /><br /> 123 <label for="box-background-color">' . esc_html__('By default, the background color of the box is transparent.', 'wp-about-author') . '</label></p>'; 124 124 $box_content .= '<script> 125 jQuery(document).ready(function($) {126 $("#box-background-color").wpColorPicker();127 });128 </script>';129 $box_content .= '<p><strong>' . __("Box Border", 'wp-about-author') . '</strong><br />130 <select name="wp_author_alert_border" id="wp_author_alert_border">131 <option value="top" ' . selected($wp_about_author_settings['wp_author_alert_border'], 'top', false) . '>Thick Top Border</option>132 <option value="around" ' . selected($wp_about_author_settings['wp_author_alert_border'], 'around', false) . '>Thin Surrounding Border</option>133 <option value="stripe " ' . selected($wp_about_author_settings['wp_author_alert_border'], 'stripe ', false) . '>Thick Left Border</option>134 <option value="none" ' . selected($wp_about_author_settings['wp_author_alert_border'], 'none', false) . '>No Border</option>135 </select><br /><label for="wp_author_alert_border">By default, a thick black line is displayed above the author bio.</label></p>';136 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-alert', 'Box Settings', $box_content);137 138 $avatar_content .= '<p><strong>' . __("Size", 'wp-about-author') . '</strong><br />139 <input type="text" name="wp_author_avatar_size" id="wp_author_avatar_size" value="' . $wp_about_author_settings['wp_author_avatar_size']. '" /><br />140 <label for="wp_author_avatar_size">By default, the size of the image is 100x100.</label></p>';141 $avatar_content .= '<p><strong>' . __("Display as Circle", 'wp-about-author') . '</strong><br />142 <input type="checkbox" name="wp_author_avatar_shape" id="wp_author_avatar_shape" ' . checked($wp_about_author_settings['wp_author_avatar_shape'], 'on', false) . ' />143 <label for="wp_author_avatar_shape">Display circular images instead of square ones.</label></p>';144 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-avatar', 'Avatar Settings', $avatar_content);145 146 $social_content .= '<p><strong>' . __("Display Social Media Icons", 'wp-about-author') . '</strong><br />147 <input type="checkbox" name="wp_author_social_images" id="wp_author_social_images" ' . checked($wp_about_author_settings['wp_author_social_images'], 'on', false) . ' />148 <label for="wp_author_social_images">Display buttons instead of text links in the author box.</label></p>';149 $social_content .= '<p><strong>' . __("SVG & Accent Color", 'wp-about-author') . '</strong><br />150 <input type="text" name="svg_color" id="svg-color" value="' . $wp_about_author_settings['svg_color']. '" /><br />151 <label for="svg-color">By default, icons and accent colors are black.</label></p>';125 jQuery(document).ready(function($) { 126 $("#box-background-color").wpColorPicker(); 127 }); 128 </script>'; 129 $box_content .= '<p><strong>' . esc_html__("Box Border", 'wp-about-author') . '</strong><br /> 130 <select name="wp_author_alert_border" id="wp_author_alert_border"> 131 <option value="top" ' . selected($wp_about_author_settings['wp_author_alert_border'], 'top', false) . '>Thick Top Border</option> 132 <option value="around" ' . selected($wp_about_author_settings['wp_author_alert_border'], 'around', false) . '>Thin Surrounding Border</option> 133 <option value="stripe " ' . selected($wp_about_author_settings['wp_author_alert_border'], 'stripe ', false) . '>Thick Left Border</option> 134 <option value="none" ' . selected($wp_about_author_settings['wp_author_alert_border'], 'none', false) . '>No Border</option> 135 </select><br /><label for="wp_author_alert_border">' . esc_html__('By default, a thick black line is displayed above the author bio.', 'wp-about-author') . '</label></p>'; 136 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-alert', esc_html__('Box Settings', 'wp-about-author'), $box_content); 137 138 $avatar_content .= '<p><strong>' . esc_html__("Size", 'wp-about-author') . '</strong><br /> 139 <input type="text" name="wp_author_avatar_size" id="wp_author_avatar_size" value="' . esc_attr($wp_about_author_settings['wp_author_avatar_size']) . '" /><br /> 140 <label for="wp_author_avatar_size">' . esc_html__('By default, the size of the image is 100x100.', 'wp-about-author') . '</label></p>'; 141 $avatar_content .= '<p><strong>' . esc_html__("Display as Circle", 'wp-about-author') . '</strong><br /> 142 <input type="checkbox" name="wp_author_avatar_shape" id="wp_author_avatar_shape" ' . checked($wp_about_author_settings['wp_author_avatar_shape'], 'on', false) . ' /> 143 <label for="wp_author_avatar_shape">' . esc_html__('Display circular images instead of square ones.', 'wp-about-author') . '</label></p>'; 144 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-avatar', esc_html__('Avatar Settings', 'wp-about-author'), $avatar_content); 145 146 $social_content .= '<p><strong>' . esc_html__("Display Social Media Icons", 'wp-about-author') . '</strong><br /> 147 <input type="checkbox" name="wp_author_social_images" id="wp_author_social_images" ' . checked($wp_about_author_settings['wp_author_social_images'], 'on', false) . ' /> 148 <label for="wp_author_social_images">' . esc_html__('Display buttons instead of text links in the author box.', 'wp-about-author') . '</label></p>'; 149 $social_content .= '<p><strong>' . esc_html__("SVG & Accent Color", 'wp-about-author') . '</strong><br /> 150 <input type="text" name="svg_color" id="svg-color" value="' . esc_attr($wp_about_author_settings['svg_color']) . '" /><br /> 151 <label for="svg-color">' . esc_html__('By default, icons and accent colors are black.', 'wp-about-author') . '</label></p>'; 152 152 $social_content .= '<script> 153 jQuery(document).ready(function($) {154 $("#svg-color").wpColorPicker();155 });156 </script>';157 $social_content .= '<p><strong>' . __("Size", 'wp-about-author') . '</strong><br />158 <input type="text" name="svg_size" id="svg_size" value="' . $wp_about_author_settings['svg_size']. '" /><br />159 <label for="svg_size">By default, the size of the image is 100x100.</label></p>';160 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-general', 'Social Links Display Settings', $social_content);161 162 wp_about_author_admin_wrap( 'WP About Author Settings', $wrapped_content);153 jQuery(document).ready(function($) { 154 $("#svg-color").wpColorPicker(); 155 }); 156 </script>'; 157 $social_content .= '<p><strong>' . esc_html__("Size", 'wp-about-author') . '</strong><br /> 158 <input type="text" name="svg_size" id="svg_size" value="' . esc_attr($wp_about_author_settings['svg_size']) . '" /><br /> 159 <label for="svg_size">' . esc_html__('By default, the size of the image is 100x100.', 'wp-about-author') . '</label></p>'; 160 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-general', esc_html__('Social Links Display Settings', 'wp-about-author'), $social_content); 161 162 wp_about_author_admin_wrap(esc_html__('WP About Author Settings', 'wp-about-author'), $wrapped_content); 163 163 } 164 164 // -
wp-about-author/trunk/wp-about-author.php
r3298349 r3298356 4 4 Plugin URI: https://jonbishop.com/downloads/wordpress-plugins/wp-about-author/ 5 5 Description: Easily display customizable author bios below your posts 6 Version: 1.6. 16 Version: 1.6.2 7 7 Author: Jon Bishop 8 8 Author URI: https://jonbishop.com … … 44 44 $wp_about_author_author_pic = get_avatar( 45 45 sanitize_email(get_the_author_meta('email')), 46 absint($wp_about_author_settings['wp_author_avatar_size']) 46 absint($wp_about_author_settings['wp_author_avatar_size']), 47 '', 48 esc_html($wp_about_author_author['name']) 47 49 ); 48 50
Note: See TracChangeset
for help on using the changeset viewer.