File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
classes/Visualizer/Module Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,32 @@ public function __construct( Visualizer_Plugin $plugin ) {
60
60
$ this ->_addFilter ( 'plugin_action_links ' , 'getPluginActionLinks ' , 10 , 2 );
61
61
$ this ->_addFilter ( 'visualizer_logger_data ' , 'getLoggerData ' );
62
62
$ this ->_addFilter ( 'visualizer_get_chart_counts ' , 'getChartCountsByTypeAndMeta ' );
63
+ $ this ->_addFilter ( 'visualizer_feedback_review_trigger ' , 'feedbackReviewTrigger ' );
64
+ }
65
+
66
+ /**
67
+ * Whether to show the feedback review or not.
68
+ *
69
+ * @access public
70
+ */
71
+ public function feedbackReviewTrigger ( $ dumb ) {
72
+ $ query = new WP_Query (
73
+ array (
74
+ 'posts_per_page ' => 50 ,
75
+ 'post_type ' => Visualizer_Plugin::CPT_VISUALIZER ,
76
+ 'fields ' => 'ids ' ,
77
+ 'update_post_meta_cache ' => false ,
78
+ 'update_post_term_cache ' => false ,
79
+ )
80
+ );
81
+
82
+ if ( $ query ->have_posts () && $ query ->post_count > 0 ) {
83
+ return array (
84
+ 'heading ' => __ ( 'Some title from visualizer ' , 'visualizer ' ),
85
+ 'msg ' => __ ( 'Some msg from visualizer ' , 'visualizer ' ),
86
+ );
87
+ }
88
+ return false ;
63
89
}
64
90
65
91
/**
You can’t perform that action at this time.
0 commit comments