mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed member directory scripts enqueue;
- added integration with User Location extension; - sanitize $_GET variables in wp-admin side;
This commit is contained in:
@@ -96,7 +96,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
||||
*
|
||||
*/
|
||||
function enqueue_cpt_scripts() {
|
||||
if ( ( isset( $_GET['post_type'] ) && 'um_form' == $_GET['post_type'] ) || ( isset( $_GET['post'] ) && 'um_form' == get_post_type( $_GET['post'] ) ) ) {
|
||||
if ( ( isset( $_GET['post_type'] ) && 'um_form' == sanitize_key( $_GET['post_type'] ) ) ||
|
||||
( isset( $_GET['post'] ) && 'um_form' == get_post_type( absint( $_GET['post'] ) ) ) ) {
|
||||
$this->um_cpt_form_screen = true;
|
||||
add_action( 'admin_footer', array( $this, 'admin_footer_scripts' ), 20 );
|
||||
}
|
||||
@@ -105,6 +106,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function enqueue_frontend_preview_assets() {
|
||||
//scripts for FRONTEND PREVIEW
|
||||
if ( class_exists( 'WooCommerce' ) ) {
|
||||
@@ -293,7 +297,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
||||
$hide_footer = false;
|
||||
global $pagenow, $post;
|
||||
if ( ( 'post.php' == $pagenow || 'post-new.php' == $pagenow ) &&
|
||||
( ( isset( $_GET['post_type'] ) && 'um_form' == $_GET['post_type'] ) ||
|
||||
( ( isset( $_GET['post_type'] ) && 'um_form' == sanitize_key( $_GET['post_type'] ) ) ||
|
||||
( isset( $post->post_type ) && 'um_form' == $post->post_type ) ) ) {
|
||||
$hide_footer = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user