WordPress.org

Support

Support » Plugins and Hacks » Attachments » [Resolved] Array of all fields?

[Resolved] Array of all fields?

  • Hi,
    I understand that I can query attachment fields with:

    ´
    $attachments->field( ‘XXX’ );
    ´
    however it’s a bit annoying that I need to do this with all fields. Is there a function or code snippet which allows me to store all fields in an array – eg something like:

    $fields = $attachments->get_fields();
    $field_results = array();
    
    foreach($fields as $field)
    {
    $field_results[] = $attachments->field( $field );
    }

    Thanks,
    Danny

    http://wordpress.org/extend/plugins/attachments/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Array of all fields?’ is closed to new replies.
Skip to toolbar