Plugin Directory

Changeset 3152074


Ignore:
Timestamp:
09/14/2024 11:22:02 PM (17 months ago)
Author:
bisteinoff
Message:

2.7.2. RTL classes

Location:
db-website-settings
Files:
15 added
3 edited

Legend:

Unmodified
Added
Removed
  • db-website-settings/trunk/db-website-settings.php

    r3094703 r3152074  
    44Plugin URI: https://github.com/bisteinoff/db-website-settings
    55Description: The plugin is used for the basic website settings
    6 Version: 2.7.1
     6Version: 2.7.2
    77Author: Denis Bisteinov
    88Author URI: https://bisteinoff.com
     
    3131if ( ! class_exists( 'DB_SETTINGS_WebsiteSettings' ) ) :
    3232
     33    define( 'DB_WEBSITE_SETTINGS_PLUGIN_VERSION', '2.7.2' );
     34
    3335    class DB_SETTINGS_WebsiteSettings
    3436
     
    5153
    5254            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' ) );
    5456
    5557            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 );
    5860                        },
    5961                        99
    6062            );
    6163
    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' );
    6365            wp_enqueue_style( $this->thisdir() );
    6466
     
    7981                {
    8082                    $ext = $i > 0 ? $i + 1 : '';
     83                    $classes = "db-wcs-contact db-wcs-contact-phone db-wcs-contact-phone-{$i}";
    8184
    8285                    // 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>" );
    8588                    });
    8689
    8790                    // 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 ) {
    8992                        $link = str_replace(
    9093                            $db_remove_chars,
     
    9295                            $option
    9396                        );
    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>" );
    9598                    });
    9699
     
    164167                {
    165168                    $ext = $i > 0 ? $i + 1 : '';
     169                    $classes = "db-wcs-contact db-wcs-contact-email db-wcs-contact-email-{$i}";
    166170
    167171                    // 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>" );
    170174                    });
    171175
    172176                    // 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>" );
    175179                    });
    176180
     
    186190        function whatsapp( $whatsapp, $type, $i ) {
    187191
     192            $classes = "db-wcs-contact db-wcs-contact-whatsapp db-wcs-contact-whatsapp-{$i}";
     193
    188194            switch ( $type ) {
    189195
    190196                case "text" :
    191                     $html = $whatsapp;
     197                    $html = "<span class=\"{$classes}\">{$whatsapp}</span>";
    192198                    break;
    193199
     
    203209                case "link" :
    204210                    $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>";
    206212                    break;
    207213
     
    214220        function telegram( $telegram, $type, $i ) {
    215221
     222            $classes = "db-wcs-contact db-wcs-contact-telegram db-wcs-contact-telegram-{$i}";
     223
    216224            switch ( $type ) {
    217225
    218226                case "text" :
    219                     $html = "@{$telegram}";
     227                    $html = "<span class=\"{$classes}\">@{$telegram}</span>";
    220228                    break;
    221229
     
    226234                case "link" :
    227235                    $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>";
    229237                    break;
    230238
  • db-website-settings/trunk/inc/admin.php

    r3094676 r3152074  
    44
    55    $baseObj = new DB_SETTINGS_WebsiteSettings();
    6     $d = $baseObj->thisdir(); // domain for translate.wordpress.org
     6    $d = $baseObj->thisdir();
    77
    88    // multisite compatibility
     
    5858
    5959    $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 ) ) ) )
    6161    {
    6262        $db_settings_email[ $i ] = $option;
     
    6666
    6767    // 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 ) ) )
    7171    {
    7272
  • db-website-settings/trunk/readme.txt

    r3094704 r3152074  
    44Tags: shortcodes, phone, whatsapp, telegram, email
    55Requires at least: 4.6
    6 Tested up to: 6.5
    7 Stable tag: 2.7
     6Tested up to: 6.6
     7Stable tag: 2.7.2
    88License: GPL2
    99
    10 The plugin is used for the basic website settings
     10The plugin is used for the basic website settings.
    1111
    1212== Description ==
    1313
    14 DB Website Settings is an easy solution to make basic settings on your website
     14DB Website Settings is an easy solution to make basic settings on your website.
    1515
    1616== Installation ==
    1717
    18 1. Upload db-tagcloud folder to the `/wp-content/plugins/` directory
     181. Upload db-website-settings folder to the `/wp-content/plugins/` directory
    19192. Activate the plugin through the 'Plugins' menu in WordPress
    20203. Enjoy
Note: See TracChangeset for help on using the changeset viewer.