Plugin Directory

Changeset 1963446


Ignore:
Timestamp:
10/26/2018 10:34:51 AM (7 years ago)
Author:
herregroen
Message:

Adds a JavaScript file for testing.

Location:
nothing-much/trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • nothing-much/trunk/nothing-much.php

    r1648472 r1963446  
    1414        add_action( 'admin_init', array( $this, 'load_textdomain' ) );
    1515        add_action( 'admin_notices', array( $this, 'admin_notices' ) );
     16        add_action( 'wp_enqueue_scripts', array( $this, 'admin_enqueue_script' ) );
    1617    }
    1718
     
    2526            . '</div>';
    2627    }
     28
     29    public function enqueue_script() {
     30        wp_enqueue_script( 'nothing-much-script', plugins_url( '/js/newscript.js' , __FILE__ ) );
     31
     32        if ( function_exists( 'wp_set_script_translations' ) ) {
     33            wp_set_script_translations( 'nothing-much-script', 'nothing-much' );
     34        }
     35    }
    2736}
    2837
Note: See TracChangeset for help on using the changeset viewer.