Skip to content

Commit

Permalink
Merge pull request #189 from rupok/development
Browse files Browse the repository at this point in the history
update to v2.9.7
  • Loading branch information
rupok authored Feb 25, 2019
2 parents 0a7b60a + 367b046 commit 3b79314
Show file tree
Hide file tree
Showing 21 changed files with 3,204 additions and 1,208 deletions.
2 changes: 1 addition & 1 deletion admin/assets/images/wpsp-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 11 additions & 4 deletions admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ class Eael_Admin_Settings {
public function __construct() {

add_action( 'admin_menu', array( $this, 'create_eael_admin_menu' ), 600 );
add_action( 'init', array( $this, 'enqueue_eael_admin_scripts' ) );

// add_action( 'init', array( $this, 'enqueue_eael_admin_scripts' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_eael_admin_scripts' ) );

add_action( 'wp_ajax_save_settings_with_ajax', array( $this, 'eael_save_settings_with_ajax' ) );
add_action( 'wp_ajax_add_action_with_ajax', array( $this, 'add_action_with_ajax' ) );

Expand Down Expand Up @@ -93,10 +96,14 @@ public function add_action_with_ajax(){
* @return void
* @since 1.1.2
*/
public function enqueue_eael_admin_scripts() {

public function enqueue_eael_admin_scripts( $hook ) {
wp_enqueue_style( 'essential_addons_elementor-notice-css', plugins_url( '/', __FILE__ ).'assets/css/eael-notice.css' );
if( isset( $_GET['page'] ) && $_GET['page'] == 'eael-settings' ) {
if( isset( $hook ) && $hook == 'plugins.php' ) {
wp_enqueue_style( 'essential_addons_elementor-sweetalert2-css', plugins_url( '/', __FILE__ ).'assets/vendor/sweetalert2/css/sweetalert2.min.css' );
wp_enqueue_script( 'essential_addons_core-js', plugins_url( '/', __FILE__ ).'assets/vendor/sweetalert2/js/core.js', array( 'jquery' ), '1.0', true );
wp_enqueue_script( 'essential_addons_sweetalert2-js', plugins_url( '/', __FILE__ ).'assets/vendor/sweetalert2/js/sweetalert2.min.js', array( 'jquery', 'essential_addons_core-js' ), '1.0', true );
}
if( isset( $hook ) && $hook == 'elementor_page_eael-settings' ) {
wp_enqueue_style( 'essential_addons_elementor-admin-css', plugins_url( '/', __FILE__ ).'assets/css/admin.css' );
wp_enqueue_style( 'essential_addons_elementor-sweetalert2-css', plugins_url( '/', __FILE__ ).'assets/vendor/sweetalert2/css/sweetalert2.min.css' );
wp_enqueue_script( 'essential_addons_elementor-admin-js', plugins_url( '/', __FILE__ ).'assets/js/admin.js', array( 'jquery'), '1.0', true );
Expand Down
Loading

0 comments on commit 3b79314

Please sign in to comment.