Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. <?php
  2. /*
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.5.0.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. include_once ABSPATH . 'wp-admin/includes/plugin.php';
  15. $options = array('post_type' => $this->post_type);
  16.  
  17. if ($this->tax && $this->term && $this->tax != 'null' && $this->term != 'null' && $this->tax != '' && $this->term != '') {
  18. $terms_arr = explode(',', $this->term);
  19. $options['tax_query'] = array(array('taxonomy' => $this->tax, 'field' => 'term_id', 'terms' => $terms_arr));
  20. }
  21.  
  22. if ($this->include_id && $this->include_id != 'null' && $this->include_id != '') {
  23. $include_id_arr = explode(',', $this->include_id);
  24. $options['post__in'] = $include_id_arr;
  25. }
  26.  
  27. if ($this->exclude_id && $this->exclude_id != 'null' && $this->exclude_id != '') {
  28. $exclude_id_arr = explode(',', $this->exclude_id);
  29. $options['post__not_in'] = $exclude_id_arr;
  30. }
  31.  
  32. $posts_per_page = $this->rowCount * $this->colCount;
  33.  
  34. if ($this->order_query && $this->order_query != '') {
  35. $options['order'] = $this->order_query;
  36. } else {
  37. $options['order'] = 'ASC';
  38. }
  39.  
  40. if ($options['order'] == 'ASC') {
  41. $o1 = ' selected="selected"';
  42. $o2 = '';
  43. }
  44.  
  45. if ($options['order'] == 'DESC') {
  46. $o1 = '';
  47. $o2 = ' selected="selected"';
  48. }
  49.  
  50. if ($this->select && $this->select != '') {
  51. $options['orderby'] = $this->select;
  52. } else {
  53. $options['orderby'] = 'title';
  54. }
  55.  
  56. if ($options['orderby'] == 'title') {
  57. unset($options['meta_key']);
  58. $s1 = ' selected="selected"';
  59. $s2 = '';
  60. $s3 = '';
  61. $s4 = '';
  62. }
  63.  
  64. if ($options['orderby'] == 'date') {
  65. unset($options['meta_key']);
  66. $s2 = ' selected="selected"';
  67. $s1 = '';
  68. $s3 = '';
  69. $s4 = '';
  70. }
  71.  
  72. if ($options['orderby'] == 'meta_value_num') {
  73. $options['meta_key'] = 'cost_1';
  74. $s3 = ' selected="selected"';
  75. $s2 = '';
  76. $s1 = '';
  77. $s4 = '';
  78. }
  79.  
  80. if ($options['orderby'] == 'rand') {
  81. unset($options['meta_key']);
  82. $s4 = ' selected="selected"';
  83. $s2 = '';
  84. $s3 = '';
  85. $s1 = '';
  86. }
  87.  
  88. $options['posts_per_page'] = $posts_per_page;
  89. $options['paged'] = $this->page;
  90.  
  91. if ($this->hide_sklad && $this->hide_sklad == '1') {
  92. $options['meta_query'][0] = array('relation' => 'OR', array('key' => 'sklad_1', 'value' => 0, 'type' => 'NUMERIC', 'compare' => '>'), array('key' => 'sklad_1', 'value' => '', 'compare' => 'NOT EXISTS'), array('key' => 'sklad_1', 'value' => '', 'compare' => '='));
  93. }
  94.  
  95. if ($this->field && $this->field != 'null' && $this->field != '') {
  96. ........................................................................
  97. .......................................
  98. ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement