| @@ -44,8 +44,10 @@ | ||
| 44 | 44 | |
| 45 | 45 | add_shortcode('maxsocial', array($this->admin()->namespaceit('collections'), 'shortcode') ); |
| 46 | 46 | |
| 47 | 47 | add_action('maxbuttons/ajax/save_collection', array( $this->admin()->namespaceit('collections'), 'ajax_save') ); |
| 48 | + add_action('maxbuttons/ajax/remove-collection', array( $this->admin()->namespaceit('collections'), 'ajax_remove_collection') ); | |
| 49 | + | |
| 48 | 50 | add_action('maxbuttons/ajax/refreshblock', array($this->admin()->namespaceit('collections'), 'ajax_refreshblock') ); |
| 49 | 51 | add_action('maxbuttons/ajax/get_presets', array($this->admin()->namespaceit('collections'), 'ajax_getpresets') ); |
| 50 | 52 | add_action('maxbuttons/ajax/set_preset', array($this->admin()->namespaceit('collections'), 'ajax_setpreset') ); |
| 51 | 53 | |
| @@ -54,10 +56,8 @@ | ||
| 54 | 56 | add_action('maxbuttons/ajax/remove-networksettings', array($this->networks(), 'ajax_removesettings')); |
| 55 | 57 | add_action('maxbuttons/ajax/show-customnetworks', array($this->networks(), 'ajax_showcustomnetworks')); |
| 56 | 58 | add_action('maxbuttons/ajax/import-customnetworks', array($this->networks(), 'ajax_importcustomnetworks')); |
| 57 | 59 | |
| 58 | - | |
| 59 | - | |
| 60 | 60 | // FRONT AJAX |
| 61 | 61 | add_action('wp_ajax_mbsocial_get_count', array($this->admin()->namespaceit("collections"), "ajax_action_front")); // front end for all users |
| 62 | 62 | add_action('wp_ajax_nopriv_mbsocial_get_count', array($this->admin()->namespaceit("collections"), "ajax_action_front")); |
| 63 | 63 | |
| @@ -197,10 +197,11 @@ | ||
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | public function admin_styles($hook) |
| 200 | 200 | { |
| 201 | - wp_register_style('mbsocial-global', $this->plugin_url . 'css/global-admin.css', array(), $this->version); | |
| 202 | 201 | |
| 202 | + wp_register_style('mbsocial-global', $this->plugin_url . 'css/global-admin.css', array(), $this->version); | |
| 203 | + | |
| 203 | 204 | if ( strpos($hook,'maxbuttons-social') === false ) |
| 204 | 205 | return; |
| 205 | 206 | |
| 206 | 207 | wp_enqueue_style('mbsocial-admin', $this->plugin_url . 'css/admin.css', array(), $this->version); |
| @@ -205,15 +206,21 @@ | ||
| 205 | 206 | |
| 206 | 207 | wp_enqueue_style('mbsocial-admin', $this->plugin_url . 'css/admin.css', array(), $this->version); |
| 207 | 208 | |
| 208 | 209 | if (Install::isPro()) |
| 210 | + { | |
| 209 | 211 | $deps = array('maxbuttons-pro-init','maxbuttons-ajax', 'mb-media-button', 'jquery-ui-sortable'); // pro init |
| 212 | + wp_register_script('maxbuttons-mbcustom', $this->plugin_url . 'js/maxbuttons-custom.js', $deps, $this->version, true); | |
| 213 | + wp_enqueue_script('maxbuttons-mbcustom'); | |
| 214 | + } | |
| 210 | 215 | else |
| 216 | + { | |
| 211 | 217 | $deps = array('maxbutton-js-init', 'maxbuttons-ajax', 'mb-media-button', 'jquery-ui-sortable'); // free init |
| 212 | - | |
| 218 | + } | |
| 213 | 219 | wp_register_script('maxbuttons-social', $this->plugin_url . 'js/maxbuttons-social.js', $deps , $this->version, true); |
| 214 | 220 | wp_enqueue_script('maxbuttons-social'); |
| 215 | 221 | |
| 222 | + | |
| 216 | 223 | wp_register_script('mbsocial-editor', $this->plugin_url . 'js/network-editor.js', $deps, $this->version, true); |
| 217 | 224 | wp_enqueue_script('mbsocial-editor'); |
| 218 | 225 | |
| 219 | 226 | MB()->load_media_script(); |
| @@ -228,10 +235,10 @@ | ||
| 228 | 235 | $this->version, true); |
| 229 | 236 | |
| 230 | 237 | wp_register_style('mbsocial-buttons', $this->plugin_url . 'css/buttons.css'); |
| 231 | 238 | |
| 232 | - wp_register_style('nucleo_icons', $this->plugin_url . 'libraries/nucleo_icons/nucleo_icons.css', array(), $this->version); | |
| 233 | - wp_enqueue_style('nucleo_icons'); | |
| 239 | + //wp_register_style('nucleo_icons', $this->plugin_url . 'libraries/nucleo_icons/nucleo_icons.css', array(), $this->version); | |
| 240 | + //wp_enqueue_style('nucleo_icons'); | |
| 234 | 241 | } |
| 235 | 242 | |
| 236 | 243 | public function meta_boxes($post_type, $post) |
| 237 | 244 | { |