File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -285,6 +285,10 @@ function hookpress_generic_action($id,$args) {
285285 $ newobj = array ();
286286 switch ($ arg_names [$ i ]) {
287287 case 'POST ' :
288+
289+ if (in_array ($ args [1 ]->post_type ,$ desc ['post_type ' ]) != 1 ){
290+ return ;
291+ }
288292 case 'ATTACHMENT ' :
289293 $ newobj = get_post ($ arg ,ARRAY_A );
290294
Original file line number Diff line number Diff line change 107107 tb.find('#editindicator').html('<small><?php _e ("Please enter a valid URL. " ,"hookpress " );?> </small>');
108108 return;
109109 }
110+ if (tb.find('#post_type').val() == '') {
111+ tb.find('#editindicator').html('<small><?php _e ("You must select at least one post type. " ,"hookpress " );?> </small>');
112+ return;
113+ }
110114
111115 tb.find('#editindicator').html('<div class="webhooks-spinner"> </div>');
112116
165169 tb.find('#newindicator').html('<small><?php _e ("Please enter a valid URL. " ,"hookpress " );?> </small>');
166170 return;
167171 }
172+ if (tb.find('#post_type').val() == '') {
173+ tb.find('#newindicator').html('<small><?php _e ("You must select at least one post type. " ,"hookpress " );?> </small>');
174+ return;
175+ }
168176
169177 tb.find('#newindicator').html('<div class="webhooks-spinner"> </div>');
170178
You can’t perform that action at this time.
0 commit comments