Plugin Directory

Changeset 3407480


Ignore:
Timestamp:
12/02/2025 03:13:39 AM (3 months ago)
Author:
jemdycommerce
Message:

Update version 2.0.0 - Migrate Tailwind v4 and change prefix to jw

Location:
jemdy-product-builder/trunk
Files:
7 added
6 edited

Legend:

Unmodified
Added
Removed
  • jemdy-product-builder/trunk/jemdy-product-builder.php

    r3390831 r3407480  
    88 * Text Domain:     jemdy-product-builder
    99 * Domain Path:     /languages
    10  * Version:         1.1.0
     10 * Version:         2.0.0
    1111 * License:           GPL v3 or later
    1212 * License URI:       https://www.gnu.org/licenses/gpl-3.0.html
     
    2121}
    2222
    23 define( 'JDPB_VERSION', '1.1.0' );
     23define( 'JDPB_VERSION', '2.0.0' );
    2424
    2525define( 'JDPB_PLUGIN_FILE', __FILE__ );
     
    2727define( 'JDPB_PLUGIN_URL', plugin_dir_url( JDPB_PLUGIN_FILE ) );
    2828define( 'JDPB_PLUGIN_BASENAME', plugin_basename( JDPB_PLUGIN_FILE ) );
     29define( 'JDPB_MENU_ORDER', 1 );
    2930define( 'JDPB_IS_DEVELOPMENT', false );
    3031
  • jemdy-product-builder/trunk/readme.txt

    r3390831 r3407480  
    77Tested up to: 6.8
    88Requires PHP: 7.4
    9 Stable tag: 1.1.0
     9Stable tag: 2.0.0
    1010License: GPLv3 or later
    1111License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    112112== Changelog ==
    113113
     114= 2.0.0 =
     115* NEW: Implemented native Tailwind CSS v4 architecture (CSS-first config) for better performance.
     116* FIX: Solved persistent CSS specificity conflicts in WP Admin by applying "Selector Strategy" (`#jdpb-apps` scoping) and removing conflicting WP form styles via PHP hook on the plugin page.
     117* TWEAK: Updated `tailwind-merge` configuration to correctly handle custom color conflicts (e.g., `text-foreground` vs `text-primary-foreground`).
     118* DEV: Converted all utility class usages from `jw-utility` to `jw:utility` namespace structure.
     119
    114120= 1.1.0 =
    115121
     
    185191
    186192Initial internal build and foundation (enqueue from Vite manifest, module preload, CSS auto-enqueue, i18n plumbing)
    187 
  • jemdy-product-builder/trunk/src/Engine/BuilderFormShortcode.php

    r3390831 r3407480  
    2323
    2424        return sprintf(
    25             '<div class="jdpb-root shortcode-jdpb-builder-form" data-id="%s" style="%s"></div>',
     25            '<div class="jdpb-root shortcode-jdpb-builder-form" data-id="%s" id="jdpb-apps" style="%s"></div>',
    2626            esc_attr( $id ),
    2727            esc_attr( $style )
  • jemdy-product-builder/trunk/src/Engine/Register/RegisterFacade.php

    r3390831 r3407480  
    4545
    4646    public function register_admin_scripts( $hook ) {
    47         if ( 'toplevel_page_jdpb' !== $hook ) {
     47        if ( 'jemdycommerce_page_jdpb' !== $hook ) {
    4848            return;
    4949        }
  • jemdy-product-builder/trunk/src/Engine/Register/RegisterProd.php

    r3390831 r3407480  
    2424    public function enqueue( $entry_file, $handle ) {
    2525        $deps          = [ 'wp-i18n', 'react', 'react-dom' ];
    26         $manifest_path = JDPB_PLUGIN_PATH . self::BUILD_PATH . 'manifest.json';
     26        $manifest_path = JDPB_PLUGIN_PATH . self::BUILD_PATH . '.vite/manifest.json';
    2727
    2828        if ( ! function_exists( 'WP_Filesystem' ) ) {
  • jemdy-product-builder/trunk/src/Engine/SettingsPage.php

    r3390831 r3407480  
    33
    44use JDPB\Service\ThemeTokensService;
    5 
     5use JDPB\Engine\Register\RegisterMenu;
    66use JDPB\Traits\Singleton;
    77
     
    1414    /** @var string|null */
    1515    private $page_suffix = null;
     16
     17    /** @var ThemeTokensService */
    1618    private $theme_tokens;
     19
     20     /** @var RegisterMenu */
     21     private $register_menu;
    1722
    1823    public const CAPABILITY = 'manage_options';
    1924    public const MENU_SLUG  = 'jdpb';
    20     public const POSITION   = 20;
    2125
    2226    protected function __construct() {
    23         $this->theme_tokens = ThemeTokensService::instance();
    24         add_action( 'admin_menu', [ $this, 'add_admin_menu' ] );
     27        $this->theme_tokens  = ThemeTokensService::instance();
     28        $this->register_menu = RegisterMenu::instance();
     29
     30        add_action( 'admin_menu', [ $this, 'register_page' ], 20 );
     31
    2532        add_filter( 'screen_options_show_screen', [ $this, 'hide_screen_options' ], 99, 2 );
    26 
    2733        add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_assets' ] );
    2834    }
    2935
    30     public function add_admin_menu() {
    31         $this->page_suffix = add_menu_page(
     36    public function register_page() {
     37        $this->page_suffix = $this->register_menu->add_submenu_page(
    3238            __( 'Jemdy Product Builder', 'jemdy-product-builder' ),
    33             __( 'Jemdy Builder', 'jemdy-product-builder' ),
     39            __( 'Jemdy Product Builder', 'jemdy-product-builder' ),
    3440            self::CAPABILITY,
    3541            self::MENU_SLUG,
    36             [ $this, 'render_menu_page' ],
    37             'dashicons-layout',
    38             self::POSITION
     42            [ $this, 'render_menu_page' ]
    3943        );
    4044    }
     
    4246    public function render_menu_page() {
    4347        $style = $this->theme_tokens->inline_style();
     48
    4449        printf(
    4550            '<div id="jdpb-apps" class="jdpb-root" style="%s"></div>',
     
    5257            return false;
    5358        }
     59
    5460        return $show_screen;
    5561    }
     
    6167
    6268        $handle = 'jdpb-admin-base';
     69
    6370        wp_register_style( $handle, false, [], JDPB_VERSION );
    6471        wp_enqueue_style( $handle );
     72
     73        $css = '
     74            #wpbody-content > .notice,
     75            #wpbody-content > .update-nag,
     76            #wpbody-content > .error,
     77            #wpbody-content > .updated,
     78            #wpbody-content > .notice-error,
     79            #wpbody-content > .notice-warning,
     80            #wpbody-content > .notice-info,
     81            #wpbody-content > .notice-success {
     82                display: none !important;
     83            }
     84        ';
     85
     86        wp_add_inline_style( $handle, $css );
    6587    }
    6688}
Note: See TracChangeset for help on using the changeset viewer.