su_filter_custom_formatting

The shortcodes-ultimate su filter custom formatting function.

Published Date - February 15, 2021

Description

Custom formatting filter.

su_filter_custom_formatting( $content );

Parameters

  1. $content


Usage

The following example is for adding a hook callback.

if ( !function_exists( 'su_filter_custom_formatting' ) ) {
    require_once ABSPATH . PLUGINDIR . 'shortcodes-ultimateshortcodes-ultimate/includes/filters.php';
}

// The input(s). 
$content = null;

// NOTICE! Understand what this does before running.
$result = su_filter_custom_formatting( $content );
            

Defined

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

shortcodes-ultimate/includes/filters.php

function su_filter_custom_formatting( $content ) {

	$replacements = array(
		'<p>['    => '[',
		']</p>'   => ']',
		']<br />' => ']',
	);

	return strtr( $content, $replacements );

}