Skip to content

Commit

Permalink
Fix return in Media Metadata filter
Browse files Browse the repository at this point in the history
  • Loading branch information
dshanske committed Feb 3, 2024
1 parent 33975de commit a133148
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions includes/class-sloc-media-metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public static function init() {
// Grab geo data from EXIF, if it's available.
$wp_version = get_bloginfo( 'version' );
if ( version_compare( $wp_version, '5.0', '>=' ) ) {
add_action( 'wp_read_image_metadata', array( __CLASS__, 'exif_data' ), 10, 5 );
add_filter( 'wp_read_image_metadata', array( __CLASS__, 'exif_data' ), 10, 5 );
} else {
add_action( 'wp_read_image_metadata', array( __CLASS__, 'exif_data' ), 10, 3 );
add_filter( 'wp_read_image_metadata', array( __CLASS__, 'exif_data' ), 10, 3 );
}

add_action( 'wp_generate_attachment_metadata', array( __CLASS__, 'attachment' ), 20, 2 );
add_filter( 'wp_generate_attachment_metadata', array( __CLASS__, 'attachment' ), 20, 2 );
add_filter( 'attachment_fields_to_edit', array( __CLASS__, 'attachment_fields_to_edit' ), 10, 2 );
add_action( 'attachment_submitbox_misc_actions', array( __CLASS__, 'attachment_submitbox_metadata' ), 12 );
}
Expand Down Expand Up @@ -236,7 +236,8 @@ public static function attachment( $meta, $post_id ) {
foreach ( $update as $key => $value ) {
update_post_meta( $post_id, $key, $value );
}
return $meta;
}

return $meta;
}
}

0 comments on commit a133148

Please sign in to comment.