OK. So the solution for now is to add an action to the admin_post method in the boilerplate
$this->loader->add_action( 'admin_post_generate_reservation', $plugin_shared, 'generate_reservation_file' );
and then in the shared class
public function generate_reservation_file(){
//code here
}
the link in the front and backend
<a href="https://wordpress.stackexchange.com/questions/248775/<?php echo esc_url( admin_url("admin-post.php') ); ?>?action=generate_reservation&id=<?php echo $_GET['profil'] ?>" target="_blank"><strong>text</strong></a>
Related Posts:
- is_plugin_active function doesn’t exist
- How can I find plugins’ slug?
- How to call a plugin function from index.php
- My custom made plugin has “a new version available” which links to unrelated plugin
- wp.media update options and force render on uploader
- Where can I find a schema of wordpress plugin core architecture?
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- WordPress Plugin Development from Scratch. How? [closed]
- How Does WordPress Uninclude/Deactivate A Plugin?
- How to fetch serialized data from wordpress options
- Passing URL parameters to WordPress pages and pretty url
- WordPress network: set themes and plugins for new blog
- How to get the custom page get_permalink?
- Plugin translations problem
- How can I add a custom meta value on file upload?
- Advanced Custom Fields into functions.php
- How ( and mostly at what time ) can i prevent the alternate cron from running?
- What is the function to get plugin base url in multisite?
- Admin-ajax.php is dying “0” without processing function
- How do I register a stylesheet inside a WordPress widget?
- WordPress register_activation_hook table creation not working
- Add a Custom Permalink option in the Permalink Admin Screen?
- How to remove an Ajax action
- nonces in custom oop plugin
- Has anyone used require.js for handling plugin scripts?
- publish_post plugin hook doesn’t always pass $post->post_content
- Multiple files in a plugin
- Wp die causing 500 Internal Server Error?
- adding a new value to a serialized array in WP_option table
- Redirect to a welcome page after updating plugin
- Write to / remove from default .htaccess file from plugin?
- What is the best way to mimic a search query within a plugin
- Remove rewrite rules generated by plugin during deactivation
- Programatically download a plugin
- Call to a member function have_posts() on a non-object on normal loop
- Archive – same title for the first two posts
- Creating plugin using simple_html_dom parser?
- Not able to add option in Sub-Menu under page
- link bbpress forum discussion to blogposts
- wp.media javascript issue with on select
- jQuery for custom plugin not working with Divi theme
- How to inform the user that the save was not successful?
- php page not found for plugin options menu
- Creating shortcodes in plugin
- Change plugin name on WordPress repo
- Create a plugin from within WordPress
- Class variables not correct on page
- Are plugins instantiated on every request to WordPress?
- Render content of multiple pages and their descendants
- Why am I unable to load scripts in head in plugin?
- adding a button to the media uploader
- How do I add $_SESSION[”] to my wordpress page?
- Plugin Activation Error – The plugin generated 22 characters of unexpected output during activation
- How to use the CSS of the WordPress core in the development of my administration page?
- output html on post or page from custom plugin [closed]
- Change the number of plugins counted on wp-admin/plugins.php
- WordPress Object Oriented plugin development [closed]
- How can i list random author?
- How can I create a page as a draft from my plugin?
- How to get values from network settings panel?
- Woocommerce plugin – How to create two versions of the same plugin with slightly different implementation for different users
- Conditional delete metadata does not works
- Cron: Update four post at Hour
- submit two file input fields in the same form
- Unexpected character and syntax error on wp-includes/formatting.php [closed]
- Error datatable whit ajax
- Potential issue that plugin could have when it will be installed on several sites
- The function called on the wp head hook becomes null
- working code, not working – Plugin Dev
- category page multiple products add to cart any plugin available for woocommerce
- Cannot view Custom Post Type no matter what I try
- Nested Actions and Filters
- How to use information from the database in the front-end?
- echo plugin results on pages
- register_activation_hook doesn’t fire at all
- plugin_dir_url(__FILE__) searches parent theme in ACF extension
- My ajax request don´t work and return 0
- Method for creating many-to-one Relationships between custom posts and a single user?
- Prefix of $wpdb does not worked and does not displayed
- Plugin to Delete All Posts Monthly
- mailjet plugin – extend functionnalities and reuse api
- trying to create simple plugin to filter categories from all authors
- Change wp_mail SMTP settings for each E-Mail
- Proper Failure of Plugin Activation
- WordPress Thumbnail add action if no thumbnail
- How can I add the custom taxonomy categories to the posts and pages?
- Creating fields in the database
- Pass strings to plugin function [closed]
- How to create a page template using custom plugin
- WordPress 3,5 and Jquery version
- how to search through plugin in wordpress cimy-user-extra-fields?
- contact form 7 captcha support anyother captcha plugin? [closed]
- How do I set register_meta for a specific CPT?
- How to Enfroce Domain Licensing Limits? [closed]
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Update Content for a Custom Block Toolbar Button
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Wrong block appender button showing
- Submitting form to admin-post.php WordPress
- WordPress Throwing Deprecated Errors on its own Files