WP-Automatic to run publish hooks
WP-Automatic to run publish hooks
WP-Automatic to run publish hooks
I was able to solve my problem by calling set_post_format in my save_post callback and making sure to check if its set and not equal to the “no change” option. Not sure if this is the best way to go, but it works. require( plugin_admin_dir . ‘plugin-sync.php’ ); add_action( ‘save_post’, ‘savethepost’, 2000); function savethepost($post_id) { … Read more
I eventually solved this with a slightly different approach. This allows users to include images in their comments. One issue I’m still having, which is really a whole new question, but worth mentioning here, is that the user may not be allowed to upload new images to the post, and only include images already in … Read more
Function Hooked on Init Running Multiple Times
I fixed my problem with a button to update all the prices in one time.
How to resolve 500 error in post listing page?
Sorry for this question, I founded the solution, now I know that i’m a dummy. if($_GET[‘action’] == ‘edit’) for everyone has my same drama. (the question remains open for better suggestions about doing that, in the best and most secure way) Tank you for any suggestion.
SOLVED by somebody: “if my form pointed to a directory: http://example.com/wordpress then my POST data disappeared and $_POST was empty. If I pointed to a specific file: http://example.com/wordpress/index.php Then it worked properly.” ps: God bless him. 🙂
That depends on whether your plugin is written in a procedural or object oriented style. register_activation_hook is what you want. https://codex.wordpress.org/Function_Reference/register_activation_hook How exactly you incorporate it depends on your plugin coding style. Examples listed in the Codex show multiple approaches. Procedural example: If you have a function called myplugin_activate() in the main plugin file at … Read more
Execute code only after user clicks ‘update’ button for CPT being edited