rblythe
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Customer Download Links Not WorkingIf the user’s email is not hashed into “uid” then everything works fine. See:
class-wc-order-item-product.php line 387Forum: Plugins
In reply to: [Avatar Manager] Choose Image from Media Library button not workingWonderful!
Forum: Plugins
In reply to: [Avatar Manager] Choose Image from Media Library button not workingGlad to help out. Thanks for a great plugin!
Forum: Plugins
In reply to: [Avatar Manager] Choose Image from Media Library button not workingThe problem is in the minified script: avatar-manager.min.js
If you copy the contents of: avatar-manager.js into avatar-manager.min.js, the problem is resolved
Forum: Plugins
In reply to: [Avatar Manager] Choose Image from Media Library button not workingSame here! Very annoying bug
Forum: Localhost Installs
In reply to: Image Crop Not Working Properly In Ajax EditorI have not fully resolved the bug but I have written a patch that bypasses the problem. I’m posting it below so that anyone who encounters the same issue doesn’t have to beat their head against a brick wall like I had to.
<?php function rblythe_image_resize_dimensions( $output, $orig_w, $orig_h, $dest_w, $dest_h, $crop ) { if ( $crop ) { // crop the largest possible portion of the original image that we can size to $dest_w x $dest_h $aspect_ratio = $orig_w / $orig_h; $new_w = min($dest_w, $orig_w); $new_h = min($dest_h, $orig_h); if ( ! $new_w ) { $new_w = (int) round( $new_h * $aspect_ratio ); } if ( ! $new_h ) { $new_h = (int) round( $new_w / $aspect_ratio ); } $size_ratio = max($new_w / $orig_w, $new_h / $orig_h); $crop_w = round($new_w / $size_ratio); $crop_h = round($new_h / $size_ratio); if ( ! is_array( $crop ) || count( $crop ) !== 2 ) { $crop = array( 'center', 'center' ); } list( $x, $y ) = $crop; if ( 'left' === $x ) { $s_x = 0; } elseif ( 'right' === $x ) { $s_x = $orig_w - $crop_w; } else { $s_x = floor( ( $orig_w - $crop_w ) / 2 ); } if ( 'top' === $y ) { $s_y = 0; } elseif ( 'bottom' === $y ) { $s_y = $orig_h - $crop_h; } else { $s_y = floor( ( $orig_h - $crop_h ) / 2 ); } } else { // don't crop, just resize using $dest_w x $dest_h as a maximum bounding box $crop_w = $orig_w; $crop_h = $orig_h; $s_x = 0; $s_y = 0; list( $new_w, $new_h ) = wp_constrain_dimensions( $orig_w, $orig_h, $dest_w, $dest_h ); } /**ADDED checks to see if the src image has been cropped */ $src_cropped = false; if ( !empty($_REQUEST['history']) ) { $changes = json_decode( wp_unslash($_REQUEST['history']) ); foreach ( $changes as $key => $obj ) { if ($src_cropped = isset($obj->c)) break; } } /**ADDED skip the WP evaulation if $src_cropped is true**/ // if the resulting image would be the same size or larger we don't want to resize it if (!$src_cropped && $new_w >= $orig_w && $new_h >= $orig_h && $dest_w != $orig_w && $dest_h != $orig_h ) { return false; } // the return array matches the parameters to imagecopyresampled() // int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h ); } add_filter( 'image_resize_dimensions', 'rblythe_image_resize_dimensions', 10, 6);Forum: Plugins
In reply to: [The Events Calendar] Add New – Menu Not ShowingArgg. The problem is back again. I have figured out what the problem is. Your plugin does not allow for custom roles. It only recognizes the default WordPress roles.
'administrator', 'editor', 'author', 'contributor', 'subscriber' Source code: the-events-calender/src/Tribe/Capabilities.php line 108For my site, I have the need for custom roles, which breaks down the usability of your plugin for my clients. What I need is the ability to hook into the code and add additional roles to be mapped.
Forum: Plugins
In reply to: [The Events Calendar] Add New – Menu Not ShowingIt was my error due to a administrative role issue. Everything is working now. This is an awesome plugin! I’ll post my five stars
Forum: Localhost Installs
In reply to: Image Crop Not Working Properly In Ajax EditorCould anyone else help out on this issue?
Forum: Localhost Installs
In reply to: Image Crop Not Working Properly In Ajax EditorSorry for the delay. Here’s a link to the screen shot
Forum: Localhost Installs
In reply to: Image Crop Not Working Properly In Ajax EditorYes. I’ll try to upload some screen shot links
Forum: Localhost Installs
In reply to: Image Crop Not Working Properly In Ajax EditorYes. In fact, a client of mine was the one who pointed it out to me. I’ve always cropped my images before uploaded so I don’t use the WP crop feature. Can you replicate the problem with WordPress 4.4.1?
Forum: Localhost Installs
In reply to: Image Crop Not Working Properly In Ajax EditorNo, this WordPress install is on my local dev machine. It is a fresh install that has no extra plugins or themes
Forum: Fixing WordPress
In reply to: Scheduled contentI’m so sorry for not responding sooner. WordPress and PHP is still new concepts for me but your idea sounds like a good start.
Thanks!