login_message filter not working

Man you really need to read the hooks docs https://codex.wordpress.org/Plugin_API/Action_Reference/wp_authenticate https://codex.wordpress.org/Plugin_API/Filter_Reference/login_message Wp_authenticate receives a parameter, also login_message, but instead of apply_filter you need to use add_filter to show the message something like this: add_action( ‘wp_authenticate’, array($this, ‘verify_token’), 30, 1); // even if you aren’t using the $username you need to declare it in the function … Read more

get_permalink() of page the enclosing page not posts

I think you need the get_post_type_archive_link function. It requires a post type as a parameter, but since you’re already on the archive page you should be able to use it in combination with get_post_type, which gets the current post type by default: $permalink = get_post_type_archive_link( get_post_type() ); See more on the Codex.

Insert Data into Database

You can handle that with sending the form to the script admin-post.php with that in the form : <form method=”POST” action=”<?php echo admin_url(“admin-post.php”);?>?action=myPlugin__save_datas”> after that, you use this hook for the PHP treatment add_action(“admin_init”, function () { if ( !isset($_POST[“action”]) || (“myPlugin__save_datas” !== $_POST[“action”]) ) { return; } // save datas // … // redirection … Read more

Headers already sent on custom plugin (Export function)

You are probably executing your process_bulk_action function in template where some html and headers are already sent. You have to use handle_bulk_actions-edit-post hook to execute your code before any content is sent. This might look something like that: function wpse_287406_register_export_option($bulk_actions) { $bulk_actions[‘export_csv’] = __( ‘Export to CSV’); return $bulk_actions; } add_filter( ‘bulk_actions-edit-post’, ‘wpse_287406_register_export_option’ ); function … Read more