mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- removed deprecated "UM_TEXTDOMAIN" constant;
- removed deprecated function UM()->get_ajax_route();
This commit is contained in:
@@ -85,6 +85,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
|
||||
|
||||
/**
|
||||
* Hide Woocommerce Shop page restrict content metabox
|
||||
* @param $hide
|
||||
*
|
||||
* @return bool
|
||||
|
||||
@@ -54,43 +54,6 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get ajax routed URL
|
||||
*
|
||||
* @param string $route
|
||||
* @param string $method
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_ajax_route( $route, $method ) {
|
||||
|
||||
$route = str_replace( array( '\\', '/' ), '!', $route );
|
||||
$ip = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : '';
|
||||
$nonce = wp_create_nonce( $ip . get_current_user_id() . $route . $method );
|
||||
|
||||
if ( is_admin() ) {
|
||||
$url = add_query_arg( array(
|
||||
'action' => 'um_router',
|
||||
'um_action' => 'route',
|
||||
'um_resource' => $route,
|
||||
'um_method' => $method,
|
||||
'um_verify' => $nonce
|
||||
), get_admin_url( null, 'admin-ajax.php' ) );
|
||||
} else if ( get_option( 'permalink_structure' ) ) {
|
||||
$url = get_home_url( null, 'um-api/route/' . $route . '/' . $method . '/' . $nonce );
|
||||
} else {
|
||||
$url = add_query_arg( array(
|
||||
'um_page' => 'api',
|
||||
'um_action' => 'route',
|
||||
'um_resource' => $route,
|
||||
'um_method' => $method,
|
||||
'um_verify' => $nonce
|
||||
), get_home_url() );
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Help Tip displaying
|
||||
*
|
||||
|
||||
+9
-1
@@ -6,7 +6,7 @@ Donate link:
|
||||
Tags: community, member, membership, user-profile, user-registration
|
||||
Requires at least: 4.7
|
||||
Tested up to: 4.9
|
||||
Stable tag: 2.0.33
|
||||
Stable tag: 2.0.34
|
||||
License: GNU Version 2 or Any Later Version
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
@@ -137,6 +137,14 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
||||
|
||||
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
||||
|
||||
= 2.0.34: December , 2018 =
|
||||
|
||||
* Bugfixes:
|
||||
|
||||
* Deprecated:
|
||||
- removed "UM_TEXTDOMAIN" constant;
|
||||
- removed function UM()->get_ajax_route();
|
||||
|
||||
= 2.0.33: November 22, 2018 =
|
||||
|
||||
* Bugfixes:
|
||||
|
||||
+1
-8
@@ -3,7 +3,7 @@
|
||||
Plugin Name: Ultimate Member
|
||||
Plugin URI: http://ultimatemember.com/
|
||||
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
|
||||
Version: 2.0.33
|
||||
Version: 2.0.34
|
||||
Author: Ultimate Member
|
||||
Author URI: http://ultimatemember.com/
|
||||
Text Domain: ultimate-member
|
||||
@@ -15,13 +15,6 @@ defined( 'ABSPATH' ) || exit;
|
||||
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
||||
$plugin_data = get_plugin_data( __FILE__ );
|
||||
|
||||
/**
|
||||
* Textdomain constant backward compatibility will be removed in future releases
|
||||
*
|
||||
* @todo remove in future releases
|
||||
*/
|
||||
define( 'UM_TEXTDOMAIN', 'ultimate-member' );
|
||||
|
||||
define( 'um_url', plugin_dir_url( __FILE__ ) );
|
||||
define( 'um_path', plugin_dir_path( __FILE__ ) );
|
||||
define( 'um_plugin', plugin_basename( __FILE__ ) );
|
||||
|
||||
Reference in New Issue
Block a user