public function vtprd_admin_untrash_rule()
 {
     global $post, $vtprd_rules_set;
     if (!('vtprd-rule' == $post->post_type)) {
         return;
     }
     if (!current_user_can('delete_posts', 'vtprd-rule')) {
         return;
     }
     $vtprd_rule_delete = new VTPRD_Rule_delete();
     $vtprd_rule_delete->vtprd_untrash_rule();
 }
Пример #2
0
 public function vtprd_admin_untrash_rule()
 {
     //error_log( print_r(  'Function begin - vtprd_admin_untrash_rule', true ) );
     global $post, $vtprd_rules_set;
     //v1.1.0.9 begin
     if (!isset($post)) {
         return;
     }
     //v1.1.0.9 end
     if (!('vtprd-rule' == $post->post_type)) {
         return;
     }
     if (!current_user_can('delete_posts', 'vtprd-rule')) {
         return;
     }
     $vtprd_rule_delete = new VTPRD_Rule_delete();
     $vtprd_rule_delete->vtprd_untrash_rule();
 }