* Processes current image and saves to disk
* multiple sizes from single source.
*
+ * 'width' and 'height' are required.
+ * 'crop' defaults to false when not provided.
+ *
* @since 3.5.0
* @access public
* @abstract
*
- * @param array $sizes { {'width'=>int, 'height'=>int, 'crop'=>bool}, ... }
+ * @param array $sizes { {'width'=>int, 'height'=>int, ['crop'=>bool]}, ... }
* @return array
*/
abstract public function multi_resize( $sizes );
* @access public
* @abstract
*
- * @param boolean $horz Horizontal Flip
- * @param boolean $vert Vertical Flip
+ * @param boolean $horz Flip along Horizontal Axis
+ * @param boolean $vert Flip along Vertical Axis
* @return boolean|WP_Error
*/
abstract public function flip( $horz, $vert );
* @return boolean
*/
protected function make_image( $filename, $function, $arguments ) {
- $dst_file = $filename;
-
if ( $stream = wp_is_stream( $filename ) ) {
- $filename = null;
ob_start();
+ } else {
+ // The directory containing the original file may no longer exist when using a replication plugin.
+ wp_mkdir_p( dirname( $filename ) );
}
$result = call_user_func_array( $function, $arguments );
if ( $result && $stream ) {
$contents = ob_get_contents();
- $fp = fopen( $dst_file, 'w' );
+ $fp = fopen( $filename, 'w' );
if ( ! $fp )
return false;