class WordBinder

This class provides functions for string conversion.

Methods

static string
view(string $content)

The main content of WordPress is publishing (e.g., deleting tags, changing video tags to embedding tags, etc.)

static string
addBanner(string $content, string $bannerHtml, int $nthPTag = 0)

Create HTML with banner code in nth phrases.

Details

at line 19
static string view(string $content)

The main content of WordPress is publishing (e.g., deleting tags, changing video tags to embedding tags, etc.)

Parameters

string $content

WordPress content.

Return Value

string

Wordpress widgets to HTML embed.

Examples

WordBinder::view('<p>...[caption ... /]...</p>');
//=> <p><iframe width... /></p>

at line 43
static string addBanner(string $content, string $bannerHtml, int $nthPTag = 0)

Create HTML with banner code in nth phrases.

Parameters

string $content

HTML content.

string $bannerHtml

Banner HTML code.

int $nthPTag

nth phrases to insert into Banner HTML.

Return Value

string

HTML content with Banner HTML.

Examples

WordBinder::addBanner('<p>...[caption ... /]...</p>', '<a href="...">...</a>', 2);
//=> Insert Banner HTML into second phrases.