function sdm_get_item_description_output($id)
{
    $item_description = get_post_meta($id, 'sdm_description', true);
    $isset_item_description = isset($item_description) && !empty($item_description) ? $item_description : '';
    //$isset_item_description = apply_filters('the_content', $isset_item_description);
    $isset_item_description = do_shortcode($isset_item_description);
    $isset_item_description = wptexturize($isset_item_description);
    $isset_item_description = convert_smilies($isset_item_description);
    $isset_item_description = convert_chars($isset_item_description);
    $isset_item_description = wpautop($isset_item_description);
    $isset_item_description = shortcode_unautop($isset_item_description);
    $isset_item_description = prepend_attachment($isset_item_description);
    return $isset_item_description;
}
Esempio n. 2
0
 /**
  * prepare the ads frontend output
  *
  * @param obj $ad ad object
  * @return str $content ad content prepared for frontend output
  * @since 1.0.0
  */
 public function prepare_output($ad)
 {
     // apply functions normally running through the_content filter
     // the_content filter not used here because it created an infinite loop (ads within ads)
     $output = wptexturize($ad->content);
     $output = convert_smilies($output);
     $output = convert_chars($output);
     $output = wpautop($output);
     $output = shortcode_unautop($output);
     $output = do_shortcode($output);
     $output = prepend_attachment($output);
     return $output;
 }
 /**
  * prepare the ads frontend output
  *
  * @param obj $ad ad object
  * @return str $content ad content prepared for frontend output
  * @since 1.0.0
  */
 public function prepare_output($ad)
 {
     // apply functions normally running through the_content filter
     // the_content filter is not used here because it created an infinite loop (ads within ads for "before content" and other auto injections)
     // maybe the danger is not here yet, but changing it to use the_content filter changes a lot
     $output = $ad->content;
     $output = wptexturize($output);
     $output = convert_smilies($output);
     $output = convert_chars($output);
     $output = wpautop($output);
     $output = shortcode_unautop($output);
     $output = do_shortcode($output);
     $output = prepend_attachment($output);
     // make included images responsive, since WordPress 4.4
     if (!defined('ADVADS_DISABLE_RESPONSIVE_IMAGES') && function_exists('wp_make_content_images_responsive')) {
         $output = wp_make_content_images_responsive($output);
     }
     return $output;
 }
Esempio n. 4
0
 function _format_content($content)
 {
     if ('yes' == builder_get_theme_setting('widget_content_the_content_filter')) {
         return apply_filters('the_content', $content);
     }
     $content = wptexturize($content);
     $content = convert_smilies($content);
     $content = convert_chars($content);
     $content = wpautop($content);
     $content = shortcode_unautop($content);
     $content = prepend_attachment($content);
     $content = do_shortcode($content);
     return $content;
 }
Esempio n. 5
0
 /**
  * prepare the ads frontend output
  *
  * @param obj $ad ad object
  * @return str $content ad content prepared for frontend output
  * @since 1.0.0
  */
 public function prepare_output($ad)
 {
     // apply functions normally running through the_content filter
     // the_content filter is not used here because it created an infinite loop (ads within ads for "before content" and other auto injections)
     // maybe the danger is not here yet, but changing it to use the_content filter changes a lot
     $output = $ad->content;
     $output = wptexturize($output);
     $output = convert_smilies($output);
     $output = convert_chars($output);
     $output = wpautop($output);
     $output = shortcode_unautop($output);
     $output = do_shortcode($output);
     $output = prepend_attachment($output);
     return $output;
 }
 static function get_static_content($args = array())
 {
     $default = array('id' => false, 'post_type' => 'static_block', 'class' => '', 'title' => '', 'showtitle' => false, 'titletag' => 'h3');
     $args = (object) array_merge($default, $args);
     // Find the page data
     if (!empty($args->id)) {
         // Get content by ID or slug
         $id = $args->id;
         $id = !is_numeric($id) ? get_ID_by_slug($id, $args->post_type) : $id;
         // Get the page contenet
         $page_data = get_page($id);
     } else {
         $page_data = null;
     }
     // Format and return data
     if (is_null($page_data)) {
         return '<!-- [No arguments where provided or the values did not match an existing static block] -->';
     } else {
         // The content
         $content = $page_data->post_content;
         $content = apply_filters('static_content', $content);
         // NOTE: This entire section could be setup as a filter.
         if (get_post_meta($id, 'content_filters', true) == 'all') {
             // Apply all WP content filters, including those added by plugins.
             // This can still have autop turned off with our internal filter.
             $GLOBALS['wpautop_post'] = $page_data;
             // not default $post so global variable used by wpautop_disable(), if function exists
             $content = apply_filters('the_content', $content);
         } else {
             // Only apply default WP filters. This is the safe way to add basic formatting without any plugin injected filters
             $content = wptexturize($content);
             $content = convert_smilies($content);
             $content = convert_chars($content);
             if (get_post_meta($id, 'wpautop', true) == 'on') {
                 // (!wpautop_disable($id)) {
                 $content = wpautop($content);
                 // Add paragraph tags.
             }
             $content = shortcode_unautop($content);
             $content = prepend_attachment($content);
             $content = do_shortcode($content);
         }
         $class = !empty($args->class) ? trim($args->class) : '';
         $content = '<div id="static-content-' . $id . '" class="static-content ' . $class . '">' . $content . '</div>';
         // The title
         if (!empty($args->title)) {
             $title = $args->title;
             $showtitle = true;
         } else {
             $title = $page_data->post_title;
             $showtitle = $args->showtitle;
         }
         if ($showtitle) {
             $content = '<' . $args->titletag . ' class="static-content-title page-title">' . $page_data->post_title . '</' . $args->titletag . '>' . $content;
         }
         // Return content
         return $content;
     }
 }
Esempio n. 7
0
 public static function wpcf_access_do_shortcode_content($content, $raw)
 {
     if (function_exists('WPV_wpcf_record_post_relationship_belongs')) {
         $content = WPV_wpcf_record_post_relationship_belongs($content);
     }
     if (class_exists('WPV_template')) {
         global $WPV_templates;
         $content = $WPV_templates->the_content($content);
     }
     if (isset($GLOBALS['wp_embed'])) {
         global $wp_embed;
         $content = $wp_embed->run_shortcode($content);
         $content = $wp_embed->autoembed($content);
     }
     if (function_exists('wpv_resolve_internal_shortcodes')) {
         $content = wpv_resolve_internal_shortcodes($content);
     }
     if (function_exists('wpv_resolve_wpv_if_shortcodes')) {
         $content = wpv_resolve_wpv_if_shortcodes($content);
     }
     $content = convert_smilies($content);
     //Enable wpautop if raw = false
     if ($raw == 'false') {
         $content = wpautop($content);
     }
     $content = shortcode_unautop($content);
     $content = prepend_attachment($content);
     $content = do_shortcode($content);
     $content = capital_P_dangit($content);
     return $content;
 }
Esempio n. 8
0
/**
 * Replace the default get_the_content, managing better the shortcodes
 * 
 * @param string $str The string to convert
 * @return string The string converted   
 * 
 * @since 1.0                
 */
function yiw_clean_text($str)
{
    $str = yiw_addp($str);
    $str = prepend_attachment($str);
    return $str;
}
 /**
  * エディターで入力された値をコンバートする
  *
  * @param $name カスタムフィールドの名前
  */
 protected function convert_custom_field_editor($content)
 {
     $content = wptexturize($content);
     $content = convert_smilies($content);
     $content = convert_chars($content);
     $content = wpautop($content);
     $content = shortcode_unautop($content);
     $content = prepend_attachment($content);
     $content = do_shortcode($content);
     return $content;
 }
 function filter_evo_content($str)
 {
     $str = wptexturize($str);
     $str = convert_smilies($str);
     $str = convert_chars($str);
     $str = wpautop($str);
     $str = shortcode_unautop($str);
     $str = prepend_attachment($str);
     $str = do_shortcode($str);
     return $str;
 }
 function theme_get_page($id, $title = false)
 {
     global $post, $tempPost;
     if (!$id) {
         return false;
     }
     // Get the page contenet
     $page_data = get_page($id);
     if ($page_data == null) {
         $page_data = $post;
     }
     $content = $page_data->post_content;
     // get the content
     // Apply filters
     if (get_meta('content_filters', $id) == 'All Content Filters') {
         // This option applies all content filters, including those added by plugins. It still makes use of the filters in Theme Settings
         $tempPost = $page_data;
         // Used as global variable in 'the_content' filters
         $content = apply_filters('the_content', $content);
         // run remaining Wordpress filters such as paragraph tags.
         unset($GLOBALS['tempPost']);
     } else {
         // Only apply default WP filters. This is the safe way to go so we don't risk any plugin injection/overrides of 'the_content'
         $content = wptexturize($content);
         $content = convert_smilies($content);
         $content = convert_chars($content);
         if (!wpautop_filter($id)) {
             $content = wpautop($content);
             // Add paragraph tags.
         }
         $content = shortcode_unautop($content);
         $content = prepend_attachment($content);
         $content = do_shortcode($content);
     }
     // Get title, add to output<br />
     if ($title) {
         $content = '<h3 class="content_static pageTitle">' . $page_data->post_title . '</h3>' . $content;
     }
     // Apply function specific
     $content = apply_filters('theme_get_page', $content, $id);
     return $content;
 }
 function get_content_for_layout($id, $title = false)
 {
     global $bbpress;
     if (!$id) {
         return false;
     }
     // Get the page contenet
     $page_data = get_post($id);
     $content = $page_data->post_content;
     // get the content
     if ($page_data->post_type == 'forum') {
         $forum_id = $id;
         $content = empty($bbpress['context']) ? "[bbp-single-forum id={$forum_id}]" : $bbpress['context'];
     }
     // Apply only default filters. This is the safe way, not
     // risking plugin injection/overrides of 'the_content'
     $content = wptexturize($content);
     $content = convert_smilies($content);
     $content = convert_chars($content);
     if (!wpautop_disable($id)) {
         $content = wpautop($content);
         // Add paragraph tags.
     }
     $content = shortcode_unautop($content);
     $content = prepend_attachment($content);
     $content = do_shortcode($content);
     // Get title, add to output<br />
     if ($title) {
         $content = '<h3 class="layout-block-title page-title">' . $page_data->post_title . '</h3>' . $content;
     }
     // Apply function specific
     $content = apply_filters('get_content_for_layout', $content, $id);
     return $content;
 }
Esempio n. 13
0
function get_content($avoidPluginFilters = false, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '')
{
    $content = get_the_content($more_link_text, $stripteaser, $more_file);
    if ($avoidPluginFilters) {
        $content = wptexturize($content);
        $content = convert_smilies($content);
        $content = convert_chars($content);
        $content = wpautop($content);
        $content = shortcode_unautop($content);
        $content = prepend_attachment($content);
    } else {
        $content = apply_filters('the_content', $content);
    }
    $content = str_replace(']]>', ']]&gt;', $content);
    return $content;
}
Esempio n. 14
0
function ht_content_formatter($str)
{
    $str = ht_autop($str);
    $str = prepend_attachment($str);
    return $str;
}
Esempio n. 15
0
 /**
  * デフォルトで the_content に適用される関数を適用
  *
  * @param string $value
  * @return string
  */
 protected function add_the_content_filter($value)
 {
     if (has_filter('the_content', 'wptexturize')) {
         $value = wptexturize($value);
     }
     if (has_filter('the_content', 'convert_smilies')) {
         $value = convert_smilies($value);
     }
     if (has_filter('the_content', 'convert_chars')) {
         $value = convert_chars($value);
     }
     if (has_filter('the_content', 'wpautop')) {
         $value = wpautop($value);
     }
     if (has_filter('the_content', 'shortcode_unautop')) {
         $value = shortcode_unautop($value);
     }
     if (has_filter('the_content', 'prepend_attachment')) {
         $value = prepend_attachment($value);
     }
     return $value;
 }
Esempio n. 16
0
 function filter_evo_content($str)
 {
     global $wp_embed;
     if (empty($this->evo_options['evo_content_filter']) || $this->evo_options['evo_content_filter'] == 'evo') {
         $str = $wp_embed->autoembed($str);
         $str = wptexturize($str);
         $str = convert_smilies($str);
         $str = convert_chars($str);
         $str = wpautop($str);
         $str = shortcode_unautop($str);
         $str = prepend_attachment($str);
         $str = do_shortcode($str);
         return $str;
     } elseif ($this->evo_options['evo_content_filter'] == 'def') {
         return apply_filters('the_content', $str);
     } else {
         // no filter at all
         return $str;
     }
 }
Esempio n. 17
0
 /**
  * Replace the default get_the_content, managing better the shortcodes
  * 
  * @param string $str The string to convert
  * @return string The string converted   
  * 
  * @since 1.0                
  */
 function yit_clean_text($str)
 {
     $str = yit_addp(stripslashes($str));
     $str = prepend_attachment($str);
     return $str;
 }
Esempio n. 18
0
		function wm_default_content_filters( $content ) {
			/*
			Default filters WordPress apply on "the_content" (from "wp-includes/default-filters.php"):
			add_filter( 'the_content', 'wptexturize'        );
			add_filter( 'the_content', 'convert_smilies'    );
			add_filter( 'the_content', 'convert_chars'      );
			add_filter( 'the_content', 'wpautop'            );
			add_filter( 'the_content', 'shortcode_unautop'  );
			add_filter( 'the_content', 'prepend_attachment' );.
			*/

			$content = wptexturize( $content );
			$content = convert_smilies( $content );
			$content = convert_chars( $content );
			$content = do_shortcode( $content );
			$content = wpautop( $content );
			$content = shortcode_unautop( $content );
			$content = prepend_attachment( $content );

			return $content;
		}
Esempio n. 19
0
/**
 * Filters the post excerpt for the embed template.
 *
 * Shows players for video and audio attachments.
 *
 * @since 4.4.0
 *
 * @param string $content The current post excerpt.
 * @return string The modified post excerpt.
 */
function wp_embed_excerpt_attachment($content)
{
    if (is_attachment()) {
        return prepend_attachment('');
    }
    return $content;
}
function ym_apply_filter_the_content($content)
{
    $content = wptexturize($content);
    $content = convert_smilies($content);
    $content = convert_chars($content);
    $content = wpautop($content);
    $content = shortcode_unautop($content);
    $content = prepend_attachment($content);
    $content = do_shortcode($content);
    return $content;
}