Hot answers tagged plugins
2
There is bit of special filtering by WP_Embed class that turns standalone links into target for embedding:
/**
* Passes any unlinked URLs that are on their own line to {@link WP_Embed::shortcode()} for potential embedding.
*
* @uses WP_Embed::autoembed_callback()
*
* @param string $content The content to be searched.
* @return string Potentially ...
2
is_plugin_active() expects just the base name of the plugin as parameter:
So use:
is_plugin_active( 'woocommerce/woocommerce.php' );
The function will use the option 'active_plugins' which is a list of plugins paths relative to the plugin directory already.
On a multi-site installation it will search in get_site_option( 'active_sitewide_plugins') too.
...
2
This question is borderline "not constructive", because it's going to solicit opinion rather than objective fact or expertise.
That said: my opinion is:
By default the Plugin should not touch user-generated content
It would be considerate to offer a "delete content" checkbox option at uninstall
1
Are you adding the shortcode to the ACF custom field? If so, you have to run the content filter on it so that it parses shortcodes.
Fortunately ACF has the option to do this with its WYSIWYG fields. Simply select "Run filter "the_content"?" in the field options.
1
I don't quite know what you mean by "include a theme" and you are talking about a potentially large and complicated project but I think you should be able to control the display of your plugin content with the template_redirect hook.
function template_redir_wpse_99209($content) {
// code or file include, for example
// exit;
}
...
Only top voted, non community-wiki answers of a minimum length are eligible