本文整理汇总了PHP中remove_all_shortcodes函数的典型用法代码示例。如果您正苦于以下问题:PHP remove_all_shortcodes函数的具体用法?PHP remove_all_shortcodes怎么用?PHP remove_all_shortcodes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了remove_all_shortcodes函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gdlr_fix_shortcodes
function gdlr_fix_shortcodes($content)
{
global $shortcode_tags;
// Backup current registered shortcodes and clear them all out
$orig_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
add_shortcode('gdlr_text_align', 'gdlr_text_align_shortcode');
add_shortcode('gdlr_button', 'gdlr_button_shortcode');
add_shortcode('gdlr_heading', 'gdlr_heading_shortcode');
add_shortcode('gdlr_divider', 'gdlr_divider_shortcode');
add_shortcode('gdlr_circle_progress', 'gdlr_circle_progress_shortcode');
add_shortcode('gdlr_stunning_text', 'gdlr_stunning_text_shortcode');
add_shortcode('gdlr_skill_bar', 'gdlr_skill_bar_shortcode');
add_shortcode('gdlr_row', 'gdlr_row_shortcode');
add_shortcode('gdlr_column', 'gdlr_column_shortcode');
add_shortcode('gdlr_frame', 'gdlr_frame_shortcode');
add_shortcode('gdlr_image_link', 'gdlr_image_link_shortcode');
add_shortcode('gdlr_space', 'gdlr_space_shortcode');
add_shortcode('gdlr_quote', 'gdlr_quote_shortcode');
add_shortcode('gdlr_dropcap', 'gdlr_dropcap_shortcode');
add_shortcode('gdlr_icon', 'gdlr_icon_shortcode');
add_shortcode('gdlr_notification', 'gdlr_notification_shortcode');
add_shortcode('gdlr_box_icon', 'gdlr_box_icon_shortcode');
add_shortcode('gdlr_styled_box', 'gdlr_styled_box_shortcode');
add_shortcode('gdlr_blog', 'gdlr_blog_shortcode');
add_shortcode('gdlr_portfolio', 'gdlr_portfolio_shortcode');
add_shortcode('gdlr_code', 'gdlr_code_shortcode');
// Do the shortcode (only the one above is registered)
$content = do_shortcode($content);
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
return $content;
}
示例2: add_wpseo_xml_sitemap_images
/**
* Filter support for WordPress SEO by Yoast 0.4.0 or higher ( http://wordpress.org/extend/plugins/wordpress-seo/ )
*
* @param array $images
* @param int $post_id
*
* @return array $image list of all founded images
*/
function add_wpseo_xml_sitemap_images($images, $post_id)
{
global $gmGallery, $gmCore;
$this->images = $images;
// first get the content of the post/page
$p = get_post($post_id);
$content = $p->post_content;
// Don't process the images in the normal way
remove_all_shortcodes();
add_shortcode('gmedia', 'gmedia_shortcode');
add_shortcode('gm', 'gmedia_term_shortcode');
// Search now for shortcodes
do_shortcode($content);
if (isset($gmGallery->shortcode['gmedia'])) {
foreach ($gmGallery->shortcode['gmedia'] as $termitems) {
foreach ($termitems as $item) {
$newimage = array();
$newimage['src'] = $gmCore->gm_get_media_image($item, 'web');
if (!empty($item->title)) {
$newimage['title'] = strip_tags($item->title);
}
if (!empty($item->description)) {
$newimage['alt'] = strip_tags($item->description);
}
$this->images[] = $newimage;
}
}
}
return $this->images;
}
示例3: get_unformatted_shortcode_blocks
/**
* Process the [rawr] shortcode in priority 8.
*
* Since the [rawr] shortcode needs to be run earlier than other shortcodes,
* this function removes all existing shortcodes, uses the shortcode parser to grab all [raw blocks],
* calls {@link do_shortcode()}, and then re-registers the old shortcodes.
*
* @uses $shortcode_tags
* @uses remove_all_shortcodes()
* @uses add_shortcode()
* @uses do_shortcode()
*
* @param string $content Content to parse
* @return string Content with shortcode parsed
*/
function get_unformatted_shortcode_blocks($content)
{
global $shortcode_tags;
// Back up current registered shortcodes and clear them all out
$orig_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
// my_shortcode_handler1(), below, saves the raw blocks into $this->unformatted_shortcode_blocks[]
add_shortcode('rawr', array(&$this, 'my_shortcode_handler1'));
// Put all our shortcodes back and run them, all except 'mysitePortfolio' & 'mysiteImages'
foreach (mysite_shortcodes() as $shortcodes) {
$class = 'mysite' . ucfirst(preg_replace('/[0-9-_]/', '', str_replace('.php', '', $shortcodes)));
$button = new mysiteButtons();
$class_methods = get_class_methods($class);
if ($class == 'mysitePortfolio' || $class == 'mysiteImages') {
continue;
}
foreach ($class_methods as $shortcode) {
if ($shortcode[0] != '_' && $class != 'mysiteLayouts') {
add_shortcode($shortcode, array($class, $shortcode));
}
}
}
// Do the shortcode (only the [rawr] shortcode and our core shortcodes are now registered)
$content = do_shortcode($content);
// Put the original shortcodes back for normal processing at priority 11
$shortcode_tags = $orig_shortcode_tags;
return $content;
}
示例4: add_wpseo_xml_sitemap_images
/**
* Filter support for WordPress SEO by Yoast 0.4.0 or higher ( http://wordpress.org/extend/plugins/wordpress-seo/ )
*
* @param array $images
* @param int $post_id
*
* @return array $image list of all founded images
*/
function add_wpseo_xml_sitemap_images($images, $post_id)
{
global $gmGallery, $gmCore, $gmDB;
$this->images = $images;
// first get the content of the post/page
$p = get_post($post_id);
$content = $p->post_content;
// Don't process the images in the normal way
remove_all_shortcodes();
add_shortcode('gmedia', 'gmedia_shortcode');
add_shortcode('gm', 'gmedia_term_shortcode');
// Search now for shortcodes
do_shortcode($content);
if (count($gmGallery->shortcode)) {
foreach ($gmGallery->shortcode as $gmedia_shortcode) {
$query = array_merge($gmedia_shortcode['query'], array('status' => 'publish', 'mime_type' => 'image'));
$gmedias = $gmDB->get_gmedias($query);
foreach ($gmedias as $item) {
$newimage = array();
$newimage['src'] = $gmCore->gm_get_media_image($item, 'web');
if (!empty($item->title)) {
$newimage['title'] = strip_tags($item->title);
}
if (!empty($item->description)) {
$newimage['alt'] = strip_tags($item->description);
}
$this->images[] = $newimage;
}
}
}
return $this->images;
}
示例5: gg_run_shortcode
function gg_run_shortcode($content)
{
global $shortcode_tags;
// Backup current registered shortcodes and clear them all out
$orig_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
add_shortcode('one_half', 'one_half');
add_shortcode('one_half_last', 'one_half_last');
add_shortcode('one_third', 'one_third');
add_shortcode('one_third_last', 'one_third_last');
add_shortcode('two_third', 'two_third');
add_shortcode('two_third_last', 'two_third_last');
add_shortcode('one_fourth', 'one_fourth');
add_shortcode('one_fourth_last', 'one_fourth_last');
add_shortcode('three_fourth', 'three_fourth');
add_shortcode('three_fourth_last', 'three_fourth_last');
add_shortcode('one_fifth', 'one_fifth');
add_shortcode('one_fifth_last', 'one_fifth_last');
add_shortcode('two_fifth', 'two_fifth');
add_shortcode('two_fifth_last', 'two_fifth_last');
add_shortcode('three_fifth', 'three_fifth');
add_shortcode('three_fifth_last', 'three_fifth_last');
add_shortcode('four_fifth', 'four_fifth');
add_shortcode('four_fifth_last', 'four_fifth_last');
add_shortcode('one_sixth', 'one_sixth');
add_shortcode('one_sixth_last', 'one_sixth_last');
add_shortcode('five_sixth', 'five_sixth');
add_shortcode('five_sixth_last', 'five_sixth_last');
// Do the shortcode
$content = do_shortcode($content);
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
return $content;
}
示例6: createShortCodes
public function createShortCodes()
{
remove_all_shortcodes();
foreach (SPBMap::getShortCodes() as $sc_base => $el) {
$name = 'SwiftPageBuilderShortcode_' . $el['base'];
if (class_exists($name) && is_subclass_of($name, 'SwiftPageBuilderShortcode')) {
$this->shortcodes[$sc_base] = new $name($el);
}
}
}
示例7: createShortCodes
public function createShortCodes()
{
remove_all_shortcodes();
foreach (WPBMap::getShortCodes() as $sc_base => $el) {
$name = 'WPBakeryShortCode_' . $el['base'];
if (class_exists($name) && is_subclass_of($name, 'WPBakeryShortCode')) {
$this->shortcodes[$sc_base] = new $name($el);
}
}
$this->createColumnShortCode();
}
示例8: idz_run_shortcode
function idz_run_shortcode($content)
{
global $shortcode_tags;
// Backup current registered shortcodes and clear them all out
$orig_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
add_shortcode('idz_row', 'indonez_func_row');
add_shortcode('idz_col_full', 'indonez_func_col_full');
add_shortcode('idz_col_12', 'indonez_func_col_12');
add_shortcode('idz_col_13', 'indonez_func_col_13');
add_shortcode('idz_col_14', 'indonez_func_col_14');
add_shortcode('idz_col_16', 'indonez_func_col_16');
add_shortcode('idz_col_23', 'indonez_func_col_23');
add_shortcode('idz_col_34', 'indonez_func_col_34');
add_shortcode('idz_col_125_3', 'indonez_func_col_125_3');
add_shortcode('idz_col_275_3', 'indonez_func_col_275_3');
add_shortcode('idz_spacer', 'indonez_func_spacer');
add_shortcode('idz_button', 'indonez_func_button');
add_shortcode('idz_alert', 'indonez_func_alert');
add_shortcode('idz_toggle', 'indonez_func_toggle');
add_shortcode('idz_accordion', 'indonez_func_accordion');
add_shortcode('idz_tab', 'indonez_func_tab');
add_shortcode('idz_div', 'indonez_func_div_html');
add_shortcode('idz_end_div', 'indonez_func_div_closed_html');
add_shortcode('idz_dropcap', 'indonez_func_drop_cap');
add_shortcode('idz_pullquote', 'indonez_func_pullquote');
add_shortcode('idz_table', 'indonez_func_table');
add_shortcode('idz_paragraph', 'indonez_func_paragraph_text');
add_shortcode('idz_highlight', 'indonez_func_highlight_text');
add_shortcode('idz_pricing', 'indonez_func_pricing_table_shortcode');
add_shortcode('idz_pricing_item', 'indonez_func_pricing_shortcode');
add_shortcode('idz_custom_heading', 'indonez_func_custom_heading');
add_shortcode('idz_list', 'indonez_func_list_style');
add_shortcode('idz_progress_bar', 'indonez_func_progress_bar');
add_shortcode('idz_note', 'indonez_func_note');
add_shortcode('idz_icon', 'indonez_func_icons');
add_shortcode("idz_video", "indonez_func_video");
add_shortcode('idz_promobox', 'indonez_func_promobox');
add_shortcode('idz_testimonial_carousel', 'indonez_func_carousel_testimonial');
add_shortcode('idz_team_list', 'indonez_func_team_list_shortcode');
add_shortcode('idz_client_list', 'indonez_func_client_list_shortcode');
add_shortcode('idz_portfolio', 'indonez_func_recent_portfolio_shortcode');
add_shortcode('idz_portfolio_carousel', 'indonez_func_recent_portfolio_carousel_shortcode');
add_shortcode('idz_twitter', 'indonez_func_twitter');
add_shortcode('idz_wrapbox', 'indonez_func_wrapbox');
add_shortcode('idz_blogpost', 'indonez_func_blogposts');
add_shortcode('idz_gmap', 'indonez_func_shortcode_googlemap');
// Do the shortcode (only the one above is registered)
$content = do_shortcode($content);
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
return $content;
}
示例9: run_shortcodes
/**
* Run a shortcode in a clean way
*
* @param unknown $content Wordpress Post Content
* @return $content The Processed Content
*/
public function run_shortcodes($content)
{
global $shortcode_tags;
$original_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
foreach ($this->protected_shortcodes as $shortcode) {
add_shortcode($this->prefix . $shortcode, array('Pure_ML', $shortcode));
}
// Do only Pure_Shortcodes!
$content = do_shortcode($content);
$shortcode_tags = $original_shortcode_tags;
return $content;
}
示例10: run_shortcode
/**
* Process the [embed] shortcode.
*
* Since the [embed] shortcode needs to be run earlier than other shortcodes,
* this function removes all existing shortcodes, registers the [embed] shortcode,
* calls {@link do_shortcode()}, and then re-registers the old shortcodes.
*
* @global array $shortcode_tags
*
* @param string $content Content to parse
* @return string Content with shortcode parsed
*/
public function run_shortcode($content)
{
global $shortcode_tags;
// Back up current registered shortcodes and clear them all out
$orig_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
add_shortcode('embed', array($this, 'shortcode'));
// Do the shortcode (only the [embed] one is registered)
$content = do_shortcode($content, true);
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
return $content;
}
示例11: vw_do_shortcode
function vw_do_shortcode($content)
{
global $shortcode_tags;
// Backup current registered shortcodes and clear them all out
$orig_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
vw_register_shortcodes();
// Do the shortcode (only the one above is registered)
$content = do_shortcode($content);
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
return $content;
}
示例12: process_shortcodes
function process_shortcodes($content)
{
global $shortcode_tags;
// Backup current registered shortcodes and clear them all out
$orig_shortcode_tags = $shortcode_tags;
$shortcode_tags = array();
remove_all_shortcodes();
$this->add_shortcodes();
// Do the shortcode (only the one above is registered)
$content = do_shortcode($content);
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
return $content;
}
示例13: do_grid_shortcodes
/**
* Process all grid shortcodes
* 'the_content' filter callback
* Only renders grid markup.
*/
static function do_grid_shortcodes($content)
{
global $shortcode_tags;
// backup
$_shortcode_tags = $shortcode_tags;
// clear
remove_all_shortcodes();
// add
self::add_shortcodes();
// do
$content = do_shortcode($content);
// restore
$shortcode_tags = $_shortcode_tags;
return $content;
}
示例14: kimili_shortcode_hack
function kimili_shortcode_hack($content)
{
global $shortcode_tags;
// Backup current registered shortcodes and clear them all out
$orig_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
// Register all of this plugin's shortcodes
add_shortcode('kml_flashembed', 'kml_flash_shortcode');
add_shortcode('kml_swfembed', 'kml_flash_shortcode');
// Do the shortcodes (only this plugins's are registered)
$content = do_shortcode($content);
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
return $content;
}
示例15: dt_run_puny_shortcode
/**
* Actual processing of the shortcode happens here.
*/
function dt_run_puny_shortcode($content)
{
global $shortcode_tags;
// Backup current registered shortcodes and clear them all out
$orig_shortcode_tags = $shortcode_tags;
remove_all_shortcodes();
foreach (dt_get_puny_shortcodes() as $shortcode => $callback) {
add_shortcode($shortcode, $callback);
}
// Do the shortcode (only the one above is registered)
$content = do_shortcode(shortcode_unautop($content));
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
return $content;
}