Skip to content

Commit

Permalink
move editor to client #2167 I might back out of this, balrickTriggers…
Browse files Browse the repository at this point in the history
… do not work yet
  • Loading branch information
Josh Pollock committed Apr 18, 2018
1 parent 6792fc6 commit 829d23b
Show file tree
Hide file tree
Showing 6 changed files with 2,703 additions and 3 deletions.
10 changes: 9 additions & 1 deletion classes/admin/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ public static function admin_common(){
wp_localize_script( self::slug( 'admin' ), 'CF_ADMIN', $data );

self::enqueue_style( 'modal' );
self::enqueue_script( 'admin' );
$slug = self::slug('admin' );
if (!Caldera_Forms_Admin::is_edit() ) {
self::enqueue_script('admin');
} else {
$slug = self::slug('editor' );
}

wp_localize_script( $slug, 'CF_ADMIN', $data );

Caldera_Forms_Render_Assets::enqueue_style( 'field' );

self::enqueue_script( 'baldrick' );
Expand Down
2 changes: 1 addition & 1 deletion classes/render/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ public static function make_url( $name, $script = true ){
* @return bool
*/
public static function is_client_entry_point( $slug ){
return in_array( $slug, array( 'blocks', 'pro' ) );
return in_array( $slug, array( 'blocks', 'pro', 'editor' ) );
}

/**
Expand Down
Loading

0 comments on commit 829d23b

Please sign in to comment.