OK, as far as I understand, you’ve put this code:
$debug_log = "DEBUG-debug log";
trigger_error($debug_log);
//OR
error_log($debug_log);
directly in your functions
php` file.
It means, that this code will be executed (so new log item will be added to log file) every time the functions.php
file is loaded – so during every request to your WP.
It means, that every time someone views your page, there will be new log item added.
But… That’s not all… If you’re logged in, then WP sends Heartbeat requests. They will also result in new log items.
There are not so many log items logged with the same time in your log, so IMHO it’s unlikely that they are printed in the same request.
PS. JS won’t be executed during AJAX calls, so you won’t see them multiple times.
Related Posts:
- “Undefined index” error when saving empty array with checkboxes
- error_log() output for print_r() appearing on page
- Does the debug.log do log rotation?
- Utilize WP-CLI from inside WordPress, not SSH
- error_log is not working as expected in functions.php file
- Preferred Method of debugging a wordpress SQL calls?
- How to find error in my code when the error message is pointing to WP core file?
- XAMPP-VM Mac OS Mojave wordpress debugging using XDebug
- Getting a WordPress Debug Strategy
- Hooks for post saving make a post-new.php to load latest post’s data
- File is executed twice if plugin is activating
- How to display only specific Error types in debug.log? No notices, warnings, etc
- How to identify which php file a plugin is using on page load?
- Notice: Undefined index: post_title error
- How to send logs to plugin owner for a plugin?
- I’m writing my first plugin and my echo output is showing up on every page of my wordpress installation
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- Dynamic URL to reference custom PHP files
- Prevent multiple counts by same user – WP PostViews plugin
- Where exactly do I write define( ‘WP_DEBUG’, true ) in wp-config file
- How to use a frontend URL with a Plugin
- WordPress template_include filter not working properly
- “Notice: Undefined variable: content” is showing [closed]
- Theme url in all plugin pages
- “The plugin generated 2694 characters of unexpected output…” on Plugin activation, CREATE TABLE sql command not working
- How to display a value from a radio button in the options menu in wordpress
- mysqli_real_connect() – authentication method unknown to the client Warnings
- How to debug php code in hostgator cPanel
- How to access function from outside of a class within this class in WP plugin?
- How to call function at the bottom of post using plugin?
- WP add_action factory
- 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)?
- what is the best practice to add new field to an api route
- Use custom post type for a store locator
- How do I programmatically set a user as spam in BuddyPress? [closed]
- Adding widgets to my plugin page instead of WordPress dashboard
- WP CRON duplicate wp_insert_post with has < and > tag
- How to insert data into database using wp cron job
- How to send Ajax request from my plugin in admin dashboard?
- AJAX success response is not working but it’s saving my changes
- Access Child Class of Plugin Main Class Instance
- Best practice for show data to one specific user?
- Font Awesome changing default WordPress Font
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- Download full html page with CSV export plugin
- Asynchronous multiple requests 401 Unauthorized
- Using data sent via AJAX in multiple functions on a WP plugin
- What does -> mean in WordPress?
- Change product_base programmatically
- How to add the sidebar to all the pages except the home page? [closed]
- how to save checkbox data for custom setting?
- WordPress shortcode returns the data before
- Plugin development and composer
- Set default Database Storage Engine when creating tables with plugins?
- WordPress WP_Query without query GET parameters
- Where to copy woocommerce files to in my custom theme to avoid editing the core plugin?
- custom post type with role Vendor
- Removed jQuery script from header.php , any problems?
- Execute Jquery when a specific page in my plugin is loading
- How does add_option() function enable action hooks to fire right after actiavtion?
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- Create plugin with custom page and template caused an error `Call to undefined function get_header()`
- WordPress can’t use ZipArchive
- Settings API form – submit with AJAX
- How to change basename url for wp-admin?
- Only the first image uploads
- WordPress loading progess – wp-blog-header.php
- Illegal string offset checkbox
- Custom plugin: how do I call a PHP file if settings option is set to true?
- Trying to use a variable to set image width
- wp_update_post gives 500 internal error
- dashboard widget form not submit mails
- register_setting not save checkbox
- How to import woocommerce custom fields data into another site?
- Add a custom link to each image in WordPress gallery
- How does one make a URL return dynamic JSON with custom Content Type?
- How to give custom roles the capability to edit one Menu instead of every Menu
- Notice : Array to string conversion on array_intersect user meta
- add menu page in loop menu order
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- PHP get_category() function redeclared
- Private messaging – Getting and displaying the avatar/url of a message recipient
- wp_query (or hook) posts by date (id) in array then set post_type
- Chosen Select jquery Not Working in Plugin
- widget: input the px value from user and use it as inline style in widget function
- PHP calling function within a class
- Custom post type single page return to listing page
- How to find the function which is outputting Array
- Save data of select list after clicking save
- WordPress rewrite question
- Using Nonce for my Form
- Create new folder and upload files to custom folder via wp_handle_upload
- SHARING TO FACEBOOK – FROM DYNAMICALLY GENERATED PAGE
- which php or css file has generated an inline style in WordPress that overwrites my css
- How to hide Ads From Certain Categories?
- Custom field fetch error on woocommerce pdf invoice
- Login user into magento using wordpress account
- Customize create table SQL statement in any WordPress plugin