Try this
add_action( 'wp_loaded','data_collection');
function data_collection(){
if ( $_SERVER[REQUEST_URI] == '/mypage' ) {
//my coding stuff
}
}
Related Posts:
- Does the number of downloads displayed for a plug-in in the WordPress.org plug-in directory include automatic updates?
- Why do I get this “plugin does not have a valid header” error?
- Edit plugin without hooks in functions.php
- Which method is best to enqueue scripts
- WordPress Capabilities: edit_user vs edit_users
- Making plugin unique to not conflict with plugins with the same name
- Function to activate WordPress theme inside a plugin
- Is dynamic forms/entries possible in Widget?
- What is the correct way to check if WP_Filesystem can write to a directory without aking for username / password?
- Is there a WordPress Plugin that allows voting “does this coupon work” on specific links like Retailmenot
- How to get posts by content?
- shortcode doesn’t work
- Built in admin ajax hooks?
- Force plugin to fail activation
- Could someone please help me to add category id with in this query so this will return posts from a certain category?
- Plugin not saving values when placed in a folder within /wp-content/plugins
- How to integrate plugin in WordPress theme
- building plugin and it is displaying above plugins page
- How do I write into a file (css)
- load_theme_textdomain path
- Dynamic CSS Vs Inline Issues in Code any Way around in a WordPress Themes?
- Is license need for free wordpress plugin
- plugin development: problem with functions
- Getting a List of Categories for Use in a Plugin?
- Allow users of my plugin to define their own shortcode rather than use mine?
- Building plugin with changeable custom post type values…advice needed
- How to get all of the activate_plugin action parameters?
- Display update notification messages like ‘What’s New’
- CRUD and Frontend show from a custom table without shortcode
- How can I make 2 plugins that include different versions of a framework to both use the latest version?
- Add Plugin options as subpage to Theme options page
- Image upload and download from front-end
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- correct way to include a library(and its dependent libraries) in wordpress development
- Issue Tracker from pre exsisting table [closed]
- WP_Terms_List_Table Quick Edit not working
- Git Hosting for WordPress SVN Plugin Repository [closed]
- Is there a directory my plugin can write files to that cannot be viewed via the browser/url?
- How to exclude certain files from the plugin editor?
- Stop Plugin from Getting Styles from Other Plugin
- How do I make a secure API call from a shortcode when a button is clicked?
- WordPress REST API Plugin Development – Add Custom Endpoint
- Hook into the rendering of a WordPress Template
- Default taxonomy template in plugin, override in theme
- Can the uniqueness of the plugin file/plugin slug and version number be trusted?
- How to add support for caching plugins for my own plugin?
- Save user total active time after login in wordpress [closed]
- WordPress gtag.js with User ID tracking
- WordPress Site is Broken, Cannot see wp-admin page [closed]
- wp_loaded with static Singleton
- How to remove a CPT Menu from the Root Admin only
- Get post_id on clicking a link in WordPress
- WordPress.org: How to add a plugin for certain countries?
- Calling a save function from a “submit” button
- Wp Debug Enabled True Notices and Warning
- Select Form Element Not Saving from Plugin Options
- My widget won’t update its values when save is clicked
- Can we give Pending as a Role to wp_insert_user?
- How to automatically activate users after registration without activation email?
- Pass PHP variable to javascript
- Table of contents (TOC) plugin is not showing header tag
- Custom page from wp admin area
- Unexpected add action function in WP plugin
- Avada Live is broken on WP
- Make downloadable ebook read online without download option
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- WordPress rewrite rule depend on meta values not ids
- Woocommerce convert simple products to variations
- Get a list of Product Categories inside a loop
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- Can you develop themes and plugins while using the hosting services BlueHost? [closed]
- Using multi-dimensional array with filter
- WordPress Admin sub-level menu issue
- WordPress plugin changes not updating
- PHP header() not available to use in my plugin
- wordpress ajax pagination object value does not change
- Google analytic issue in wordpress
- Custom pages with plugin
- How to insert category name above post title in a featured pages plugin?
- Displaying friend’s posts only
- What’s the preferred method of writing AJAX-enabled plugins?
- How to add submenu to WordPress plugin in the same Directory of main Plugin?
- Shortcode registered from a plugin not recognized
- Check if user is in a group of another site within multisite network [closed]
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- Redirect url in plugin to somewhere else?
- wp_update_post call really slow when official Facebook plugin is installed
- How to set-up multiple cron task with wp_schedule_event so that they do not overlap?
- Site is setup statically – how to make it content managable?
- WordPress Code Access to Restricted Content without Registration
- Modifying lightbox plugin to allow for quoting, Does this exist? [closed]
- Plugin version number after code rewrite [closed]
- How to escape html code?
- 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?
- Submitting form to admin-post.php WordPress
- WordPress Throwing Deprecated Errors on its own Files