Skip to content

Conversation

@dashaluna
Copy link
Owner

#1

Copy link
Owner Author

Choose a reason for hiding this comment

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

Is this a good approach to include 3rd party plugins integrations?

@dashaluna
Copy link
Owner Author

I've noticed that if I specify element as <h3> i.e. with closing and opening tags in shortcake UI, then I get the following error in logs:
Unknown modifier 'p' in /hm-content-toc/includes/class-content-toc.php on line 151.

I wonder if it adds p autowrap and my regex isn't coping with it. Not sure how to tackle this one. Any suggestions, @tcrsavage :)

P.S. this is might be due to the fact that other PR that deal with escaping regex isn't merge yet. Ignore this and I'll double check this again after another PR is merged :)

Reference: Shortcake fixed it for 4.1, but it got broken again from 4.2 as WP made changes to MCE Views. wp-shortcake/shortcake#179

Update: Gonna leave this for now.. elements specified with <> will be regex escaped and won't match anything and will be skipped. Nothing breaks, just doesn't match them.

@tcrsavage
Copy link
Collaborator

@dashaluna looks fine to me. May want to consider an admin notice about the shortcake requirement if it's not installed.

@dashaluna
Copy link
Owner Author

@tcrsavage Hm, shortcake UI isn't a requirement really. It just does integration if that plugin is already present, otherwise it does nothing. I guess I can display a note saying if they know about shortcake and want to check it out... What do you think?

tcrsavage added a commit that referenced this pull request Apr 23, 2015
Added shortcake UI plugin integration
@tcrsavage tcrsavage merged commit faf3c3b into master Apr 23, 2015
@tcrsavage tcrsavage deleted the shortcake-integration branch April 23, 2015 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants