all repos — wp-flatexport @ 8f403a495418381e077e4fe5ce4cef72f21626db

adding filter for content before saving
Peter Molnar hello@petermolnar.eu
Thu, 14 Jul 2016 09:27:06 +0000
commit

8f403a495418381e077e4fe5ce4cef72f21626db

parent

50e58d78aafa5d7f3085b5defbc8b1473d6ccc34

1 files changed, 3 insertions(+), 6 deletions(-)

jump to
M wp-flatexport.phpwp-flatexport.php

@@ -28,7 +28,7 @@ */

namespace WP_FLATEXPORTS; -define ( 'force', false ); +define ( 'force', true ); define ( 'basedir', 'flat' ); define ( 'basefile', 'item.md' ); define ( 'maxattachments', 100 );

@@ -202,9 +202,6 @@ // first level header

$out .= str_repeat( "=", strlen( $postdata['title'] ) ) . "\n\n"; } - //if ( !empty ( $postdata['reactions'] ) ) - //$out .= $postdata['reactions'] . "\n\n"; - if (isset($postdata['excerpt']) && !empty($postdata['excerpt'])) $out .= $postdata['excerpt'] . "\n\n";

@@ -247,10 +244,10 @@ $out .= "Tags\n";

$out .= "----\n"; // these are hashtags, so escape the first one to avoid converting it into // a header - $out .= "\\" . $tags . "\n\n"; + $out .= "\\" . $tags; } - return $out; + return apply_filters ( 'wp_flatexport_post', $out, $post ); } /**