Changeset 3152074
- Timestamp:
- 09/14/2024 11:22:02 PM (17 months ago)
- Location:
- db-website-settings
- Files:
-
- 15 added
- 3 edited
-
tags/2.7.2 (added)
-
tags/2.7.2/css (added)
-
tags/2.7.2/css/admin.css (added)
-
tags/2.7.2/css/admin.min.css (added)
-
tags/2.7.2/css/style.css (added)
-
tags/2.7.2/css/style.min.css (added)
-
tags/2.7.2/db-website-settings.php (added)
-
tags/2.7.2/img (added)
-
tags/2.7.2/img/icon.svg (added)
-
tags/2.7.2/inc (added)
-
tags/2.7.2/inc/admin.php (added)
-
tags/2.7.2/js (added)
-
tags/2.7.2/js/admin.js (added)
-
tags/2.7.2/js/admin.min.js (added)
-
tags/2.7.2/readme.txt (added)
-
trunk/db-website-settings.php (modified) (10 diffs)
-
trunk/inc/admin.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
db-website-settings/trunk/db-website-settings.php
r3094703 r3152074 4 4 Plugin URI: https://github.com/bisteinoff/db-website-settings 5 5 Description: The plugin is used for the basic website settings 6 Version: 2.7. 16 Version: 2.7.2 7 7 Author: Denis Bisteinov 8 8 Author URI: https://bisteinoff.com … … 31 31 if ( ! class_exists( 'DB_SETTINGS_WebsiteSettings' ) ) : 32 32 33 define( 'DB_WEBSITE_SETTINGS_PLUGIN_VERSION', '2.7.2' ); 34 33 35 class DB_SETTINGS_WebsiteSettings 34 36 … … 51 53 52 54 add_filter( 'plugin_action_links_' . $this->thisdir() . '/db-website-settings.php', array( &$this, 'db_settings_link' ) ); 53 add_action( 'admin_menu', array (&$this, 'admin') );55 add_action( 'admin_menu', array( &$this, 'admin' ) ); 54 56 55 57 add_action( 'admin_footer', function() { 56 wp_enqueue_style( $this->thisdir() . '-admin', plugin_dir_url( __FILE__ ) . 'css/admin.min.css' );57 wp_enqueue_script( $this->thisdir() . '-admin', plugin_dir_url( __FILE__ ) . 'js/admin.min.js', null, false, true );58 wp_enqueue_style( $this->thisdir() . '-admin', plugin_dir_url( __FILE__ ) . 'css/admin.min.css', [], DB_WEBSITE_SETTINGS_PLUGIN_VERSION, 'all' ); 59 wp_enqueue_script( $this->thisdir() . '-admin', plugin_dir_url( __FILE__ ) . 'js/admin.min.js', null, DB_WEBSITE_SETTINGS_PLUGIN_VERSION, true ); 58 60 }, 59 61 99 60 62 ); 61 63 62 wp_register_style( $this->thisdir(), plugin_dir_url( __FILE__ ) . 'css/style.min.css' );64 wp_register_style( $this->thisdir(), plugin_dir_url( __FILE__ ) . 'css/style.min.css', [], DB_WEBSITE_SETTINGS_PLUGIN_VERSION, 'all' ); 63 65 wp_enqueue_style( $this->thisdir() ); 64 66 … … 79 81 { 80 82 $ext = $i > 0 ? $i + 1 : ''; 83 $classes = "db-wcs-contact db-wcs-contact-phone db-wcs-contact-phone-{$i}"; 81 84 82 85 // Phone Plain Text 83 add_shortcode( 'db-phone' . esc_html( sanitize_text_field( $ext ) ), function() use ( $option ) {84 return wp_kses_post( $option);86 add_shortcode( 'db-phone' . esc_html( sanitize_text_field( $ext ) ), function() use ( $option, $classes ) { 87 return wp_kses_post( "<span class=\"{$classes}\">{$option}</span>" ); 85 88 }); 86 89 87 90 // Phone As Link 88 add_shortcode( 'db-phone' . esc_html( sanitize_text_field( $ext ) ) . '-link', function() use ( $option, $ db_remove_chars, $i ) {91 add_shortcode( 'db-phone' . esc_html( sanitize_text_field( $ext ) ) . '-link', function() use ( $option, $classes, $db_remove_chars, $i ) { 89 92 $link = str_replace( 90 93 $db_remove_chars, … … 92 95 $option 93 96 ); 94 return wp_kses_post( "<a href=\"tel:{$link}\" class=\" db-wcs-contact db-wcs-contact-phone db-wcs-contact-phone-{$i}\">{$option}</a>" );97 return wp_kses_post( "<a href=\"tel:{$link}\" class=\"{$classes}\">{$option}</a>" ); 95 98 }); 96 99 … … 164 167 { 165 168 $ext = $i > 0 ? $i + 1 : ''; 169 $classes = "db-wcs-contact db-wcs-contact-email db-wcs-contact-email-{$i}"; 166 170 167 171 // E-mail Plain Text 168 add_shortcode( 'db-email' . esc_html( sanitize_text_field( $ext ) ), function() use ( $option ) {169 return wp_kses_post( $option);172 add_shortcode( 'db-email' . esc_html( sanitize_text_field( $ext ) ), function() use ( $option, $classes ) { 173 return wp_kses_post( "<span class=\"{$classes}\">{$option}</span>" ); 170 174 }); 171 175 172 176 // E-mail As Link 173 add_shortcode( 'db-email' . esc_html( sanitize_text_field( $ext ) ) . '-link', function() use ( $option, $ i ) {174 return wp_kses_post( "<a href=\"mailto:{$option}\" class=\" db-wcs-contact db-wcs-contact-email db-wcs-contact-email-{$i}\">{$option}</a>" );177 add_shortcode( 'db-email' . esc_html( sanitize_text_field( $ext ) ) . '-link', function() use ( $option, $classes, $i ) { 178 return wp_kses_post( "<a href=\"mailto:{$option}\" class=\"{$classes}\">{$option}</a>" ); 175 179 }); 176 180 … … 186 190 function whatsapp( $whatsapp, $type, $i ) { 187 191 192 $classes = "db-wcs-contact db-wcs-contact-whatsapp db-wcs-contact-whatsapp-{$i}"; 193 188 194 switch ( $type ) { 189 195 190 196 case "text" : 191 $html = $whatsapp;197 $html = "<span class=\"{$classes}\">{$whatsapp}</span>"; 192 198 break; 193 199 … … 203 209 case "link" : 204 210 $link = $this->whatsapp( $whatsapp, "href", $i ); 205 $html = "<a href=\"{$link}\" class=\" db-wcs-contact db-wcs-contact-whatsapp db-wcs-contact-whatsapp-{$i}\">{$whatsapp}</a>";211 $html = "<a href=\"{$link}\" class=\"{$classes}\">{$whatsapp}</a>"; 206 212 break; 207 213 … … 214 220 function telegram( $telegram, $type, $i ) { 215 221 222 $classes = "db-wcs-contact db-wcs-contact-telegram db-wcs-contact-telegram-{$i}"; 223 216 224 switch ( $type ) { 217 225 218 226 case "text" : 219 $html = " @{$telegram}";227 $html = "<span class=\"{$classes}\">@{$telegram}</span>"; 220 228 break; 221 229 … … 226 234 case "link" : 227 235 $link = $this->telegram( $telegram, "href", $i ); 228 $html = "<a href=\"{$link}\" class=\" db-wcs-contact db-wcs-contact-telegram db-wcs-contact-telegram-{$i}\">@{$telegram}</a>";236 $html = "<a href=\"{$link}\" class=\"{$classes}\">@{$telegram}</a>"; 229 237 break; 230 238 -
db-website-settings/trunk/inc/admin.php
r3094676 r3152074 4 4 5 5 $baseObj = new DB_SETTINGS_WebsiteSettings(); 6 $d = $baseObj->thisdir(); // domain for translate.wordpress.org6 $d = $baseObj->thisdir(); 7 7 8 8 // multisite compatibility … … 58 58 59 59 $i = 0; 60 while ( $option = esc_html( sanitize_email ( get_option( 'db_settings_email_' . $i ) ) ) )60 while ( $option = esc_html( sanitize_email( get_option( 'db_settings_email_' . $i ) ) ) ) 61 61 { 62 62 $db_settings_email[ $i ] = $option; … … 66 66 67 67 // form submit 68 if ( isset ( $_POST[ 'submit'] ) &&69 isset( $_POST[ $d . '_nonce' ] ) &&70 wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST[ $d . '_nonce' ] ) ), sanitize_text_field( $d ) ) )68 if ( isset ( $_POST[ 'submit' ] ) && 69 isset( $_POST[ $d . '_nonce' ] ) && 70 wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST[ $d . '_nonce' ] ) ), sanitize_text_field( $d ) ) ) 71 71 { 72 72 -
db-website-settings/trunk/readme.txt
r3094704 r3152074 4 4 Tags: shortcodes, phone, whatsapp, telegram, email 5 5 Requires at least: 4.6 6 Tested up to: 6. 57 Stable tag: 2.7 6 Tested up to: 6.6 7 Stable tag: 2.7.2 8 8 License: GPL2 9 9 10 The plugin is used for the basic website settings 10 The plugin is used for the basic website settings. 11 11 12 12 == Description == 13 13 14 DB Website Settings is an easy solution to make basic settings on your website 14 DB Website Settings is an easy solution to make basic settings on your website. 15 15 16 16 == Installation == 17 17 18 1. Upload db- tagcloudfolder to the `/wp-content/plugins/` directory18 1. Upload db-website-settings folder to the `/wp-content/plugins/` directory 19 19 2. Activate the plugin through the 'Plugins' menu in WordPress 20 20 3. Enjoy
Note: See TracChangeset
for help on using the changeset viewer.