Filter: immonex_notify_request_custom_fields

Definition/Anpassung/Abruf

CMB2-Definitionen benutzerdefinierter Felder (Custom Fields) der Suchauftrags-Beiträge (Abschnitt Kerndaten des Backend-Formulars)

Parameter

Name (Typ)
$fields (array)

Original-Array: $fields

$fields = [
    'status'           => [
        'name'    => 'Status',
        'desc'    => '',
        'id'      => '_immonex_notify_status',
        'type'    => 'select',
        'options' => [
            'pending' => __( 'Confirmation pending', 'immonex-notify' ),
            'active'  => __( 'active', 'immonex-notify' ),
            'paused'  => __( 'paused', 'immonex-notify' ),
        ],
    ],
    'token'            => [
        'name'       => 'Token',
        'desc'       => '',
        'id'         => '_immonex_notify_token',
        'type'       => 'text',
        'attributes' => [
            'readonly' => 'readonly',
        ],
    ],
    'locale'           => [
        'name'       => __( 'Language/Locale', 'immonex-notify' ),
        'desc'       => '',
        'id'         => '_immonex_notify_locale',
        'type'       => 'text',
        'attributes' => [
            'readonly' => 'readonly',
        ],
    ],
    'last_dispatch'    => [
        'name'       => __( 'Last Dispatch', 'immonex-notify' ),
        'desc'       => '',
        'id'         => '_immonex_notify_last_dispatch',
        'type'       => 'text',
        'attributes' => [
            'readonly' => 'readonly',
        ],
    ],
    'callback_page_id' => [
        'name'       => __( 'Callback Page ID', 'immonex-notify' ),
        'desc'       => '',
        'id'         => '_immonex_notify_callback_page_id',
        'type'       => 'text_small',
        'attributes' => [
            'readonly' => 'readonly',
        ],
    ],
    'email'            => [
        'name' => __( 'Email Address', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_email',
        'type' => 'text_email',
    ],
    'salutation'       => [
        'name'    => __( 'Salutation', 'immonex-notify' ),
        'desc'    => '',
        'id'      => '_immonex_notify_salutation',
        'type'    => 'radio_inline',
        'options' => [
            ''  => __( 'n/a', 'immonex-notify' ),
            'm' => __( 'Mr.', 'immonex-notify' ),
            'f' => __( 'Ms.', 'immonex-notify' ),
        ],
    ],
    'first_name'       => [
        'name' => __( 'First Name', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_first_name',
        'type' => 'text',
    ],
    'last_name'        => [
        'name' => __( 'Last Name', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_last_name',
        'type' => 'text',
    ],
    'property_type'    => [
        'name'    => __( 'Property Type', 'immonex-notify' ),
        'desc'    => '',
        'id'      => '_immonex_notify_property_type',
        'type'    => 'select',
        'options' => [ ... ],
    ],
    'marketing_type'   => [
        'name'    => __( 'Marketing Type', 'immonex-notify' ),
        'desc'    => '',
        'id'      => '_immonex_notify_marketing_type',
        'type'    => 'select',
        'options' => [ ... ],
    ],
    'area'             => [
        'name' => __( 'Area', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_area',
        'type' => 'text',
    ],
    'rooms'            => [
        'name' => __( 'Rooms', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_rooms',
        'type' => 'text',
    ],
    'price'            => [
        'name' => __( 'Price', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_price',
        'type' => 'text',
    ],
    'location'         => [
        'name' => __( 'Location', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_location',
        'type' => 'text',
    ],
    'distance_radius'  => [
        'name' => __( 'Distance Radius', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_distance_radius',
        'type' => 'text',
    ],
    'lat'              => [
        'name' => __( 'Latitude', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_lat',
        'type' => 'text_small',
    ],
    'lng'              => [
        'name' => __( 'Longitude', 'immonex-notify' ),
        'desc' => '',
        'id'   => '_immonex_notify_lng',
        'type' => 'text_small',
    ],
];

Rückgabewert

Array mit angepassten oder erweiterten CMB2-Felddefinitionen

Code-Beispiel

/**
 * [immonex Notify] Filter: CMB2-Definitionen der benutzerdefinierten Felder von
 * Suchauftrags-Beiträgen erweitern/anpassen
 */
add_filter( 'immonex_notify_request_custom_fields', 'mysite_modify_search_request_cf' );
function mysite_modify_search_request_cf( $fields ) {
    // ... Felddaten erweitern oder anpassen ...
    return $fields;
} // mysite_modify_search_request_cf

Siehe auch