PHP Класс WPDKServiceShortcodes

## Overview These are the low-level shortcode for WordPress with prefix wpdk_. TODO To complete
Автор: =undo= ([email protected])
Наследование: extends WPDKShortcodes
Показать файл Открыть проект

Открытые методы

Метод Описание
admin_head ( ) Fires in for all admin pages.
admin_print_footer_scripts ( ) Prints any scripts and data queued for the footer.
admin_print_scripts ( ) Fires when scripts are printed for all admin pages.
getInstance ( ) : WPDKServiceShortcodes Create or return a singleton instance of WPDKServiceShortcodes
init ( ) : WPDKServiceShortcodes Alias of getInstance();
mce_buttons ( array $buttons ) Filter the first-row list of TinyMCE buttons (Visual tab).
mce_external_plugins ( $plugin_array ) Filter the list of TinyMCE external plugins.
wpdk_geo ( array $atts, string $content = null ) : boolean | string Display a content of shortcode only if the user geo localization info rispect the shortcodes params.
wpdk_gist ( array $atts, string $content = null ) : string Return the GitHub include script Gist. Use [wpdk_gist id="762771662"]
wpdk_is_user_logged_in ( array $atts, string $content = null ) : boolean | string Display a content of shortcode only if the user is logged in. In addition you can set below attributes:
wpdk_is_user_not_logged_in ( array $attrs, string $content = null ) : boolean | string Display a content of shortcode only if the user is NOT logged in.

Защищенные методы

Метод Описание
shortcodes ( ) : array Return a Key value pairs array with key as shortcode name and value TRUE/FALSE for turn on/off the shortcode.

Описание методов

admin_head() публичный Метод

Fires in for all admin pages.
public admin_head ( )

admin_print_scripts() публичный Метод

Fires when scripts are printed for all admin pages.
public admin_print_scripts ( )

getInstance() публичный статический Метод

Create or return a singleton instance of WPDKServiceShortcodes
public static getInstance ( ) : WPDKServiceShortcodes
Результат WPDKServiceShortcodes

init() публичный статический Метод

Alias of getInstance();
public static init ( ) : WPDKServiceShortcodes
Результат WPDKServiceShortcodes

mce_buttons() публичный Метод

Filter the first-row list of TinyMCE buttons (Visual tab).
public mce_buttons ( array $buttons )
$buttons array First-row list of buttons.

mce_external_plugins() публичный Метод

The filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'. The url should be absolute, and should include the js filename to be loaded. For example: 'myplugin' => 'http://mysite.com/wp-content/plugins/myfolder/mce_plugin.js'. If the external plugin adds a button, it should be added with one of the 'mce_buttons' filters.
public mce_external_plugins ( $plugin_array )

shortcodes() защищенный Метод

Return a Key value pairs array with key as shortcode name and value TRUE/FALSE for turn on/off the shortcode.
protected shortcodes ( ) : array
Результат array Shortcode array

wpdk_geo() публичный Метод

[wpdk_geo city="Rome"] Only for Rome [/wpdk_geo] [wpdk_geo city="rome"] Only for Rome [/wpdk_geo] [wpdk_geo city="rome,london"] Only for Rome and Landon [/wpdk_geo] [wpdk_geo region="lazio"] Only for region (Italy) Lazio [/wpdk_geo] [wpdk_geo country_code="IT"] Italian only [/wpdk_geo] [wpdk_geo country="italy"] Italian only [/wpdk_geo]
public wpdk_geo ( array $atts, string $content = null ) : boolean | string
$atts array Attribute into the shortcode
$content string Optional. $content HTML content
Результат boolean | string

wpdk_gist() публичный Метод

Return the GitHub include script Gist. Use [wpdk_gist id="762771662"]
public wpdk_gist ( array $atts, string $content = null ) : string
$atts array Attribute into the shortcode
$content string Optional. $content HTML content
Результат string

wpdk_is_user_logged_in() публичный Метод

roles - A list of roles string, comma separated. Eg: administrator, subscriber caps - A list of capabilities string, comma separated. Eg. read, level_0 emails - A list of emails string, comma separated. Eg. [email protected], [email protected] ids - A list of user id, comma separated. Eg. 12,13,14 For instance: [wpdk_is_user_logged_in roles='subscriber'] [wpdk_is_user_logged_in roles='subscriber' caps="adv_perm, adv_read"] [wpdk_is_user_logged_in emails='[email protected]' caps="adv_perm, adv_read"] [wpdk_is_user_logged_in ids='134']
public wpdk_is_user_logged_in ( array $atts, string $content = null ) : boolean | string
$atts array Attribute into the shortcode
$content string Optional. $content HTML content
Результат boolean | string

wpdk_is_user_not_logged_in() публичный Метод

Display a content of shortcode only if the user is NOT logged in.
public wpdk_is_user_not_logged_in ( array $attrs, string $content = null ) : boolean | string
$attrs array Attribute into the shortcode
$content string Optional. $content HTML content
Результат boolean | string