Stores some static methods that may be useful for html management

author etessore
version 1.0.5
package classes

 Methods

Retrieves the markup for the Add This widget

add_this() 
Static

Get the markup for an <a> tag

anchor(string $href, string $label, array | string $parms) : string
Static

Parameters

$href

string

the url to be pointed

$label

string

the text

$parms

arraystring

some html attributes in key=>value pairs or a plain string

Returns

stringthe markup for an html tag

Generates HTML Node Attribures

array_to_html_attributes(string $glue, array | string $pieces) : string
Static
author http://blog.teknober.com/2011/04/13/php-array-to-html-attributes/

Parameters

$glue

string

$pieces

arraystring

Returns

string

This filter callback adds some usefull classes to the body Remember to call body_class() in the theme!

body_class(array $classes) 
Static

Parameters

$classes

array

the classes already added by wordpress or some other plugin

Retrieves the url from array $url_arr If defined use http_build_url, else custom code

build_url(array $url_arr) 
Static
see \http://php.net/manual/en/function.parse-url.php

Parameters

$url_arr

array

the array of attributes

Retrieves the correct DOCTYPE

doctype(string $type) 
Static

Parameters

$type

string

the type, default is html5

Returns the content after the more tag for the given post

get_the_content_after_more(string $more_link_text, int | object $post_id, bool $apply_filters, bool $remove_more) 
Static

Parameters

$more_link_text

string

Optional. Content for when there is more text

$post_id

intobject

Post ID or post object.

$apply_filters

bool

true if you want the_content filter applyed on the return value

$remove_more

bool

if true the function will remove the #more span added by WordPress

Prints the content before the more tag for the given post If the tag is not present it will print the entire body

get_the_content_before_more(string $more_link_text, int | object $post_id, bool $apply_filters) 
Static

Parameters

$more_link_text

string

Optional. Content for when there is more text

$post_id

intobject

Post ID or post object.

$apply_filters

bool

true if you want the_content filter applyed on the return value

Returns the description of the page Choose in order from: FB SEO Plugin YOAST Seo TODO Blog Name

get_the_seo_description() 
Static

Returns the H1 for this page Choose in order from: FB SEO Plugin Post Title

get_the_seo_h1($post) 
Static

Parameters

$post

int|object the post

Returns the SPAN for this page Choose in order from: FB SEO Plugin Post Title

get_the_seo_span($post) 
Static

Parameters

$post

int|object the post

Returns the title of the page.

get_the_seo_title() 
Static

Choose in order from: FB SEO Plugin YOAST Seo TODO Blog Name

Checks if the current post has the <!--more--> tag

has_more_tag($post) 
Static

Parameters

$post

Checks if the post content has the give shortcode

has_shortcode($code, $post) : boolean
Static

Parameters

$code

$post

Returns

booleantrue if the shortcode is used at least once in the body

Retrives the markup for the default seo heading (h1+span)

heading() 
Static

Hides the wp admin bar

hide_admin_bar() 
Static

Get the markup for a <img> tag

image(string $src, array | string $parms) 
Static

Parameters

$src

string

the image source

$parms

arraystring

additional parameters

Enqueue a previously registered StyleSheet in WordPress init action

load_css(string $handle) 
Static

It can be called after wp_head(). In this case the asset will be loaded on the next page view. This is beacuse the assets list will be stored in a transient. @see AutomaticAssetsManager::enable_automatic_manager()

see http://codex.wordpress.org/Function_Reference/wp_register_style according to this we have to: Use the wp_enqueue_scripts action to call this function. Calling it outside of an action can lead to problems.
see http://core.trac.wordpress.org/ticket/17916 #17916 for details.

Parameters

$handle

string

the registered handle for the stylesheet.

Enqueue a previously registered JavaScript in WordPress init action

load_js(string $handle) 
Static

It can be called after wp_head(). In this case the asset will be loaded on the next page view. This is beacuse the assets list will be stored in a transient. @see AutomaticAssetsManager::enable_automatic_manager()

see http://codex.wordpress.org/Function_Reference/wp_register_script according to this we have to: Use the wp_enqueue_scripts action to call this function, or admin_enqueue_scripts to call it on the admin side. Calling it outside of an action can lead to problems.
see http://core.trac.wordpress.org/ticket/11526 #11526 for details.

Parameters

$handle

string

the registered handle for the javascript

Merges some images to a single big one to save some http connections.

merge_images(array $images, array $config) : string
Static

Stores it in a cache folder. To disable the cache system set IMAGE_MERGE_FORCE_REFRESH constant to true

Parameters

$images

array

an array of images: for every element $image['path'] and $image['url'] have to be defined

$config

array

timthumb config, default 'w'=>'700', 'h'=>'370', 'q'=>'50', 'r'=>false

Returns

stringthe url for the big image

Prepare the $parms to be printed as html attributes

params(string | array $parms) 
Static

Parameters

$parms

stringarray

list of html attributes

Remove some useless css and js by wpml

remove_wpml_assets() 
Static

Retrieves a <script> tag

script(string $content, array $parms) 
Static
deprecated

Parameters

$content

string

the inner content

$parms

array

some parameters

 Properties

 

$assets : array

 Constants

 

<p>Stores the name of the gettext domain for this theme</p>

textdomain : string