Post Size Limit

In the following snippet, you’ll see all filters attached to the title, content & excerpt (from /wp-includes/default-filters.php). Try to remove in a first try only stuff like capital P dangit, smilies and such and if this doesn’t work, remove the more critical stuff. I’d only do this until the post saves and then move stuff out or wrap it into a if ( is_single( $post->ID ) ) statement to not trigger it elsewhere.

foreach ( array( 'the_content', 'the_title' ) as $filter )
    remove_filter( $filter, 'capital_P_dangit', 11 );

// Display filters
remove_filter( 'the_title', 'wptexturize'   );
remove_filter( 'the_title', 'convert_chars' );
remove_filter( 'the_title', 'trim'          );

remove_filter( 'the_content', 'wptexturize'        );
remove_filter( 'the_content', 'convert_smilies'    );
remove_filter( 'the_content', 'convert_chars'      );
remove_filter( 'the_content', 'wpautop'            );
remove_filter( 'the_content', 'shortcode_unautop'  );
remove_filter( 'the_content', 'prepend_attachment' );

remove_filter( 'the_excerpt',     'wptexturize'      );
remove_filter( 'the_excerpt',     'convert_smilies'  );
remove_filter( 'the_excerpt',     'convert_chars'    );
remove_filter( 'the_excerpt',     'wpautop'          );
remove_filter( 'the_excerpt',     'shortcode_unautop');
remove_filter( 'get_the_excerpt', 'wp_trim_excerpt'  );

Leave a Comment