Plugin Directory

Changeset 2339669


Ignore:
Timestamp:
07/13/2020 12:08:38 PM (6 years ago)
Author:
pieter91
Message:

Loads the register blocks script only at post page. Added icon

Location:
light-lms-quizz
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • light-lms-quizz/trunk/ligth-lms-quizz.php

    r2330625 r2339669  
    4949    }
    5050
    51     public function enqueue_admin_scripts(){
     51    public function enqueue_admin_scripts( $pageHook ){
    5252
    5353        wp_enqueue_style( 'admin_css_bar', plugin_dir_url( __FILE__ ) . '/css/light-lms-quizz.css', false, '1.0.0' );
     
    6262        );
    6363
    64         wp_enqueue_script( 'light_lms_js', plugin_dir_url( __FILE__ ) . '/blocks/register_blocks.js', $required_js_files );
     64        if( $pageHook == 'post.php'){
    6565
    66         wp_set_script_translations( 'light_lms_js', 'light-lms-quizz' );
     66            wp_enqueue_script( 'light_lms_js', plugin_dir_url( __FILE__ ) . '/blocks/register_blocks.js', $required_js_files );
     67
     68            wp_set_script_translations( 'light_lms_js', 'light-lms-quizz' );
     69
     70        }
    6771
    6872    }
  • light-lms-quizz/trunk/readme.txt

    r2330625 r2339669  
    44Tags: multiple choice questions, multiple choice, quizz, LMS
    55Requires at least: 5.1
    6 Tested up to: 5.1
     6Tested up to: 5.4
    77Requires PHP: 5.0
    8 Stable tag: 1.0
     8Stable tag: 1.1
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.