- fixed image resize;

- added few scripts dependencies;
This commit is contained in:
nikitozzzzzzz
2018-10-15 10:46:50 +03:00
parent e86f9c53dd
commit 2a6f8e6531
3 changed files with 9 additions and 11 deletions
+5 -7
View File
@@ -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');
}
+1 -1
View File
@@ -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'] );
+3 -3
View File
@@ -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 );
}
}