APIs on label and richtext output handling

Filter: ipt_uif_richtext

This filter is used to modify the richtext contents of element descriptions.

Filter Uses

Accepts one argument, the HTML string (rich text).

[php]
/**
* Modifies RichText Elements inside all eForm output
*
* @param string $text Original text/html
*
* @return string
*/
function modify_fsqm_richtext( $text ) {
// Perform some action to the text
$text = str_replace( ‘google’, ‘<a href="http://google.com">Go Google</a>’, $text );
return $text;
}
add_filter( ‘ipt_uif_richtext’, ‘modify_fsqm_richtext’, 10, 1 );
[/php]

Source

Located in multiple sources

Filter: ipt_uif_label

Used to modify the output of form elements’ labels.

Filter Uses

Accepts one parameter, the label HTML (string).

[php]
/**
* Modifies labels inside all fsqm elements
*
* @param string $text The label HTML
*
* @return string
*/
function modify_fsqm_labels( $text ) {
// Perform some action to the text
if ( is_admin() ) {
return $text;
}

$text = ‘<span class="my_label">’ . $text . ‘</span>’;
return $text;
}
add_filter( ‘ipt_uif_label’, ‘modify_fsqm_labels’, 99, 1 );
[/php]

Source

Located in multiple sources

Swashata has written 257 articles

Hi there, I am the Lead Developer at WPQuark.com. I love to create something beautiful for WordPress and here I write about how to use them. When I am not working, usually I am doing a number of other creative things ;).

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.