SHARE
TWEET

Add Filters To The s2 plugin form input values

casben79 May 21st, 2012 39 Never
  1. // if a button is hidden, show only other
  2.                 $unsubscribe_value = apply_filters( 's2_unsubscribe_text', __('Unsubscribe', 'subscribe2') );
  3.                 $subscribe_value = apply_filters( 's2_subscribe_text', __('Subscribe', 'subscribe2') );
  4.                 if ( $hide == 'subscribe' ) {
  5.                         $this->input_form_action = "<input type=\"submit\" name=\"unsubscribe\" value=\"" . esc_attr( $unsubscribe_value ) . "\" />";
  6.                 } elseif ( $hide == 'unsubscribe' ) {
  7.                         $this->input_form_action = "<input type=\"submit\" name=\"subscribe\" value=\"" . esc_attr( $subscribe_value ) . "\" />";
  8.                 } else {
  9.                         // both form input actions
  10.                         $this->input_form_action = "<input type=\"submit\" name=\"subscribe\" value=\"" . esc_attr( $subscribe_value ) . "\" />&nbsp;<input type=\"submit\" name=\"unsubscribe\" value=\"" . esc_attr( $unsubscribe_value ) . "\" />";
  11.                 }
RAW Paste Data
Top