mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Coding Standards: Consistently use do_action_deprecated() and apply_filters_deprecated() for deprecated hooks.
Props jrf. See #48255. git-svn-id: https://develop.svn.wordpress.org/trunk@46684 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -292,7 +292,7 @@ function wp_stream_image( $image, $mime_type, $attachment_id ) {
|
||||
* @param resource $image Image resource to be streamed.
|
||||
* @param int $attachment_id The attachment post ID.
|
||||
*/
|
||||
$image = apply_filters( 'image_save_pre', $image, $attachment_id );
|
||||
$image = apply_filters_deprecated( 'image_save_pre', array( $image, $attachment_id ), '3.5.0', 'image_editor_save_pre' );
|
||||
|
||||
switch ( $mime_type ) {
|
||||
case 'image/jpeg':
|
||||
@@ -353,7 +353,7 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
|
||||
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( '%1$s needs to be a %2$s object.' ), '$image', 'WP_Image_Editor' ) );
|
||||
|
||||
/** This filter is documented in wp-admin/includes/image-edit.php */
|
||||
$image = apply_filters( 'image_save_pre', $image, $post_id );
|
||||
$image = apply_filters_deprecated( 'image_save_pre', array( $image, $post_id ), '3.5.0', 'image_editor_save_pre' );;
|
||||
|
||||
/**
|
||||
* Filters whether to skip saving the image file.
|
||||
@@ -370,7 +370,7 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
|
||||
* @param string $mime_type Image mime type.
|
||||
* @param int $post_id Post ID.
|
||||
*/
|
||||
$saved = apply_filters( 'wp_save_image_file', null, $filename, $image, $mime_type, $post_id );
|
||||
$saved = apply_filters_deprecated( 'wp_save_image_file', array( null, $filename, $image, $mime_type, $post_id ), '3.5.0', 'wp_save_image_editor_file' );
|
||||
|
||||
if ( null !== $saved ) {
|
||||
return $saved;
|
||||
@@ -570,7 +570,7 @@ function image_edit_apply_changes( $image, $changes ) {
|
||||
* @param resource $image GD image resource.
|
||||
* @param array $changes Array of change operations.
|
||||
*/
|
||||
$image = apply_filters( 'image_edit_before_change', $image, $changes );
|
||||
$image = apply_filters_deprecated( 'image_edit_before_change', array( $image, $changes ), '3.5.0', 'wp_image_editor_before_change' );
|
||||
}
|
||||
|
||||
foreach ( $changes as $operation ) {
|
||||
|
||||
Reference in New Issue
Block a user