PluginProbe
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar / trunk
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar vtrunk
3.3.1 3.3.0 3.2.14 3.2.13 3.2.12 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 trunk 0.2.5.5 0.2.5.6 0.2.5.7 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 All 156 releases
← All changes | includes/Extensions/Extension.php +8 -2 3.2.7trunk View file →
@@ -82,8 +82,9 @@
82 82 add_action('init', [$this, '__init_extension']);
83 83 }
84 84
85 85 public function initialize(){
86 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context.
86 87 do_action('nx::extension::init', $this);
87 88 add_action('nx_before_metabox_load', [$this, '__init_fields']);
88 89 add_action('nx_before_settings_fields', [$this, 'init_settings_fields']);
89 90
@@ -447,8 +448,9 @@
447 448 'label' => $this->title,
448 449 'icon' => $this->img,
449 450 'value' => $this->id,
450 451 'is_pro' => $this->is_pro && ! NotificationX::is_pro(),
452 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context.
451 453 'popup' => apply_filters('nx_pro_alert_popup', $this->popup),
452 454 'priority' => $this->priority,
453 455 ];
454 456 return $sources;
@@ -650,8 +652,9 @@
650 652 public function update_notifications($entries) {
651 653 if(is_array($entries) && !empty($entries[0]['nx_id'])){
652 654 $post = PostType::get_instance()->get_post($entries[0]['nx_id']);
653 655 foreach ($entries as $key => $entry) {
656 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context.
654 657 $can_entry = apply_filters("nx_can_entry_{$this->id}", true, $entry, $post);
655 658 if(!$can_entry){
656 659 unset($entries[$key]);
657 660 }
@@ -676,8 +679,9 @@
676 679 if(!empty($is_exits[0]['count(*)'])) return false;
677 680 }
678 681 // @todo add object caching
679 682 $post = PostType::get_instance()->get_post($entry['nx_id']);
683 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context.
680 684 $can_entry = apply_filters("nx_can_entry_{$this->id}", true, $entry, $post);
681 685 if($can_entry){
682 686 Limiter::get_instance()->remove($post['nx_id'], 1);
683 687 Entries::get_instance()->insert_entry($entry);
@@ -786,11 +790,13 @@
786 790 // @todo add sorting.
787 791 return $arr;
788 792 }
789 793
794 + /**
795 + * Base REST response for extensions that do not implement one.
796 + * Dispatched from REST::rest_response() via method_exists().
797 + */
790 798 public function restResponse( $params ){
791 - error_log('FROM Extenson');
792 - error_log( $params );
793 799 }
794 800
795 801 public function nx_instructions($instructions){
796 802 if(method_exists($this, 'doc')){