mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed image resize;
- added few scripts dependencies;
This commit is contained in:
@@ -396,14 +396,12 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
||||
/**
|
||||
* Load rating
|
||||
*/
|
||||
function load_raty(){
|
||||
|
||||
wp_register_script('um_raty', um_url . 'assets/js/um-raty' . $this->suffix . '.js' );
|
||||
function load_raty() {
|
||||
wp_register_script('um_raty', um_url . 'assets/js/um-raty' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
||||
wp_enqueue_script('um_raty');
|
||||
|
||||
wp_register_style('um_raty', um_url . 'assets/css/um-raty.css' );
|
||||
wp_register_style('um_raty', um_url . 'assets/css/um-raty.css', array(), ultimatemember_version );
|
||||
wp_enqueue_style('um_raty');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -426,10 +424,10 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
||||
*/
|
||||
function load_tipsy(){
|
||||
|
||||
wp_register_script('um_tipsy', um_url . 'assets/js/um-tipsy' . $this->suffix . '.js' );
|
||||
wp_register_script('um_tipsy', um_url . 'assets/js/um-tipsy' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
||||
wp_enqueue_script('um_tipsy');
|
||||
|
||||
wp_register_style('um_tipsy', um_url . 'assets/css/um-tipsy.css' );
|
||||
wp_register_style('um_tipsy', um_url . 'assets/css/um-tipsy.css', array(), ultimatemember_version );
|
||||
wp_enqueue_style('um_tipsy');
|
||||
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
||||
|
||||
if ( isset( $this->set_args ) && is_array( $this->set_args ) ) {
|
||||
$args = $this->set_args;
|
||||
|
||||
|
||||
unset( $args['file'] );
|
||||
unset( $args['theme_file'] );
|
||||
unset( $args['tpl'] );
|
||||
|
||||
@@ -936,7 +936,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
||||
|
||||
$max_w = UM()->options()->get('image_max_width');
|
||||
if ( $src_w > $max_w ) {
|
||||
$image->resize( $max_w );
|
||||
$image->resize( $max_w, $src_h );
|
||||
}
|
||||
|
||||
$image->save( $image_path );
|
||||
@@ -987,7 +987,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
||||
|
||||
$max_w = UM()->options()->get('image_max_width');
|
||||
if ( $src_w > $max_w ) {
|
||||
$image->resize( $max_w );
|
||||
$image->resize( $max_w, $src_h );
|
||||
}
|
||||
|
||||
$image->save( $image_path );
|
||||
@@ -1039,7 +1039,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
||||
|
||||
$max_w = UM()->options()->get('image_max_width');
|
||||
if ( $src_w > $max_w ) {
|
||||
$image->resize( $max_w );
|
||||
$image->resize( $max_w, $src_h );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user