tomivar
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress 3.4 – Image align problemThis function was causing the problem in our theme.
/*
* Fix the extra 10 pixel width issue for image captions
*/
add_shortcode(‘wp_caption’, ‘fixed_img_caption_shortcode’);
add_shortcode(‘caption’, ‘fixed_img_caption_shortcode’);
function fixed_img_caption_shortcode($attr, $content = null) {
// Allow plugins/themes to override the default caption template.
$output = apply_filters(‘img_caption_shortcode’, ”, $attr, $content);
if ( $output != ” ) return $output;
extract(shortcode_atts(array(
‘id’=> ”,
‘align’ => ‘alignnone’,
‘width’ => ”,
‘caption’ => ”), $attr));
if ( 1 > (int) $width || empty($caption) )
return $content;
if ( $id ) $id = ‘id=”‘ . esc_attr($id) . ‘” ‘;
return ‘<div ‘ . $id . ‘class=”wp-caption ‘ . esc_attr($align)
. ‘” style=”width: ‘ . ((int) $width) . ‘px”>’
. do_shortcode( $content ) . ‘<p class=”wp-caption-text”>’
. $caption . ‘</p></div>’;
}Forum: Fixing WordPress
In reply to: sudden disappear of visual editorI have the same problem. Tried everything mentioned in this topic without any success.
Running: PHP Version 5.2.1
What does your tiny_mce_gzip.php?ver=20061113
look like when viewing it in the browser?I get a warning like this:
<b>Warning</b>: ob_start() [<a href='ref.outcontrol'>ref.outcontrol</a>]: output handler 'ob_gzhandler' cannot be used twice in <b>/home/2/l/landing/www/info/wp-includes/js/tinymce/tiny_mce_gzip.php</b> on line <b>142</b>