Plugin Directory

Changeset 3764903


Ignore:
Timestamp:
10/25/2026 04:16:08 PM (4 hours ago)
Author:
asheikh0
Message:

Release 2.0.10: Comply with WordPress.org naming and active plugin guidelines and resolve Plugin Check items

Location:
sahldesk
Files:
243 added
4 edited

Legend:

Unmodified
Added
Removed
  • sahldesk/trunk/readme.txt

    r3763780 r3764903  
    1 === SahlDesk – WhatsApp COD Order Confirmation, Abandoned Cart & AI Helpdesk for WooCommerce ===
     1=== SahlDesk – COD Order Confirmation, Cart Recovery & AI Helpdesk for WooCommerce ===
    22Contributors: asheikh0
    33Donate link: https://sahldesk.com
    … …  
    55Requires at least: 5.9
    66Tested up to: 7.1
    7 Stable tag: 2.0.8
     7Stable tag: 2.0.10
    88Requires PHP: 7.4
    99License: GPLv2 or later
    … …  
    9797== Changelog ==
    9898
     99= 2.0.10 =
     100* Compliance: Removed remote asset offloading URLs to comply with WordPress.org OffloadedContent guidelines.
     101* Compliance: Added translator comment above _n_noop string to satisfy WordPress.org i18n requirements.
     102
     103= 2.0.9 =
     104* Compliance: Updated plugin display name to comply with WordPress.org trademark guidelines.
     105* Compliance: Removed programmatic plugin deactivation call in accordance with WordPress.org directory guidelines.
     106
    99107= 2.0.8 =
    100108* Compliance: Removed all display icon and banner assets from the plugin distribution directory to comply with WordPress.org SVN asset repository guidelines.
    101 * Enhancement: Switched Freemius and WordPress dashboard update screen icons and banners to consume official WordPress.org SVN CDN assets (ps.w.org) dynamically.
     109* Enhancement: Switched Freemius and WordPress dashboard update screen icons and banners to consume official WordPress.org SVN CDN assets dynamically.
    102110
    103111= 2.0.7 =
  • sahldesk/trunk/sahldesk.php

    r3763780 r3764903  
    22
    33/**
    4  * Plugin Name: SahlDesk
     4 * Plugin Name: SahlDesk – COD Order Confirmation, Cart Recovery & AI Helpdesk for WooCommerce
    55 * Plugin URI: https://wordpress.org/plugins/sahldesk/
    66 * Description: The complete ticketing system, help desk, AI inbox, and customer support solution.
    7  * Version: 2.0.8
     7 * Version: 2.0.10
    88 * Author: SahlDesk
    99 * Author URI: https://sahldesk.com
    … …  
    2222// Freemius Dual-Build Lifecycle Handler
    2323// -----------------------------------------------------------------------------
     24$sahldesk_is_premium = false;
     25/* @fs_premium_only */
     26$sahldesk_is_premium = true;
     27/* @fs_end_premium_only */
    2428if ( function_exists( 'sahldesk_fs' ) ) {
    25     sahldesk_fs()->set_basename( false, __FILE__ );
     29    sahldesk_fs()->set_basename( $sahldesk_is_premium, __FILE__ );
    2630    return;
    27 } else {
    28     // If Pro is booting and Free sibling is active in WordPress, deactivate Free cleanly
    29     if ( function_exists( 'is_plugin_active' ) || file_exists( ABSPATH . 'wp-admin/includes/plugin.php' ) ) {
    30         if ( !function_exists( 'is_plugin_active' ) ) {
    31             require_once ABSPATH . 'wp-admin/includes/plugin.php';
    32         }
    33         if ( plugin_basename( __FILE__ ) !== 'sahldesk/sahldesk.php' && is_plugin_active( 'sahldesk/sahldesk.php' ) ) {
    34             deactivate_plugins( 'sahldesk/sahldesk.php', true );
    35         }
    36     }
    37     // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE DUAL-CODE LOAD HANDLING.
    38     if ( !function_exists( 'sahldesk_fs' ) ) {
    39         function sahldesk_fs() {
    40             global $sahldesk_fs;
    41             if ( !isset( $sahldesk_fs ) ) {
    42                 require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';
    43                 $sahldesk_fs = fs_dynamic_init( array(
    44                     'id'               => '23268',
    45                     'slug'             => 'sahldesk',
    46                     'type'             => 'plugin',
    47                     'public_key'       => 'pk_22da665e521f5fdea813737e64420',
    48                     'is_premium'       => false,
    49                     'is_premium_only'  => false,
    50                     'has_addons'       => false,
    51                     'has_paid_plans'   => true,
    52                     'is_org_compliant' => true,
    53                     'menu'             => array(
    54                         'slug'       => 'sahldesk_settings_page',
    55                         'first-path' => 'admin.php?page=sahldesk_settings_page',
    56                         'support'    => false,
    57                         'contact'    => false,
    58                         'parent'     => array(
    59                             'slug' => 'sahldesk_settings_page',
    60                         ),
     31}
     32// DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE DUAL-CODE LOAD HANDLING.
     33if ( !function_exists( 'sahldesk_fs' ) ) {
     34    function sahldesk_fs() {
     35        global $sahldesk_fs;
     36        if ( !isset( $sahldesk_fs ) ) {
     37            require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';
     38            $sahldesk_fs = fs_dynamic_init( array(
     39                'id'               => '23268',
     40                'slug'             => 'sahldesk',
     41                'type'             => 'plugin',
     42                'public_key'       => 'pk_22da665e521f5fdea813737e64420',
     43                'is_premium'       => false,
     44                'is_premium_only'  => false,
     45                'has_addons'       => false,
     46                'has_paid_plans'   => true,
     47                'is_org_compliant' => true,
     48                'menu'             => array(
     49                    'slug'       => 'sahldesk_settings_page',
     50                    'first-path' => 'admin.php?page=sahldesk_settings_page',
     51                    'support'    => false,
     52                    'contact'    => false,
     53                    'parent'     => array(
     54                        'slug' => 'sahldesk_settings_page',
    6155                    ),
    62                     'is_live'          => true,
    63                 ) );
    64             }
    65             return $sahldesk_fs;
    66         }
    67 
    68         // Init Freemius.
    69         sahldesk_fs();
    70         do_action( 'sahldesk_fs_loaded' );
    71         // Hide native Pricing, Contact Us, Support, and hide Account page if Free
    72         sahldesk_fs()->add_filter( 'is_pricing_page_visible', '__return_false' );
    73         sahldesk_fs()->add_filter(
    74             'is_submenu_visible',
    75             function ( $is_visible, $submenu_id ) {
    76                 if ( in_array( $submenu_id, array(
    77                     'pricing',
    78                     'contact',
    79                     'support',
    80                     'contact-us'
    81                 ), true ) ) {
    82                     return false;
    83                 }
    84                 if ( 'account' === $submenu_id && !sahldesk_fs()->can_use_premium_code() ) {
    85                     return false;
    86                 }
    87                 return $is_visible;
    88             },
    89             10,
    90             2
    91         );
    92         // Pass current WordPress admin locale and language to Freemius checkout
    93         sahldesk_fs()->add_filter( 'checkout_url', function ( $url ) {
    94             $user_locale = ( function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale() );
    95             $checkout_lang = ( 0 === strpos( $user_locale, 'ar' ) ? 'ar' : 'en' );
    96             return add_query_arg( array(
    97                 'locale'   => $checkout_lang,
    98                 'language' => $checkout_lang,
    99             ), $url );
    100         } );
    101         // Official WordPress.org CDN icon for Freemius notices and update displays
    102         sahldesk_fs()->add_filter( 'plugin_icon', function () {
    103             return 'https://ps.w.org/sahldesk/assets/icon-256x256.png';
    104         } );
    105         do_action( 'sahldesk_fs_loaded' );
    106     }
     56                ),
     57                'is_live'          => true,
     58            ) );
     59        }
     60        return $sahldesk_fs;
     61    }
     62
     63    // Init Freemius.
     64    sahldesk_fs();
     65    do_action( 'sahldesk_fs_loaded' );
     66    // Hide native Pricing, Contact Us, Support, and hide Account page if Free
     67    sahldesk_fs()->add_filter( 'is_pricing_page_visible', '__return_false' );
     68    sahldesk_fs()->add_filter(
     69        'is_submenu_visible',
     70        function ( $is_visible, $submenu_id ) {
     71            if ( in_array( $submenu_id, array(
     72                'pricing',
     73                'contact',
     74                'support',
     75                'contact-us'
     76            ), true ) ) {
     77                return false;
     78            }
     79            if ( 'account' === $submenu_id && !sahldesk_fs()->can_use_premium_code() ) {
     80                return false;
     81            }
     82            return $is_visible;
     83        },
     84        10,
     85        2
     86    );
     87    // Pass current WordPress admin locale and language to Freemius checkout
     88    sahldesk_fs()->add_filter( 'checkout_url', function ( $url ) {
     89        $user_locale = ( function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale() );
     90        $checkout_lang = ( 0 === strpos( $user_locale, 'ar' ) ? 'ar' : 'en' );
     91        return add_query_arg( array(
     92            'locale'  => $checkout_lang,
     93            'language' => $checkout_lang,
     94        ), $url );
     95    } );
     96    // Branded icon for Freemius notices and update displays
     97    sahldesk_fs()->add_filter( 'plugin_icon', function () {
     98        return dirname( __FILE__ ) . '/vendor/freemius/assets/img/plugin-icon.png';
     99    } );
     100    do_action( 'sahldesk_fs_loaded' );
    107101}
    108102// -----------------------------------------------------------------------------
    … …  
    110104// -----------------------------------------------------------------------------
    111105if ( !defined( 'SAHLDESK_PLUGIN_VERSION' ) ) {
    112     define( 'SAHLDESK_PLUGIN_VERSION', '2.0.8' );
     106    define( 'SAHLDESK_PLUGIN_VERSION', '2.0.10' );
    113107}
    114108if ( !defined( 'SAHLDESK_VERSION' ) ) {
    115     define( 'SAHLDESK_VERSION', '2.0.8' );
     109    define( 'SAHLDESK_VERSION', '2.0.10' );
    116110}
    117111if ( !defined( 'SAHLDESK_PLUGIN_DIR' ) ) {
    … …  
    431425            'read' => true,
    432426        ) );
    433         if ( !function_exists( 'is_plugin_active' ) ) {
    434             require_once ABSPATH . 'wp-admin/includes/plugin.php';
    435         }
    436         // Deactivate free sibling if active
    437         if ( is_plugin_active( 'sahldesk/sahldesk.php' ) && plugin_basename( __FILE__ ) !== 'sahldesk/sahldesk.php' ) {
    438             deactivate_plugins( 'sahldesk/sahldesk.php', true );
    439         }
    440427    }
    441428
    … …  
    24772464if ( !function_exists( 'sahldesk_register_out_for_delivery_status' ) ) {
    24782465    function sahldesk_register_out_for_delivery_status() {
     2466        /* translators: %s: number of orders */
     2467        $label_count = _n_noop( 'Out for delivery <span class="count">(%s)</span>', 'Out for delivery <span class="count">(%s)</span>', 'sahldesk' );
    24792468        register_post_status( 'wc-out-for-delivery', array(
    24802469            'label'                     => 'خرج للتوصيل / مع المندوب',
    … …  
    24832472            'show_in_admin_all_list'    => true,
    24842473            'show_in_admin_status_list' => true,
    2485             'label_count'               => _n_noop( 'Out for delivery <span class="count">(%s)</span>', 'Out for delivery <span class="count">(%s)</span>', 'sahldesk' ),
     2474            'label_count'               => $label_count,
    24862475        ) );
    24872476    }
  • sahldesk/trunk/vendor/freemius/includes/class-freemius.php

    r3763780 r3764903  
    2558025580
    2558125581            if ( is_string( $local_path ) ) {
    25582                 if ( 0 === strpos( $local_path, 'http://' ) || 0 === strpos( $local_path, 'https://' ) ) {
    25583                     return $local_path;
    25584                 }
    2558525582                $icons = array( $local_path );
    2558625583            } else {
    … …  
    2569025687
    2569125688                        if ( ! $icon_found ) {
    25692                             if ( $this->is_plugin() && $this->is_org_repo_compliant() ) {
    25693                                 return 'https://ps.w.org/' . $this->_slug . '/assets/icon-256x256.png';
    25694                             }
    25695 
    2569625689                            // No icons found, fallback to default icon.
    2569725690                            if ( $have_write_permissions ) {
  • sahldesk/trunk/vendor/freemius/includes/class-fs-plugin-updater.php

    r3763780 r3764903  
    712712            $icon = $this->_fs->get_local_icon_url();
    713713
    714             $slug          = $this->_fs->get_slug();
    715             $wporg_icon_1x = 'https://ps.w.org/' . $slug . '/assets/icon-128x128.png';
    716             $wporg_icon_2x = 'https://ps.w.org/' . $slug . '/assets/icon-256x256.png';
    717 
    718             $has_valid_custom_icon = ( ! empty( $icon ) && false === strpos( $icon, 'plugin-icon.png' ) );
    719 
    720             $update->icons = array(
    721                 '1x'      => $has_valid_custom_icon ? $icon : $wporg_icon_1x,
    722                 '2x'      => $has_valid_custom_icon ? $icon : $wporg_icon_2x,
    723                 'default' => $has_valid_custom_icon ? $icon : $wporg_icon_2x,
    724             );
    725 
    726             $update->banners = array(
    727                 '1x'      => 'https://ps.w.org/' . $slug . '/assets/banner-772x250.png',
    728                 '2x'      => 'https://ps.w.org/' . $slug . '/assets/banner-1544x500.png',
    729                 'default' => 'https://ps.w.org/' . $slug . '/assets/banner-772x250.png',
    730             );
     714            if ( ! empty( $icon ) ) {
     715                $update->icons = array(
     716                    '1x'      => $icon,
     717                    '2x'      => $icon,
     718                    'default' => $icon,
     719                );
     720            }
    731721
    732722            if ( $this->_fs->is_premium() && ! empty( $new_version->upgrade_notice ) ) {
Note: See TracChangeset for help on using the changeset viewer.