| @@ -80,16 +80,11 @@ | ||
| 80 | 80 | */ |
| 81 | 81 | require_once AYG_DIR . 'includes/functions.php'; |
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | - * The class responsible for importing videos into the Gallery Builder galleries. | |
| 85 | - */ | |
| 86 | - require_once AYG_DIR . 'includes/import.php'; | |
| 87 | - | |
| 88 | - /** | |
| 89 | 84 | * The classes responsible for defining all actions that occur in the admin area. |
| 90 | 85 | */ |
| 91 | - require_once AYG_DIR . 'admin/admin.php'; | |
| 86 | + require_once AYG_DIR . 'admin/admin.php'; | |
| 92 | 87 | require_once AYG_DIR . 'admin/settings.php'; |
| 93 | 88 | |
| 94 | 89 | /** |
| 95 | 90 | * The class responsible for defining all actions that occur in the public-facing |
| @@ -138,16 +133,11 @@ | ||
| 138 | 133 | |
| 139 | 134 | $this->loader->add_action( 'admin_init', $admin, 'insert_missing_options', 1 ); |
| 140 | 135 | $this->loader->add_action( 'admin_enqueue_scripts', $admin, 'enqueue_styles' ); |
| 141 | 136 | $this->loader->add_action( 'admin_enqueue_scripts', $admin, 'enqueue_scripts' ); |
| 142 | - $this->loader->add_action( 'elementor/editor/after_enqueue_styles', $admin, 'enqueue_styles' ); | |
| 143 | - $this->loader->add_action( 'elementor/editor/after_enqueue_scripts', $admin, 'enqueue_scripts' ); | |
| 144 | 137 | $this->loader->add_action( 'admin_menu', $admin, 'admin_menu' ); |
| 145 | 138 | $this->loader->add_action( 'admin_notices', $admin, 'admin_notices' ); |
| 146 | 139 | $this->loader->add_action( 'wp_ajax_ayg_save_api_key', $admin, 'ajax_callback_save_api_key' ); |
| 147 | - $this->loader->add_action( 'wp_ajax_ayg_save_gallery', $admin, 'ajax_callback_save_gallery' ); | |
| 148 | - $this->loader->add_action( 'wp_ajax_ayg_import_gallery', $admin, 'ajax_callback_import_gallery' ); | |
| 149 | - $this->loader->add_action( 'wp_ajax_ayg_delete_gallery', $admin, 'ajax_callback_delete_gallery' ); | |
| 150 | 140 | |
| 151 | 141 | $this->loader->add_filter( 'plugin_action_links_' . AYG_FILE_NAME, $admin, 'plugin_action_links' ); |
| 152 | 142 | |
| 153 | 143 | // Hooks specific to the settings page |
| @@ -170,13 +160,11 @@ | ||
| 170 | 160 | $public = new AYG_Public(); |
| 171 | 161 | |
| 172 | 162 | $this->loader->add_action( 'wp_enqueue_scripts', $public, 'register_styles' ); |
| 173 | 163 | $this->loader->add_action( 'wp_enqueue_scripts', $public, 'register_scripts' ); |
| 174 | - $this->loader->add_action( 'enqueue_block_assets', $public, 'enqueue_block_assets' ); | |
| 175 | - $this->loader->add_action( 'elementor/editor/after_enqueue_scripts', $public, 'enqueue_editor_assets' ); | |
| 176 | - $this->loader->add_action( 'elementor/preview/enqueue_scripts', $public, 'enqueue_editor_assets' ); | |
| 177 | - $this->loader->add_action( 'wp_ajax_ayg_load_videos', $public, 'ajax_callback_load_videos' ); | |
| 178 | - $this->loader->add_action( 'wp_ajax_nopriv_ayg_load_videos', $public, 'ajax_callback_load_videos' ); | |
| 164 | + $this->loader->add_action( 'enqueue_block_editor_assets', $public, 'enqueue_block_editor_assets' ); | |
| 165 | + $this->loader->add_action( 'wp_ajax_ayg_load_more_videos', $public, 'ajax_callback_load_more_videos' ); | |
| 166 | + $this->loader->add_action( 'wp_ajax_nopriv_ayg_load_more_videos', $public, 'ajax_callback_load_more_videos' ); | |
| 179 | 167 | $this->loader->add_action( 'wp_ajax_ayg_set_cookie', $public, 'set_gdpr_cookie' ); |
| 180 | 168 | $this->loader->add_action( 'wp_ajax_nopriv_ayg_set_cookie', $public, 'set_gdpr_cookie' ); |
| 181 | 169 | |
| 182 | 170 | $this->loader->add_filter( 'smush_skip_iframe_from_lazy_load', $public, 'smush', 999, 2 ); |
| @@ -184,9 +172,9 @@ | ||
| 184 | 172 | // Hooks specific to the cron jobs |
| 185 | 173 | $cron = new AYG_Public_Cron(); |
| 186 | 174 | |
| 187 | 175 | $this->loader->add_action( 'wp', $cron, 'schedule_events' ); |
| 188 | - $this->loader->add_action( 'ayg_cron_schedule', $cron, 'cron_event' ); | |
| 176 | + $this->loader->add_action( 'ayg_schedule_weekly', $cron, 'cron_event' ); | |
| 189 | 177 | |
| 190 | 178 | $this->loader->add_filter( 'cron_schedules', $cron, 'cron_schedules' ); |
| 191 | 179 | } |
| 192 | 180 | |