I’ll preface this by saying I think it’s a really bad idea, but you could circumvent the admin UI by hooking an action that happens after things are initialized, but before any output occurs:
function my_admin_ui(){
if( isset( $_GET['page'] )
&& 'myPlugin-ui' == $_GET['page'] ){
include( plugin_dir_path( __FILE__ ) . 'views/myPlugin-ui.php' );
exit;
}
}
add_action( 'admin_init', 'my_admin_ui', 999 );
Related Posts:
- My ajax request don´t work and return 0
- WordPress environment not loading properly
- Customizing subject in comment notification e-mails
- How to Loop Plugin Option Field Set?
- How to pass JavaScript variable to PHP in wordpress widget?
- Saving Plugin settings to the database
- Execute a function using ajax
- Errors while using ajax from external wordpress page
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- HELP: Integrating WP with raw PHP code once published button is hit
- I would like to use create a function in my custom plugin to tell WP to use a different header
- Scope for PHP Variables Assigned in functions.php or a plugin
- WooCommerce get_price returning wrong price when used via ajax
- Shortcode button dosent work for all posts. Work for first post only
- wordpress plugin is not activating from widget
- Edit Yoast SEO breadcrumbs output [closed]
- Using a custom plugin to capture input data via Ajax and PHP
- Ajax call returning 0
- Conditional attributes and logic per product category
- WordPress get_avatar function not correct working
- Redirect to another page using contact form 7? [closed]
- Check if variable is set in filter
- execute function after one completed
- How to get specific string/value from an array? php [closed]
- Plugin onclick button activate other plugin
- Asynchronous request in wordpress
- Different registration form for different roles
- More gentle way to hook WordPress custom url
- How to add custom function to pluggable.php
- can’t unzip file
- Checkbox show / hide output result
- Allow a particular user to access a particular plugin?
- Cookie value changes back to previous value after changing
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- adding dynamic/multiple slug values in ‘option_none_value’
- working code, not working – Plugin Dev
- How to use Datatable with Ajax when creating plugin on WordPress?
- Is admin section completely customizable in terms of styling?
- Compare Ajax Data Results
- register_activation_hook doesn’t fire at all
- Populate select option with JSON file
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Saving an array to get_options
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- How to get site homepage from plugin?
- How to add a handler for a button in plugin?
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Doing action based on input from options menu
- Help me with my first very basic plugin
- How use Dynamic hyperlink on each wordpress post?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Mixed results with is_page() WordPress function, when using $this, or self
- Read page- or post-content across different builder-plugins
- Extend Elementor Archive Posts widget with a custom skin in order to show multiple badges
- Loading class files via autoload method
- How to remove an Ajax action
- WordPress plugin installation
- Override the core function locate_template
- How to redirect Old Post URL to new Post and keep Old post Comments?
- Can wp_script_is used in pluginA check if a script is being enqueued/registered from pluginB?
- How to create popup same as wordpress popup feature
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- Modifying Footnote Plugin for Descriptive Title Attributes
- New Plugin: Post update pushes a copy as a revision
- Getting media library popup in custom plugin admin page
- Create or Update thousands of woocommerce products via PHP
- How to add pagination to wpbakery grid?
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- send_headers don’t work on wordpress multisite
- jQuery function didn’t work in my plugin
- bulk change of image setting “link to” to “link to: image url “
- Placement of Code in Plugin for hooking `save_post`
- jQuery Plugin to use WordPress functions in AJAX request
- ajax front-end increment views on click
- Display a text message if the field is not found and not if found
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- $wpdb working with ajax but showing ajax error instead of success
- Escape when echoed
- Ajax gives 400 error
- The Point of Using apply_filters()
- Plugin exceeds memory limit
- How to get post URL in the_content filter?
- Add a plugin before main container
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- How to get variables from fucntion.php to my plugin files
- How to include code into functions.php file via a plugin
- Check if email address exists front end with AJAX in a plugin
- Avoiding Duplicate function names in Post Loop (WP_Footer script)
- Missing argument 3 for wp_register_sidebar_widget()
- Write to / remove from default .htaccess file from plugin?
- Update Option Error: Notice: Undefined index
- How to add class in plugin only for network site?
- WordPress Ajax Callback
- Plugin Development sqlite or WordPress’ database
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- How to trigger $_GET request within admin plugin page?
- How to generate video out of images via WordPress plugin
- plugin development: problem with functions