first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
class WPML_WP_Query_API {
private $wp_query;
public function __construct( &$wp_query ) {
$this->wp_query = $wp_query;
}
public function get_first_post_type() {
$post_type = null;
if ( isset( $this->wp_query->query_vars['post_type'] ) ) {
$post_type = $this->wp_query->query_vars['post_type'];
if ( is_array( $post_type ) ) {
if ( count( $post_type ) ) {
$post_type = $post_type[0];
} else {
$post_type = null;
}
}
}
return $post_type;
}
}