mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 14:43:49 +09:00
- added deprecated functions;
- added security ABSPATH checking;
This commit is contained in:
@@ -30,29 +30,12 @@ if ( ! class_exists( 'AJAX_Common' ) ) {
|
||||
* Fallback for ajax urls
|
||||
* @uses action hooks: wp_head, admin_head
|
||||
*/
|
||||
add_action( 'wp_head', array( $this, 'ultimatemember_ajax_urls' ) );
|
||||
add_action( 'admin_head', array( $this, 'ultimatemember_ajax_urls' ) );
|
||||
//add_action( 'wp_head', array( $this, 'ultimatemember_ajax_urls' ) );
|
||||
//add_action( 'admin_head', array( $this, 'ultimatemember_ajax_urls' ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
function ultimatemember_ajax_urls() {
|
||||
$enable_ajax_urls = apply_filters( "um_enable_ajax_urls", true );
|
||||
|
||||
if ( $enable_ajax_urls ) { ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var ultimatemember_image_upload_url = '<?php echo um_url . 'includes/lib/upload/um-image-upload.php'; ?>';
|
||||
var ultimatemember_file_upload_url = '<?php echo um_url . 'includes/lib/upload/um-file-upload.php'; ?>';
|
||||
var ultimatemember_ajax_url = '<?php echo admin_url('admin-ajax.php'); ?>';
|
||||
|
||||
</script>
|
||||
|
||||
<?php }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Router method
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
/**
|
||||
* Profile Access
|
||||
*
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
/**
|
||||
* Validate for errors in account form
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
/**
|
||||
* Run check if username exists
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
/**
|
||||
* Processes the requests of UM actions
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @Error handling: blocked emails
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @adds a form identifier to form
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/**
|
||||
* Error procesing hook for login
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/**
|
||||
* Member Directory Search
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @add a force redirect to from $_get
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @process a new request
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @um_profile_content_{main_tab}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/**
|
||||
* Account automatically approved
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @profile name update
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @sync with WP role
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @checks if user can access the backend
|
||||
***/
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/**
|
||||
* Account secure fields
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @conditional logout form
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @Do not apply to backend default avatars
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @Control comment author display
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @field is required?
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @Support multisite
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
add_filter("um_localize_permalink_filter","um_localize_permalink_filter",10,3);
|
||||
function um_localize_permalink_filter( $core_pages, $page_id, $profile_url ){
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @filter to allow whitelisted IP to access the wp-admin login
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @Members Filter Hooks
|
||||
@@ -305,7 +308,7 @@
|
||||
add_filter('pre_user_query','um_modify_sortby_randomly');
|
||||
function um_modify_sortby_randomly( $query ){
|
||||
|
||||
if( um_is_session_started() === FALSE ){
|
||||
if( um_is_session_started() === false ){
|
||||
@session_start();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @formats numbers nicely
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @add dynamic profile headers
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
/***
|
||||
*** @dynamic profile page title
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** @Main admin user actions
|
||||
***/
|
||||
|
||||
Reference in New Issue
Block a user