Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support to Gutenberg #3

Closed
lotharthesavior opened this issue Feb 26, 2019 · 2 comments
Closed

Add Support to Gutenberg #3

lotharthesavior opened this issue Feb 26, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@lotharthesavior
Copy link
Contributor

@janboddez

I noticed, while testing the plugin, that it create posts that end up creating the default post content. We could add "links" in case the "block editor" is active in the WordPress instance.

Let me know if this is something that you consider for this plugin.

@janboddez janboddez added the enhancement New feature or request label Feb 27, 2019
@janboddez
Copy link
Owner

janboddez commented Feb 27, 2019

@lotharthesavior Yeah, supporting Gutenberg definitely makes sense. I'm not too familiar with it, yet... (Didn't even know there was a core/link block. Guess wrapping both paragraphs in Gutenberg HTML comments would suffice?)

'Classic' posts could be improved, too: the link text could be set to the web page title and links made clickable. (Right now the post content will simply be a description, if any—seriously, who ever adds one to their bookmarks anyway?—and/or a plain URL on a line of its own.)

@janboddez
Copy link
Owner

janboddez commented Mar 6, 2019

Added the wrapper bits, then took them out again and went with a filter hook. Anyone can now implement their own version of:

add_filter( 'import_bookmarks_post_content', function( $post_content, $bookmark, $post_type ) {
    // Somehow edit `$post_content`.
    return $post_content;
}, 10, 3 );

Add to functions.php or add-on plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants