enqueue reply script on front end
This commit is contained in:
parent
f018432033
commit
a78a581b41
1 changed files with 7 additions and 0 deletions
|
@ -18,6 +18,7 @@ class Admin {
|
|||
\add_action( 'admin_init', array( self::class, 'register_settings' ) );
|
||||
\add_action( 'personal_options_update', array( self::class, 'save_user_description' ) );
|
||||
\add_action( 'admin_enqueue_scripts', array( self::class, 'enqueue_scripts' ) );
|
||||
\add_action( 'wp_enqueue_scripts', array( self::class, 'comment_enqueue_scripts' ) );
|
||||
\add_filter( 'comment_row_actions', array( self::class, 'reply_comments_actions' ), 10, 2 );
|
||||
|
||||
if ( ! is_user_disabled( get_current_user_id() ) ) {
|
||||
|
@ -298,4 +299,10 @@ class Admin {
|
|||
wp_enqueue_script( 'activitypub-reply', plugins_url( 'assets/js/activitypub-reply.js', ACTIVITYPUB_PLUGIN_FILE ), array( 'jquery' ), '1.0.0', false );
|
||||
}
|
||||
}
|
||||
|
||||
public static function comment_enqueue_scripts() {
|
||||
if ( is_singular() ) {
|
||||
wp_enqueue_script( 'activitypub-reply', plugins_url( 'assets/js/activitypub-reply.js', ACTIVITYPUB_PLUGIN_FILE ), array( 'jquery' ), '1.0.0', false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue