Update enqueue scripts
This commit is contained in:
parent
0525645f7c
commit
e46137a970
1 changed files with 1 additions and 11 deletions
|
@ -184,19 +184,9 @@ class Admin {
|
|||
}
|
||||
|
||||
public static function enqueue_scripts( $hook_suffix ) {
|
||||
if ( false !== strpos( $hook_suffix, 'activitypub' ) ) {
|
||||
if ( false !== strpos( $hook_suffix, 'activitypub' ) || ( 'edit-comments.php' === $hook_suffix ) ) {
|
||||
wp_enqueue_style( 'activitypub-admin-styles', plugins_url( 'assets/css/activitypub-admin.css', ACTIVITYPUB_PLUGIN_FILE ), array(), '1.0.0' );
|
||||
wp_enqueue_script( 'activitypub-admin-styles', plugins_url( 'assets/js/activitypub-admin.js', ACTIVITYPUB_PLUGIN_FILE ), array( 'jquery' ), '1.0.0', false );
|
||||
}
|
||||
|
||||
if ( 'edit-comments.php' === $hook_suffix ) {
|
||||
\wp_enqueue_script(
|
||||
'activitypub_actions',
|
||||
\plugin_dir_url( ACTIVITYPUB_PLUGIN ) . '/assets/js/activitypub-admin.js',
|
||||
array( 'jquery' ),
|
||||
\filemtime( \plugin_dir_path( ACTIVITYPUB_PLUGIN ) . 'assets/js/activitypub-admin.js' ),
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue