I have used this same code and it does work. However, you need to use an action hook instead of a filter, as follows:
Replace add_filter('loginout', 'techyparas_log');
with:
add_action('init', 'techyparas_log');
Also, I set this up as a must-use plugin, but I don’t see why it wouldn’t work as a regular plugin.
Related Posts:
- How to get Login Error messages on a custom template
- Which method is best to enqueue scripts
- Find the URL of the current plugin directory
- Best way to hook a custom url?
- Redirect to another page using contact form 7? [closed]
- Custom Login Page — wp_signon Headers Already Sent?
- How to rewrite URL and get the values?
- force logged in user to stay in the dashboard
- Redirect default login page to a custom page [duplicate]
- Checking url from plugin [duplicate]
- map urls to plugins
- HTML link within my plugin settings page
- How to implement WordPress plugin update that modifies the database?
- wp.media update options and force render on uploader
- WordPress Plugin Development In MVC Architecture, How?
- Customize plugin update “new version is available” text
- category_name not working (not showing up in sql query debug)
- “Donate to this plugin” for WordPress.org Plugin Authors
- What happens when two plugins have the same 3rd party class included into them?
- add_rewrite_rule, plugin activation and plugin deactivation
- How to handel multiple checkbox field in the admin settings page with Settings API
- Update Multiple Post Meta for the Same Post In One call?
- Allowing Custom Capability to Manage Plugin Options
- wp_insert_user – how to send verification email before logging in
- Custom plugin settings: clicking “save changes” does not display success message
- How to show custom message once on plugin activation?
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- How to load a new template page according to a particular URL?
- What is the function to get plugin base url in multisite?
- PDF download – use wordpress functions
- API to filter new user registration $POST data?
- Detect if a plugin was included in a certain page
- Set cookie then immediantly refresh the page
- How to add an attribute to the body tag with a plugin?
- Override the core function locate_template
- Admin page: form with enctype=”multipart/form-data” does not transfer its data
- Set user ID at time of wp_create_user
- How to Create a Custom Plugin Permalink
- How to create custom tables in WordPress using my own plugin?
- How would I go about creating a user ranked post popularity page?
- Plugin: Google Analytics for Dashboard error – Timestamp is too far from current time
- link bbpress forum discussion to blogposts
- How to modify WCMP Rest API response?
- Re use the list table for a custom post type on another page
- Can we have an ‘Update metadata’ button in Image Gallery for all image instances?
- Customised plugin failed to install and activate
- Why is one phpunit test throwing an error on one class when all other classes are similar without error?
- WPDB: Update table
- How to get all posts belongs to a user between a certain date
- wp-load.php redeclares classes
- Plugin main file is constantly been fired on every website visit
- Where should custom post types be registered in a plugin?
- License validate function
- wp_enqueue_style on template_redirect level?
- Change the number of plugins counted on wp-admin/plugins.php
- plugin uninstall function drop the tables, but shows errors on admin
- How to use template inside plugin shortcode with variables for big HTML code
- Way to send multiple values for column to MySQL?
- Symlink a plugin in local development, works but got Debug error message – Windows 10
- What’s the right way to implement functions in footer.php
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- Display my plugins content based on a pages post_id
- How can i list random author?
- Our plugin tags not appearing in WordPress Plugin Repository
- Make get_permalink() work outside the Loop using filters
- Pluging with content for a specific page or post
- Does WordPress do any internal caching if no plugin installed?
- WordPress Plugin- How to Insert Html&JS code in specific Page and specific Div
- How can i export and import my plugin option WordPress
- Conditional delete metadata does not works
- Upload Image with a file URL and show dynamically on Frontend
- Why won’t wp_enqueue_script work within any plugin file?
- Help to Create a Simple Plugin to make a post
- How can i solve php upgrade problem
- The function called on the wp head hook becomes null
- custom post type get_posts() function not work
- Create multiple posts when a custom post is created
- how override a define
- WordPress plugin blog creation
- Preserving existing functionality converting HTML to WordPress
- submit form data to wordpress existing database table using my plugin
- Prefix of $wpdb does not worked and does not displayed
- Get content and send to 3rd party
- Why is the WordPress update_option not working in this code?
- Add predefined values to custom post plugin
- wp-admin will not redirect to wp-login.php
- How to set the default options on an existing plugin in a WP MU new user install
- Breadcrumb is not generating the correct post page url
- SOLVED – $wp_admin_bar and AJAX calls
- ERROR: Cookies are blocked due to unexpected output – no access to FTP
- Fetching Video From YouTube Automatically [closed]
- Outputting custom field query from a plugin to the website header
- php include returns 1 as output with other outputs [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?
- Submitting form to admin-post.php WordPress
- WordPress Throwing Deprecated Errors on its own Files