Unless performance is a huge factor, or you need to change PHP session globals, you don’t need to run anything before wordpress, just write a plugin that makes the checks needed on the init
hook and die()
if needed. This way you can also store the data wherever it is convenient for you.
For sure editing any wordpess core file is a big no-no which amount to forking wordpress with all the responsibilities it requires from you. The only file you may edit is wp-config.php
but this should probably be done only if the plugin approach will not work
Related Posts:
- error_log() output for print_r() appearing on page
- Allow only 1 taxonomy per custom post type [duplicate]
- Custom plugin: Trying to show saved data on frontend
- Do I require the use of nonce?
- Fatal error: Call to undefined function plugin_dir_path()
- How to make WordPress plugin check for database changes and then do something?
- How to change date language without changing the entire site language?
- Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
- How to use copy() function and paste file in /wp-content/themes directory
- OOP Plugin Development. Including external object
- Authenticating to WordPress, using my own authentication two-factor system
- Use composer to load custom classes [closed]
- wordpress custom endpoint multiple params
- Create table in database when activating plugin
- Problem with WordPress Ajax form
- allow user to select pages from dropdown in my plugin
- Am I not understanding plugins?
- Using Font Awesome as post thumbnail
- How to set a custom path, for ajax image upload folder in admin?
- admin-ajax.php responding with 0
- Page Reloads Before AJAX Request Finishes
- Add htaccess rules with insert_with_markers at beginning of htaccess
- Insert array data on plugin activation
- WordPress php filter admin_body_class not working
- Adding Default Settings to Theme My Login plugin
- Append HTML Using Shortcode
- Create onClick Event to Re-load a Widget
- Accessing the database from a plugin outside of action hooks
- Adding subdomain to home_url for “add_menu_page”
- How to select the contents in the text view textrea in wp_editor?
- Hide categories that are not used in the post type
- Automated Cart Update With Alert Box Each Time
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- How to sanitize any integer input field in wordpress?
- WordPress ajax doesn’t display object method on jQuery .change() function
- filter default query to show just selected level of child pages in wordpress
- How to make my custom widget appear within WordPress widgets? Plugin development
- How to auto fetch customer details in Woocommerce in checkout page
- Can’t upload image using media_sideload_image
- Adding widgets to my plugin page instead of WordPress dashboard
- How to insert data into database using wp cron job
- Access Child Class of Plugin Main Class Instance
- Font Awesome changing default WordPress Font
- Download full html page with CSV export plugin
- How to hook code to show after the_content?
- Problem with AJAX in wordpress plugin
- Usage of call back function of add_meta_box()
- how to save checkbox data for custom setting?
- How to Schedule Cronjobs for start of every month and year
- WordPress WP_Query without query GET parameters
- Where to copy woocommerce files to in my custom theme to avoid editing the core plugin?
- How to override a plugins script
- Woocommerce custom Plugin in wordpress [closed]
- Removed jQuery script from header.php , any problems?
- How can I get plugin meta data without knowing the plugin folder?
- calling admin-ajax.php from admin-ajax.php
- Flatten Responses returned via WP REST API via WP_Error for obfuscation
- How does add_option() function enable action hooks to fire right after actiavtion?
- Create plugin with custom page and template caused an error `Call to undefined function get_header()`
- Settings API form – submit with AJAX
- Post form – AJAX won’t upload featured image – Plugin development
- WP Hook Before a post is created
- Submit remote form to wordpress REST API and save data to custom post type
- Foreach Loop Of Post Types With Nested If Else If Not Completing Process
- In a foreach loop, how can I add a meta value if it doesn’t exist?
- Looping through and combining calls to Woocommerce REST API
- Should I use wp_cache in my plugin to make it faster?
- Store user form submitted information in post type
- How to import woocommerce custom fields data into another site?
- Add a custom link to each image in WordPress gallery
- Problem with my Login Plugin
- How to access this jQuery/AJAX data in a PHP file/WordPress plugin
- How to return html as a string from php for WordPress
- post_exists stops working in a scheduled event
- register dependency css and js inside a plugin class
- When I create a new custom post type, it replaces the old post type
- Taxonomy Child Term, Counter is staying on 0
- Help on Wp_query to print an term
- Add .php to end of all WordPress Pages (multisite)
- Upload images from one server to an other in wordpress
- PHP get_category() function redeclared
- Getting Member Data From WhishList Member on Register
- Setting at job with shortcode not working
- Singleton plugin activation; create database
- PHP: Why does my code work in index.php but not a widget?
- How to use Amazon Elastic Transcoder from WordPress using AWS SDK for PHP?
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- How to get WordPress Adminmenu items?
- How keep woocommerce users separeted in multisite install and keep admins on network
- I’m not able to get access $wpdb in my php file in wordpress
- How do I change the Go To Categories link in the term_updated_messages
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- Custom taxonomy with page post type – WordPress
- Query posts by custom taxonomy slug in WP REST API?
- oneOf JSON Schema validation not properly working for custom post meta value?
- Too few arguments at registering new templates in my plugin
- I want to lists posts in wordpress to nearest location entered by the user
- Displaying custom meta box value in a custom post page
- how to check elementor is widget is active or loaded
- Create a custom plugin with dynamic child pages listing database records