Use admin-post to submit form data to external database

I’m answering this question to help future WordPress developers on their quest for knowledge. The answer is YES, you can connect to an external database when using the admin_post action. Below is the corrected source… <?php class x94 { private $externalDB01; public function __construct(){ add_action( ‘admin_post_submitForm9’, array( $this, ‘formHandling’ ), 11, 1 ); add_action( ‘plugins_loaded’, … Read more

TinyMCE 4.7.11 – Enable hidden WordPress core plugins? (referencing a wp-includes from plugin.php)

Am I right to think colorpicker is still supported and just disabled? Yes, it is still supported; however, it’s not disabled, and it’s actually loaded by default by WordPress, because the textcolor plugin (which is also loaded by default by WordPress) depends on the colorpicker plugin. I was hoping just adding the button would work. … Read more

Is it possible to create duplicate post on other site (either push, on publish, or pull, periodically)?

You could add a filter to the post publish process in site A. The filter would check for the tag/category, and if found, run a process to create a post in Site B. See https://codex.wordpress.org/Plugin_API/Action_Reference/save_post . Something like: add_action( ‘save_post’, ‘my_site_b_create_post’ ); function my_site_b_create_post($post_id) { // check for category // if category, then save content … Read more

Plugin json page

You can hook before the template is loaded and output page content directly: function wpd_output_json_page(){ if( is_page( ‘Page Json’ ) ){ global $post; echo $post->post_content; die; } } add_action( ‘template_redirect’, ‘wpd_output_json_page’ );