11. 1 Xây dựng chức năn kéo thả clone (ok)

C:\xampp\htdocs\test\wp-content\plugins\plugin-name\admin\class-wpf-admin_ct.php

public function enqueue_scripts($hook) {
    $screen = get_current_screen();
    if ($screen->id != 'customize') {
      $plugin_dir = plugin_dir_url(__FILE__);
      wp_register_script($this->plugin_name, $plugin_dir . 'js/wpf-admin_ct.js', array('jquery'), $this->version, false);
      wp_enqueue_script($this->plugin_name);
      wp_enqueue_style($this->plugin_name, $plugin_dir . 'css/wpf-themplate.css', array(), $this->version, 'all');
      wp_enqueue_script($this->plugin_name.'-template', $plugin_dir . 'js/wpf-themplate_ct.js', array('jquery'), $this->version, false);
      wp_enqueue_script('jquery-ui-core');
      // wp_enqueue_script('jquery-ui-sortable');
      wp_enqueue_script('jquery-ui-draggable');
      wp_enqueue_script('jquery-ui-droppable');
    }
  }

C:\xampp\htdocs\test\wp-content\plugins\plugin-name\admin\js\wpf-themplate_ct.js

C:\xampp\htdocs\test\wp-content\plugins\plugin-name\includes\class-wpf-form_ct.php

Last updated

Was this helpful?