Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Exposed ID in rwmb_file_info and rwmb_image_info #256

Merged
merged 1 commit into from

3 participants

@paulobarcelos

The attachment id is quite relevant, any reason not to include it in rwmb_file_info & rwmb_image_info?

@rilwis rilwis merged commit f8f2297 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  inc/helpers.php
View
2  inc/helpers.php
@@ -187,6 +187,7 @@ function rwmb_file_info( $id )
{
$path = get_attached_file( $id );
return array(
+ 'ID' => $id,
'name' => basename( $path ),
'path' => $path,
'url' => wp_get_attachment_url( $id ),
@@ -215,6 +216,7 @@ function rwmb_image_info( $id, $args = array() )
$attachment = &get_post( $id );
$path = get_attached_file( $id );
return array(
+ 'ID' => $id,
'name' => basename( $path ),
'path' => $path,
'url' => $img_src[0],
Something went wrong with that request. Please try again.