replace() public method

public replace ( string $string, string $escape_mode = '' ) : string
$string string The string containing dynamic content tags.
$escape_mode string Escape mode for the replacement value. Leave empty for no escaping.
return string
 /**
  * Replaces the registered tags in the given string
  *
  * @hooked `mc4wp_form_message_html`
  * @hooked `mc4wp_form_content`
  *
  * @param string $string
  * @param MC4WP_Form $form
  * @param MC4WP_Form_Element $element
  *
  * @return string
  */
 public function replace($string, MC4WP_Form $form, MC4WP_Form_Element $element = null)
 {
     $this->form = $form;
     $this->form_element = $element;
     $string = $this->tags->replace($string);
     return $string;
 }
Example #2
0
 /**
  * Replaces the registered tags in the given string
  *
  * @hooked `mc4wp_form_message_html`
  * @hooked `mc4wp_form_content`
  *
  * @param string $string
  * @param MC4WP_Form $form
  *
  * @return string
  */
 public function replace($string, MC4WP_Form $form)
 {
     $this->form = $form;
     $string = $this->tags->replace($string);
     return $string;
 }
 /**
  * @hooked `mc4wp_integration_checkbox_label`
  * @param string $string
  * @param MC4WP_Integration $integration
  * @return string
  */
 public function replace($string, MC4WP_Integration $integration)
 {
     $this->integration = $integration;
     $string = $this->tags->replace($string);
     return $string;
 }