subscribe_field_id

Filter the subscription form's ID prefix.

Description

apply_filters( 'subscribe_field_id', (string) $subscribe_field, (int) $widget_id ); 

Parameters (2)

0. $subscribe_field (string) => 'subscribe-field'
Subscribe-field Subscription form field prefix.
1. $widget_id (int)
The widget id.

Usage

To run the hook, copy the example below.
  1. $subscribe_field = apply_filters( 'subscribe_field_id', $subscribe_field, $widget_id ); 
  2.  
  3. if ( !empty( $subscribe_field ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the subscribe_field_id callback 
  2. function filter_subscribe_field_id( $subscribe_field, $widget_id ) { 
  3. // make filter magic happen here... 
  4. return $subscribe_field
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'subscribe_field_id', 'filter_subscribe_field_id', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'subscribe_field_id', 'filter_subscribe_field_id', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/modules/subscriptions.php  
  1. $subscribe_field_id = apply_filters( 'subscribe_field_id', 'subscribe-field', $widget_id );