Skip to content

Add medium_post_content filter#120

Open
tangrufus wants to merge 2 commits intoMedium:masterfrom
tangrufus:add-medium-post-content-filter
Open

Add medium_post_content filter#120
tangrufus wants to merge 2 commits intoMedium:masterfrom
tangrufus:add-medium-post-content-filter

Conversation

@tangrufus
Copy link

Add medium_post_content filter in Medium_Admin::_prepare_content.

@tangrufus
Copy link
Author

Allow developers to customise content posted to medium.
Possible solution to #118 and #84


$post_content = apply_filters( 'medium_post_content', $post_content, $post );

$post_content = do_shortcode(wpautop($post->post_content));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like this will apply do_shortcode and wpautop twice, after either lines 1050 or 1054?

$post_content = do_shortcode(wpautop($post->post_content));
}

$post_content = apply_filters( 'medium_post_content', $post_content, $post );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is off and could you please follow the spacing code-style of the rest of the plugin (even though it's not WP-standard).

@@ -1,5 +1,5 @@
=== Medium ===
Contributors: mediumdotcom, majelbstoat, huckphin, amyquispe
Contributors: mediumdotcom, majelbstoat, huckphin, amyquispe, tangrufus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this, as I believe it will give you access to publish and edit new public versions of the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants