Skip to:
Content

bbPress.org

Changeset 4961


Ignore:
Timestamp:
05/28/2013 05:46:21 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Allow registering of settings that don't need callbacks or titles. See #2340.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/admin/admin.php

    r4950 r4961  
    352352
    353353                // Add the field
    354                 add_settings_field( $field_id, $field['title'], $field['callback'], $page, $section_id, $field['args'] );
     354                if ( ! empty( $field['callback'] ) && !empty( $field['title'] ) ) {
     355                    add_settings_field( $field_id, $field['title'], $field['callback'], $page, $section_id, $field['args'] );
     356                }
    355357
    356358                // Register the setting
Note: See TracChangeset for help on using the changeset viewer.