- fixed dynamic profile title;

- removed deprecated router class;
This commit is contained in:
nikitozzzzzzz
2018-11-28 10:19:20 +02:00
parent e60dae6f39
commit 304845b255
5 changed files with 10 additions and 176 deletions
-29
View File
@@ -18,8 +18,6 @@ if ( ! class_exists( 'um\core\Common' ) ) {
function __construct() {
add_action( 'init', array( &$this, 'create_post_types' ), 1 );
add_filter( 'posts_request', array( &$this, 'um_query_pages' ) );
add_filter( 'body_class', array( &$this, 'remove_admin_bar' ), 1000, 1 );
}
@@ -110,33 +108,6 @@ if ( ! class_exists( 'um\core\Common' ) ) {
}
}
/**
* Check query string on 'posts_request' for our pages
*
* @param string $q
*
* @return string
*/
public function um_query_pages( $q ) {
global $wp_query;
//We need main query
if ( isset( $wp_query->request ) && $q == $wp_query->request ) {
if ( ! empty( $wp_query->query_vars['um_page'] ) ) {
if ( 'api' == $wp_query->query_vars['um_page'] ) {
$router = new Router();
$router->frontend_requests();
}
}
}
return $q;
}
}
}