Changeset 2782053
- Timestamp:
- 09/08/2022 03:09:25 PM (4 years ago)
- Location:
- author-box-by-nocksoft
- Files:
-
- 19 added
- 1 deleted
- 9 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/LICENSE (added)
-
tags/1.1.0/author-box-by-nocksoft.php (added)
-
tags/1.1.0/css (added)
-
tags/1.1.0/css/hidewordpressauthorbox.css (added)
-
tags/1.1.0/css/style.css (added)
-
tags/1.1.0/js (added)
-
tags/1.1.0/js/colorpicker.js (added)
-
tags/1.1.0/languages (added)
-
tags/1.1.0/languages/author-box-by-nocksoft-de_DE.mo (added)
-
tags/1.1.0/languages/author-box-by-nocksoft-de_DE.po (added)
-
tags/1.1.0/php (added)
-
tags/1.1.0/php/authorbox.php (added)
-
tags/1.1.0/php/settings-defaults.php (added)
-
tags/1.1.0/php/settings-global.php (added)
-
tags/1.1.0/php/settings-user.php (added)
-
tags/1.1.0/php/settings.php (added)
-
tags/1.1.0/php/setup.php (added)
-
tags/1.1.0/readme.txt (added)
-
trunk/author-box-by-nocksoft.php (modified) (3 diffs)
-
trunk/css/style.css (modified) (1 diff)
-
trunk/languages/author-box-by-nocksoft-de_DE.mo (modified) (previous)
-
trunk/languages/author-box-by-nocksoft-de_DE.po (modified) (3 diffs)
-
trunk/php/authorbox.php (modified) (2 diffs)
-
trunk/php/avatars.php (deleted)
-
trunk/php/settings-global.php (modified) (11 diffs)
-
trunk/php/settings-user.php (modified) (4 diffs)
-
trunk/php/setup.php (modified) (1 diff)
-
trunk/readme.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
author-box-by-nocksoft/trunk/author-box-by-nocksoft.php
r2653204 r2782053 3 3 /* 4 4 Plugin Name: Author Box by Nocksoft 5 Version: 1. 0.55 Version: 1.1.0 6 6 Author: Rafael Nockmann @ Nocksoft 7 7 Author URI: https://nocksoft.de 8 8 Plugin URI: https://github.com/Nocksoft/Author-Box-by-Nocksoft 9 Description: Adds a modern customizable author info box at the end of your posts and implements support for local avatars.9 Description: Adds a modern customizable author info box at the end of your posts and pages with some information about the author. 10 10 Text Domain: author-box-by-nocksoft 11 11 License: GNU General Public License v2 or later … … 31 31 require_once plugin_dir_path(__FILE__) . "/php/settings-user.php"; 32 32 33 add_action("admin_enqueue_scripts", "nstab_loadcolorpicker"); 34 function nstab_loadcolorpicker() { 33 add_action("admin_enqueue_scripts", "nstab_loadadminscripts"); 34 function nstab_loadadminscripts() { 35 /* --- Color picker --- */ 35 36 wp_enqueue_style("wp-color-picker"); 36 wp_enqueue_script(" custom-script-handle", plugin_dir_url(__FILE__) . "js/colorpicker.js", array("wp-color-picker"), false, true);37 wp_enqueue_script("nstab_colorpicker", plugin_dir_url(__FILE__) . "js/colorpicker.js", array("wp-color-picker"), false, true); 37 38 } 38 39 … … 46 47 47 48 /* --- Load scripts --- */ 48 require_once plugin_dir_path(__FILE__) . "/php/avatars.php";49 49 require_once plugin_dir_path(__FILE__) . "/php/authorbox.php"; 50 50 require_once plugin_dir_path(__FILE__) . "/php/settings.php"; 51 51 52 52 53 /* --- Load styles --- */ 54 wp_register_style("author-box-by-nocksoft-style", plugin_dir_url(__FILE__) . "css/style.css"); 55 wp_enqueue_style("author-box-by-nocksoft-style"); 53 add_action("wp_enqueue_scripts", "nstab_loadstyles"); 54 function nstab_loadstyles() { 55 /* --- Load styles --- */ 56 wp_register_style("author-box-by-nocksoft-style", plugin_dir_url(__FILE__) . "css/style.css"); 57 wp_enqueue_style("author-box-by-nocksoft-style"); 56 58 57 if ($nstab_setting_hidewordpressauthorbox == true) { 58 wp_register_style("author-box-by-nocksoft-hidewordpressauthorbox", plugin_dir_url(__FILE__) . "css/hidewordpressauthorbox.css"); 59 wp_enqueue_style("author-box-by-nocksoft-hidewordpressauthorbox"); 59 global $nstab_setting_hidewordpressauthorbox; 60 if ($nstab_setting_hidewordpressauthorbox == true) { 61 wp_register_style("author-box-by-nocksoft-hidewordpressauthorbox", plugin_dir_url(__FILE__) . "css/hidewordpressauthorbox.css"); 62 wp_enqueue_style("author-box-by-nocksoft-hidewordpressauthorbox"); 63 } 60 64 } 61 65 -
author-box-by-nocksoft/trunk/css/style.css
r2653204 r2782053 36 36 } 37 37 38 #author-box-by-nocksoft #nstab_wrapper #nstab_authorbio p{38 #author-box-by-nocksoft #nstab_wrapper #nstab_authorbio div { 39 39 margin: 0; 40 40 padding-top: 0.5em; 41 41 } 42 42 43 #author-box-by-nocksoft #nstab_wrapper #nstab_authorbio p#nstab_description {43 #author-box-by-nocksoft #nstab_wrapper #nstab_authorbio div#nstab_description { 44 44 line-height: 1.3; 45 45 } 46 46 47 #author-box-by-nocksoft #nstab_wrapper #nstab_authorbio p#nstab_links {47 #author-box-by-nocksoft #nstab_wrapper #nstab_authorbio div#nstab_links { 48 48 padding-top: 0.5em; 49 49 font-style: italic; -
author-box-by-nocksoft/trunk/languages/author-box-by-nocksoft-de_DE.po
r2653204 r2782053 1 1 #. Description of the plugin/theme 2 msgid "Adds a modern customizable author info box at the end of your posts and implements support for local avatars."3 msgstr "Fügt eine moderne anpassbare Autoren Info Box am Ende deines Beitrages ein und bringt Support für lokale Avatare."2 msgid "Adds a modern customizable author info box at the end of your posts and pages with some information about the author." 3 msgstr "Fügt eine moderne anpassbare Autoren Info Box am Ende deines Beitrages oder Seite mit einigen Informationen über den Autor ein." 4 4 5 5 #: author-box-by-nocksoft.php:22 … … 11 11 msgstr "Archiv anzeigen" 12 12 13 #: authorbox.php:6 213 #: authorbox.php:61 14 14 msgid "View Archive" 15 15 msgstr "Archiv anzeigen" … … 156 156 157 157 #: settings-user.php:15 158 msgid "Local avatars"159 msgstr "Lokale Avatare"158 msgid "Local Avatar" 159 msgstr "Lokaler Avatar" 160 160 161 #: settings-user.php:1 8162 msgid " Use local avatars instead of Gravatar (Enter the URL to your avatar in the input field below)"163 msgstr " Verwende lokale Avatare an Stelle von Gravatar (Trage die URL zu deinem Profilbild in das untere Eingabefeld ein)"161 #: settings-user.php:16 162 msgid "The local avatars feature was moved to a separate plugin. Please install <a href='https://wordpress.org/plugins/local-avatars-by-nocksoft/' target='_blank'>Local Avatars by Nocksoft</a>." 163 msgstr "Die Funktion für lokale Avatare wurde in ein separates Plugin ausgelagert. Bitte installiere <a href='https://wordpress.org/plugins/local-avatars-by-nocksoft/' target='_blank'>Local Avatars by Nocksoft</a>." 164 164 165 #: settings-user.php:23 166 msgid "Avatar (URL)" 167 msgstr "Avatar (URL)" 168 169 #: settings-user.php:26 170 msgid "Avatar URL (e.g. https://yoursite.com/avatar.jpg)" 171 msgstr "Avatar URL (z.B. https://deineseite.de/avatar.jpg)" 172 173 #: settings-user.php:27 174 msgid "Please enter a valid URL to your avatar, so that it can be displayed in the author box. You will get the best results if your avatar has the same width and height dimensions." 175 msgstr "Gebe bitte eine gültige URL zu deinem Avatar an, damit dieses in der Author Box angezeigt werden kann. Das beste Ergebnis erhältst du, wenn dein Profilbild die gleiche Höhe und Breite aufweist." 176 177 #: settings-user.php:32 165 #: settings-user.php:20 178 166 msgid "Your Position" 179 167 msgstr "Deine Position" 180 168 181 #: settings-user.php: 35169 #: settings-user.php:23 182 170 msgid "Position (e.g. Founder or Author of YourSite)" 183 171 msgstr "Position (z.B. Gründer oder Autor von DeineSeite)" 184 172 185 #: settings-user.php: 36173 #: settings-user.php:24 186 174 msgid "Here you can enter your position. The position is shown below your name in the Author Box." 187 175 msgstr "Hier kannst du deine Position angeben. Die Position wird unterhalb deines Namens in der Author Box angezeigt." 188 176 189 #: settings-user.php: 41177 #: settings-user.php:29 190 178 msgid "Homepage / About Me Page" 191 179 msgstr "Homepage / Über Mich Seite" 192 180 193 #: settings-user.php: 45181 #: settings-user.php:33 194 182 msgid "Link Text (e.g. Homepage or About Me)" 195 183 msgstr "Link Text (z.B. Homepage oder Über mich)" 196 184 197 #: settings-user.php: 46185 #: settings-user.php:34 198 186 msgid "Link URL (e.g. https://yoursite.com)" 199 187 msgstr "Link URL (z.B. https://deineseite.de)" 200 188 201 #: settings-user.php: 47189 #: settings-user.php:35 202 190 msgid "This URL will be displayed below your biography in the Author Box." 203 191 msgstr "Diese URL wird unterhalb deiner Biografie in der Author Box angezeigt." -
author-box-by-nocksoft/trunk/php/authorbox.php
r2653204 r2782053 51 51 $authorlinkurl = get_the_author_meta("nstab_setting_homepage_linkurl"); 52 52 if ($authorlinktext != null && $authorlinkurl != null) { 53 $homepagehref = "< p id='nstab_links' style='font-size: " . $nstab_setting_fontsizelinks . "em;'><a href='" . $authorlinkurl . "'>" . $authorlinktext . "</a>";53 $homepagehref = "<a href='" . $authorlinkurl . "'>" . $authorlinktext . "</a>"; 54 54 if ($nstab_setting_displayauthorsarchive == true) { 55 55 $homepagehref .= " | <a href='" . get_author_posts_url($author_id) . "'>" . __("View Archive", "author-box-by-nocksoft") . "</a>"; 56 56 } 57 $homepagehref .= "</p>";58 57 } 59 58 else { 60 59 $homepagehref = ""; 61 60 if ($nstab_setting_displayauthorsarchive == true) { 62 $homepagehref .= "< p id='nstab_links' style='font-size: " . $nstab_setting_fontsizelinks . "em;'><a href='" . get_author_posts_url($author_id) . "'>" . __("View Archive", "author-box-by-nocksoft") . "</a></p>";61 $homepagehref .= "<a href='" . get_author_posts_url($author_id) . "'>" . __("View Archive", "author-box-by-nocksoft") . "</a>"; 63 62 } 64 63 } … … 67 66 $shadow = $nstab_setting_showshadow == true ? "padding: 0.75em; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);" : null; 68 67 $border = $nstab_setting_showborder == true ? "padding: 0.75em; border: ".$nstab_setting_bordersize."px solid ".$nstab_setting_bordercolor.";" : null; 69 $authorboxcontainer = "<div id='author-box-by-nocksoft' style='".$font.$shadow.$border."'>";70 68 71 $url = nstab_get_local_avatarurl($author_id); 72 if (empty($url)) $url = get_avatar_url($author_id); 69 $url = get_avatar_url($author_id); 73 70 74 $authorbox = $authorboxcontainer .= " 71 $authorbox = " 72 <div id='author-box-by-nocksoft' style='".$font.$shadow.$border."'> 75 73 <div id='nstab_wrapper'> 76 74 <div id='nstab_authoravatar' " . $circleavatar . " style='background-image: url(\"".$url."\"); height: ".$nstab_setting_avatarsize."px; width: ".$nstab_setting_avatarsize."px;'></div> 77 75 <div id='nstab_authorbio' style='height: ".$nstab_setting_avatarsize."px;'> 78 <div id='header'>79 <span id='headline' style='font-size: " . $nstab_setting_fontsizeheadline . "em;'>" . $nstab_setting_headline . " " . get_the_author_meta("display_name") . "</span>80 <span id='position' style='font-size: " . $nstab_setting_fontsizeposition . "em;'>" . get_the_author_meta("nstab_setting_authorposition") . "</span>81 </div>82 <p id='nstab_description' style='font-size: " . $nstab_setting_fontsizebio . "em;'>" . get_the_author_meta("description") . "</p>83 " . $homepagehref . " 84 </div>76 <div id='header'> 77 <span id='headline' style='font-size: " . $nstab_setting_fontsizeheadline . "em;'>" . $nstab_setting_headline . " " . get_the_author_meta("display_name") . "</span> 78 <span id='position' style='font-size: " . $nstab_setting_fontsizeposition . "em;'>" . get_the_author_meta("nstab_setting_authorposition") . "</span> 79 </div> 80 <div id='nstab_description' style='font-size: " . $nstab_setting_fontsizebio . "em;'>" . get_the_author_meta("description") . "</div> 81 <div id='nstab_links' style='font-size: " . $nstab_setting_fontsizelinks . "em;'>" . $homepagehref . "</div> 82 </div> 85 83 </div> 86 84 </div> -
author-box-by-nocksoft/trunk/php/settings-global.php
r2653204 r2782053 15 15 16 16 add_action("admin_init", function() { 17 register_setting("nstab_settings_general", "nstab_setting_displayauthorboxonposts" );18 register_setting("nstab_settings_general", "nstab_setting_displayauthorboxonpages" );19 register_setting("nstab_settings_general", "nstab_setting_hidewordpressauthorbox" );17 register_setting("nstab_settings_general", "nstab_setting_displayauthorboxonposts", "boolval"); 18 register_setting("nstab_settings_general", "nstab_setting_displayauthorboxonpages", "boolval"); 19 register_setting("nstab_settings_general", "nstab_setting_hidewordpressauthorbox", "boolval"); 20 20 21 21 register_setting("nstab_settings_layout", "nstab_setting_font"); 22 register_setting("nstab_settings_layout", "nstab_setting_showshadow" );23 register_setting("nstab_settings_layout", "nstab_setting_showborder" );22 register_setting("nstab_settings_layout", "nstab_setting_showshadow", "boolval"); 23 register_setting("nstab_settings_layout", "nstab_setting_showborder", "boolval"); 24 24 register_setting("nstab_settings_layout", "nstab_setting_bordercolor"); 25 25 register_setting("nstab_settings_layout", "nstab_setting_bordersize"); 26 26 register_setting("nstab_settings_layout", "nstab_setting_avatarsize"); 27 register_setting("nstab_settings_layout", "nstab_setting_circleavatar" );27 register_setting("nstab_settings_layout", "nstab_setting_circleavatar", "boolval"); 28 28 register_setting("nstab_settings_layout", "nstab_setting_headline"); 29 29 register_setting("nstab_settings_layout", "nstab_setting_fontsizeheadline"); … … 31 31 register_setting("nstab_settings_layout", "nstab_setting_fontsizebio"); 32 32 register_setting("nstab_settings_layout", "nstab_setting_fontsizelinks"); 33 register_setting("nstab_settings_layout", "nstab_setting_displayauthorsarchive" );33 register_setting("nstab_settings_layout", "nstab_setting_displayauthorsarchive", "boolval"); 34 34 }); 35 35 … … 58 58 global $nstab_setting_displayauthorsarchive; 59 59 60 $tab = isset($_GET["tab"]) ? $_GET["tab"]: null;60 $tab = isset($_GET["tab"]) ? sanitize_text_field($_GET["tab"]) : null; 61 61 ?> 62 62 <div class="wrap"> 63 <h1><? =esc_html(get_admin_page_title()); ?></h1>63 <h1><?php esc_html(get_admin_page_title()); ?></h1> 64 64 65 65 <p><?php echo __("User-specific settings are made in your user profile in WordPress (Users -> Your Profile -> Edit). General settings can be made here.", "author-box-by-nocksoft"); ?></p> … … 88 88 <th scope="row"><?php echo __("Author Box display options", "author-box-by-nocksoft"); ?></th> 89 89 <td> 90 <input type="checkbox" id="nstab_setting_displayauthorboxonposts" name="nstab_setting_displayauthorboxonposts" <?php if ($nstab_setting_displayauthorboxonposts == true) echo "checked"; ?> />90 <input type="checkbox" id="nstab_setting_displayauthorboxonposts" name="nstab_setting_displayauthorboxonposts" <?php checked($nstab_setting_displayauthorboxonposts); ?> /> 91 91 <label for="nstab_setting_displayauthorboxonposts"><?php echo __("Display Author Box at the end of each post automatically", "author-box-by-nocksoft"); ?></label> 92 92 <br> 93 <input type="checkbox" id="nstab_setting_displayauthorboxonpages" name="nstab_setting_displayauthorboxonpages" <?php if ($nstab_setting_displayauthorboxonpages == true) echo "checked"; ?> />93 <input type="checkbox" id="nstab_setting_displayauthorboxonpages" name="nstab_setting_displayauthorboxonpages" <?php checked($nstab_setting_displayauthorboxonpages); ?> /> 94 94 <label for="nstab_setting_displayauthorboxonpages"><?php echo __("Display Author Box at the end of each page automatically (not on front page, blog homepage and privacy policy)", "author-box-by-nocksoft"); ?></label> 95 95 </td> … … 99 99 <th scope="row"><?php echo __("Other options", "author-box-by-nocksoft"); ?></th> 100 100 <td> 101 <input type="checkbox" id="nstab_setting_hidewordpressauthorbox" name="nstab_setting_hidewordpressauthorbox" <?php if ($nstab_setting_hidewordpressauthorbox == true) echo "checked"; ?> />101 <input type="checkbox" id="nstab_setting_hidewordpressauthorbox" name="nstab_setting_hidewordpressauthorbox" <?php checked($nstab_setting_hidewordpressauthorbox); ?> /> 102 102 <label for="nstab_setting_hidewordpressauthorbox"><?php echo __("Hide the author box of default WordPress theme (tested from Twenty Nineteen up to Twenty Twenty-One)", "author-box-by-nocksoft"); ?></label> 103 103 <p class="description"><?php echo __("If your theme offers you an option to hide the author box of your theme, you should use your theme's setting for this.", "author-box-by-nocksoft"); ?></p> … … 120 120 <p class="description"><?php echo __("Inherit from website means that the fonts of the WordPress theme are used.", "author-box-by-nocksoft"); ?></p> 121 121 <p> 122 <input type="checkbox" id="nstab_setting_showshadow" name="nstab_setting_showshadow" <?php if ($nstab_setting_showshadow == true) echo "checked"; ?> />122 <input type="checkbox" id="nstab_setting_showshadow" name="nstab_setting_showshadow" <?php checked($nstab_setting_showshadow); ?> /> 123 123 <label for="nstab_setting_showshadow"><?php echo __("Show Shadow of Author Box", "author-box-by-nocksoft"); ?></label> 124 124 </p> … … 129 129 <th scope="row"><?php echo __("Border", "author-box-by-nocksoft"); ?></th> 130 130 <td> 131 <input type="checkbox" id="nstab_setting_showborder" name="nstab_setting_showborder" <?php if ($nstab_setting_showborder == true) echo "checked"; ?> />131 <input type="checkbox" id="nstab_setting_showborder" name="nstab_setting_showborder" <?php checked($nstab_setting_showborder); ?> /> 132 132 <label for="nstab_setting_showborder"><?php echo __("Show Border of Author Box", "author-box-by-nocksoft"); ?></label> 133 133 <p> 134 <input type="text" id="nstab_setting_bordercolor" name="nstab_setting_bordercolor" class="nstab_colorpicker" value="<?php echo $nstab_setting_bordercolor; ?>" data-default-color="<?php echo $nstab_setting_default_bordercolor; ?>" />134 <input type="text" id="nstab_setting_bordercolor" name="nstab_setting_bordercolor" class="nstab_colorpicker" value="<?php echo esc_textarea($nstab_setting_bordercolor); ?>" data-default-color="<?php echo esc_textarea($nstab_setting_default_bordercolor); ?>" /> 135 135 <label for="nstab_setting_bordercolor"><?php echo __("Color of border", "author-box-by-nocksoft"); ?></label> 136 136 </p> 137 <input type="number" id="nstab_setting_bordersize" name="nstab_setting_bordersize" min="1" max="5" step="1" value="<?php echo $nstab_setting_bordersize; ?>" />137 <input type="number" id="nstab_setting_bordersize" name="nstab_setting_bordersize" min="1" max="5" step="1" value="<?php echo esc_textarea($nstab_setting_bordersize); ?>" /> 138 138 <label for="nstab_setting_bordersize"><?php echo __("Size of border", "author-box-by-nocksoft"); ?></label> 139 139 </td> … … 143 143 <th scope="row"><?php echo __("Avatar", "author-box-by-nocksoft"); ?></th> 144 144 <td> 145 <input type="number" id="nstab_setting_avatarsize" name="nstab_setting_avatarsize" min="96" max="200" value="<?php echo $nstab_setting_avatarsize; ?>" />145 <input type="number" id="nstab_setting_avatarsize" name="nstab_setting_avatarsize" min="96" max="200" value="<?php echo esc_textarea($nstab_setting_avatarsize); ?>" /> 146 146 <label for="nstab_setting_avatarsize"><?php echo __("Size of Avatar (Pixel)", "author-box-by-nocksoft"); ?></label> 147 147 <p> 148 <input type="checkbox" id="nstab_setting_circleavatar" name="nstab_setting_circleavatar" <?php if ($nstab_setting_circleavatar == true) echo "checked"; ?> />148 <input type="checkbox" id="nstab_setting_circleavatar" name="nstab_setting_circleavatar" <?php checked($nstab_setting_circleavatar); ?> /> 149 149 <label for="nstab_setting_circleavatar"><?php echo __("Use a circle avatar instead of a square", "author-box-by-nocksoft"); ?></label> 150 150 </p> … … 155 155 <th scope="row"><?php echo __("Header", "author-box-by-nocksoft"); ?></th> 156 156 <td> 157 <input type="text" id="nstab_setting_headline" name="nstab_setting_headline" placeholder="<?php echo __("e.g. A Post by", "author-box-by-nocksoft"); ?>" value="<?php echo $nstab_setting_headline; ?>" />157 <input type="text" id="nstab_setting_headline" name="nstab_setting_headline" placeholder="<?php echo __("e.g. A Post by", "author-box-by-nocksoft"); ?>" value="<?php echo esc_textarea($nstab_setting_headline); ?>" /> 158 158 <label for="nstab_setting_headline"><?php echo __("Headline", "author-box-by-nocksoft"); ?></label> 159 159 <p> 160 <input type="number" id="nstab_setting_fontsizeheadline" name="nstab_setting_fontsizeheadline" min="0.5" max="2" step="0.1" value="<?php echo $nstab_setting_fontsizeheadline; ?>" />160 <input type="number" id="nstab_setting_fontsizeheadline" name="nstab_setting_fontsizeheadline" min="0.5" max="2" step="0.1" value="<?php echo esc_textarea($nstab_setting_fontsizeheadline); ?>" /> 161 161 <label for="nstab_setting_fontsizeheadline"><?php echo __("Fontsize of Headline (em)", "author-box-by-nocksoft"); ?></label> 162 162 </p> 163 163 <p> 164 <input type="number" id="nstab_setting_fontsizeposition" name="nstab_setting_fontsizeposition" min="0.4" max="0.9" step="0.1" value="<?php echo $nstab_setting_fontsizeposition; ?>" />164 <input type="number" id="nstab_setting_fontsizeposition" name="nstab_setting_fontsizeposition" min="0.4" max="0.9" step="0.1" value="<?php echo esc_textarea($nstab_setting_fontsizeposition); ?>" /> 165 165 <label for="nstab_setting_fontsizeposition"><?php echo __("Fontsize of author's Position (em)", "author-box-by-nocksoft"); ?></label> 166 166 </p> … … 171 171 <th scope="row"><?php echo __("Biography", "author-box-by-nocksoft"); ?></th> 172 172 <td> 173 <input type="number" id="nstab_setting_fontsizebio" name="nstab_setting_fontsizebio" min="0.4" max="1.5" step="0.1" value="<?php echo $nstab_setting_fontsizebio; ?>" />173 <input type="number" id="nstab_setting_fontsizebio" name="nstab_setting_fontsizebio" min="0.4" max="1.5" step="0.1" value="<?php echo esc_textarea($nstab_setting_fontsizebio); ?>" /> 174 174 <label for="nstab_setting_fontsizebio"><?php echo __("Fontsize of Biography (em)", "author-box-by-nocksoft"); ?></label> 175 175 </td> … … 179 179 <th scope="row"><?php echo __("Footer", "author-box-by-nocksoft"); ?></th> 180 180 <td> 181 <input type="number" id="nstab_setting_fontsizelinks" name="nstab_setting_fontsizelinks" min="0.3" max="1" step="0.1" value="<?php echo $nstab_setting_fontsizelinks; ?>" />181 <input type="number" id="nstab_setting_fontsizelinks" name="nstab_setting_fontsizelinks" min="0.3" max="1" step="0.1" value="<?php echo esc_textarea($nstab_setting_fontsizelinks); ?>" /> 182 182 <label for="nstab_setting_fontsizelinks"><?php echo __("Fontsize of Links (em)", "author-box-by-nocksoft"); ?></label> 183 183 <p> 184 <input type="checkbox" id="nstab_setting_displayauthorsarchive" name="nstab_setting_displayauthorsarchive" <?php if ($nstab_setting_displayauthorsarchive == true) echo "checked"; ?> />184 <input type="checkbox" id="nstab_setting_displayauthorsarchive" name="nstab_setting_displayauthorsarchive" <?php checked($nstab_setting_displayauthorsarchive); ?> /> 185 185 <label for="nstab_setting_displayauthorsarchive"><?php echo __("Display a link to the author's archive", "author-box-by-nocksoft"); ?></label> 186 186 </p> -
author-box-by-nocksoft/trunk/php/settings-user.php
r2653204 r2782053 13 13 <table class="form-table"> 14 14 <tr> 15 <th><label for="nstab_setting_localavatar"><?php echo __("Local avatars", "author-box-by-nocksoft"); ?></label></th> 16 <td> 17 <input type="checkbox" id="nstab_setting_localavatar" name="nstab_setting_localavatar" <?php if (get_the_author_meta("nstab_setting_localavatar", $user->ID) == "on") echo "checked"; ?>> 18 <label for="nstab_setting_localavatar"><?php echo __("Use local avatars instead of Gravatar (Enter the URL to your avatar in the input field below)", "author-box-by-nocksoft"); ?></label> 19 </td> 20 </tr> 21 22 <tr> 23 <th><label for="nstab_setting_avatarurl"><?php echo __("Avatar (URL)", "author-box-by-nocksoft"); ?></label></th> 24 <td> 25 <?php $avatarurl = get_the_author_meta("nstab_setting_avatarurl", $user->ID); ?> 26 <input type="text" id="nstab_setting_avatarurl" name="nstab_setting_avatarurl" class="regular-text" placeholder="<?php echo __("Avatar URL (e.g. https://yoursite.com/avatar.jpg)", "author-box-by-nocksoft"); ?>" value="<?php echo $avatarurl; ?>" /> 27 <p class="description"><?php echo __("Please enter a valid URL to your avatar, so that it can be displayed in the author box. You will get the best results if your avatar has the same width and height dimensions.", "author-box-by-nocksoft"); ?></p> 28 </td> 15 <th><label for="nstab_setting_localavatar"><?php echo __("Local Avatar", "author-box-by-nocksoft"); ?></label></th> 16 <td><p><?php echo __("The local avatars feature was moved to a separate plugin. Please install <a href='https://wordpress.org/plugins/local-avatars-by-nocksoft/' target='_blank'>Local Avatars by Nocksoft</a>.", "author-box-by-nocksoft"); ?></p></td> 29 17 </tr> 30 18 … … 33 21 <td> 34 22 <?php $authorposition = get_the_author_meta("nstab_setting_authorposition", $user->ID); ?> 35 <input type="text" id="nstab_setting_authorposition" name="nstab_setting_authorposition" class="regular-text" placeholder="<?php echo __("Position (e.g. Founder or Author of YourSite)", "author-box-by-nocksoft"); ?>" value="<?php echo $authorposition; ?>" />23 <input type="text" id="nstab_setting_authorposition" name="nstab_setting_authorposition" class="regular-text" placeholder="<?php echo __("Position (e.g. Founder or Author of YourSite)", "author-box-by-nocksoft"); ?>" value="<?php echo esc_textarea($authorposition); ?>" /> 36 24 <p class="description"><?php echo __("Here you can enter your position. The position is shown below your name in the Author Box.", "author-box-by-nocksoft"); ?></p> 37 25 </td> … … 43 31 <?php $linktext = get_the_author_meta("nstab_setting_homepage_linktext", $user->ID); ?> 44 32 <?php $linkurl = get_the_author_meta("nstab_setting_homepage_linkurl", $user->ID); ?> 45 <input type="text" id="nstab_setting_homepage_linktext" name="nstab_setting_homepage_linktext" class="regular-text" placeholder="<?php echo __("Link Text (e.g. Homepage or About Me)", "author-box-by-nocksoft"); ?>" value="<?php echo $linktext; ?>" />46 <input type="text" id="nstab_setting_homepage_linkurl" name="nstab_setting_homepage_linkurl" class="regular-text" placeholder="<?php echo __("Link URL (e.g. https://yoursite.com)", "author-box-by-nocksoft"); ?>" value="<?php echo $linkurl; ?>" />33 <input type="text" id="nstab_setting_homepage_linktext" name="nstab_setting_homepage_linktext" class="regular-text" placeholder="<?php echo __("Link Text (e.g. Homepage or About Me)", "author-box-by-nocksoft"); ?>" value="<?php echo esc_textarea($linktext); ?>" /> 34 <input type="text" id="nstab_setting_homepage_linkurl" name="nstab_setting_homepage_linkurl" class="regular-text" placeholder="<?php echo __("Link URL (e.g. https://yoursite.com)", "author-box-by-nocksoft"); ?>" value="<?php echo esc_url($linkurl); ?>" /> 47 35 <p class="description"><?php echo __("This URL will be displayed below your biography in the Author Box.", "author-box-by-nocksoft"); ?></p> 48 36 </td> … … 61 49 } 62 50 else { 63 $nstab_setting_localavatar = isset($_POST["nstab_setting_localavatar"]) ? $_POST["nstab_setting_localavatar"] : false; 64 update_usermeta($user_id, "nstab_setting_localavatar", $nstab_setting_localavatar); 65 update_usermeta($user_id, "nstab_setting_avatarurl", trim($_POST["nstab_setting_avatarurl"])); 66 update_usermeta($user_id, "nstab_setting_authorposition", trim($_POST["nstab_setting_authorposition"])); 67 update_usermeta($user_id, "nstab_setting_homepage_linktext", trim($_POST["nstab_setting_homepage_linktext"])); 68 update_usermeta($user_id, "nstab_setting_homepage_linkurl", trim($_POST["nstab_setting_homepage_linkurl"])); 51 update_usermeta($user_id, "nstab_setting_authorposition", sanitize_text_field($_POST["nstab_setting_authorposition"])); 52 update_usermeta($user_id, "nstab_setting_homepage_linktext", sanitize_text_field($_POST["nstab_setting_homepage_linktext"])); 53 update_usermeta($user_id, "nstab_setting_homepage_linkurl", sanitize_url($_POST["nstab_setting_homepage_linkurl"])); 69 54 } 70 55 } -
author-box-by-nocksoft/trunk/php/setup.php
r2653204 r2782053 51 51 foreach ($users as $user) { 52 52 $id = $user->ID; 53 delete_user_meta($id, "nstab_setting_localavatar");54 delete_user_meta($id, "nstab_setting_avatarurl");55 53 delete_user_meta($id, "nstab_setting_authorposition"); 56 54 delete_user_meta($id, "nstab_setting_homepage_linktext"); -
author-box-by-nocksoft/trunk/readme.txt
r2653204 r2782053 1 1 === Author Box by Nocksoft === 2 2 Contributors: nocksoft 3 Tags: author box, author bio, author description, local avatars,about author, about me, author profile, author4 Stable tag: trunk3 Tags: author box, author bio, author description, about author, about me, author profile, author 4 Stable tag: 1.1.0 5 5 Requires at least: 5.3 6 Tested up to: 5.96 Tested up to: 6.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 12 12 13 13 == Description == 14 Adds a modern customizable author info box at the end of your posts and implements support for local avatars. You can display a simple author bio box in your posts and pages to show your readers and followers who you are.15 Your blog will become even more personal and authentic. This plugin is available in German and English language .14 Adds a modern customizable author info box at the end of your posts and pages with a short description about the author. You can display a simple author bio box in your posts and pages to show your readers and followers who you are. 15 Your blog will become even more personal and authentic. This plugin is available in German and English language and is fully compatible with the plugin "Local Avatars by Nocksoft". 16 16 17 17 == Features == 18 18 * Adds a simple lightweight Author Box at the end of your posts and/or pages with a short description about the author 19 * Adds support for local avatars for authors so that you dont need to use an Gravatar account20 19 * Option for displaying a link to an own "About Me Page" in Author Box for post authors 21 20 * Adds shortcode for Author Box so that you can insert a Author Box anywhere you want 22 21 * Allows to hide the author box of default WordPress theme 22 * Fully compatible with the plugin "Local Avatars by Nocksoft" 23 23 24 24 == Setup == … … 26 26 * (optional) Go to "Settings" -> "Author Box" to setup global settings like font sizes or other settings like look of avatars. 27 27 * Go to user profiles to enter biographical info. 28 * (optional) Go to user profiles to tick local avatars and enter a URL to you personal avatar.29 * (optional) Go to user profiles to enter other informations about the author.28 * (optional) Go to user profiles to enter some informations about the author. 29 * (optional) Go to Plugins and install the recommended plugin "Local Avatars by Nocksoft" to use local avatars. 30 30 31 31 == Shortcode == … … 34 34 == Frequently Asked Questions == 35 35 36 = How can I change the avatar for my user? =36 = How can I change the avatar for my author box? = 37 37 38 You have two options. Either through Gravatar, or you can specify a URL to a previously uploaded local image in your user profile settings. This setting can be made separately for each user.38 You have two options. Either through Gravatar, or you can use a local image in your user profile settings. This setting can be made separately for each user. But for this, you need to install the additional plugin "Local Avatars by Nocksoft" first. 39 39 40 40 = How can I change the biography about me? = … … 61 61 = What if my theme also shows an author box? = 62 62 63 You have t wo options. Either you choose the setting that this plugins author box is hidden (you can still take advantage of the local avatars) or you choose the setting that the author box of your theme is no longer displayed. For the WordPress default themes you will find a suitable setting in this plugins settings.63 You have to disable the author box of your theme. How to do this depends on your theme. But for the WordPress default themes you will find a suitable setting in this plugins settings. 64 64 65 65 == Installation == … … 72 72 73 73 == Changelog == 74 75 = 1.1.0 = 76 * Fixed PHP warnings "wp_register_style was called incorrectly" and "wp_enqueue_style was called incorrectly" 77 * Fixed a bug that may caused font family do not work properly in some cases 78 * Moved local avatars feature to a separate plugin "Local Avatars by Nocksoft" (https://wordpress.org/plugins/local-avatars-by-nocksoft/) 74 79 75 80 = 1.0.5 =
Note: See TracChangeset
for help on using the changeset viewer.