Yes, add this function to your module
function my_print_r( $msg, $name="" )
{
$error_dir="/path/to/wordpress/wp-content/debug.log";
$msg = print_r( $msg, true );
$log = $name . " | " . $msg . "\n";
error_log( $log, 3, $error_dir );
}
And call my_print_r( $variable_to_inspect, 'description' );. The file debug.log is originally used by WP_DEBUG_LOG, and if you don’t have it enabled only your debug info will be there. This plugin of mine shows the content of that file in the dashboard.
Related Posts:
- Why is it important to deactivate a plugin before deleting it?
- Does the number of downloads displayed for a plug-in in the WordPress.org plug-in directory include automatic updates?
- How to get the active theme’s slug?
- Using plural-only translation of register_post_status() in plugin
- admin-ajax returning 400 error when request is made with Fetch API
- Function to activate WordPress theme inside a plugin
- How do I retrieve a list of popular plugins using the WordPress.org Plugin API?
- Removing blank spaces from scripts to reducing page load time
- Edit Imported advanced Custom Fields from wordpress Dashboard
- Restrict access and display for categories
- What is the correct way to check if WP_Filesystem can write to a directory without aking for username / password?
- Manually Removing Plugins
- Change My Basket text in the header of WooCommerce Artificer theme
- ACF for audio url in wordpress audio shortcode
- Don’t send notification if author comments his own post plugin help?
- Built in admin ajax hooks?
- recommended breadcrumb plugins with possibility for hiding “Home” link [closed]
- dequeue not work
- Could someone please help me to add category id with in this query so this will return posts from a certain category?
- Adding a section to admin menu for global settings
- what the hook for displaying course list page for learndash plugin? [closed]
- Copyright messages for a particular set of pages
- Feature Differences between WordPress.com and Hosting on your Own Server?
- How do you add custom logo to entire themes
- building plugin and it is displaying above plugins page
- Is the wordpress user-model changed in wpmu?
- More than one text-domain is being used because of the included templates for plugins
- plugin development: problem with functions
- How to determine if a plugin affects your file-system
- View Private Published Page with URL Code (no login required)
- Why does my functions.php cause white-screen and media-library issues?
- Solutions to repost categories into multisite blogs?
- Custom random quote widget breaks when used in multiple sidebars
- Added slug after URL permalink last slash returns different content
- How to escape the tailwindcss responsive syntax when using with contact form 7? [closed]
- Send reply with pre-prepared answers
- Using Wishlist Member and I need to access a user’s status
- $wpdb->get_row returns column name instead of column value
- Remove ‘Check Compatibility’ from Plugins menu
- Paypal Integration [closed]
- Remove hovercard for only certian gravatars
- wp-custom-menu filter removes the current_page_item class
- Can I allow certain people to add/edit pages within a parent?
- Is there a loading priority for login_enqueue_scripts?
- How to apply lazy loading in background images [closed]
- How can I test plugin activation using phpunit?
- WordPress custom taxonomy not showing
- Any reason not to remove all default WP plugins?
- Determining when was the last time a plugin was activated
- My WordPress site when down after installing a plugin and now all I get is a simple white screen [closed]
- A question about register_activation hook
- Software to run on server checking outdated wordpress installations
- Integrating boxtal PHP library into a custom WordPress Plugin
- Changing menu order of a specific plugin in dashboard
- Test my WordPress Plugin standard or not
- issue in wp_localize_script
- Sanitize $_GET variable when comparing
- Where can I save plugin data?
- shortcode – multiple instances of same parameter name in one shortcode instance
- Is there a counter for comments left?
- Modifying post titles on pages, archives and single but not dashboard/admin
- How to add update function to plugin without adding it to https://wordpress.org/plugins/ [closed]
- 500 error when updating plugin option
- is there a way to pass a parameter to a add_menu_page function?
- How to edit link for comment count
- Personalized Author Area
- New Variable Woocommerce product not showing variations, price, or add to cart on front end [closed]
- WP-ecommerce : Change the price before inserting it into the cart
- Integrating Custom Database with WordPress
- How do I duplicate a single wpmu site?
- TranslatePress | secondary language category/sub-category not working correctly “`/%category%/%postname%/“`
- Live Streaming with WordPress?
- How to add height and width to images on a page(using WP Bakery) to improve Google’s CLS score?
- I need to register and resize images, safe to delete plugin afterwards?
- How to edit checkout page? [closed]
- Is it possible to custom set query for a WordPress REST API response?
- How to send custom mail when a user complete a specific form
- How to echo meta_key in easy digital downloads receipt (Purchase Confirmation page)
- Generating shortcode and HTML on button click
- Show content from plugin on index
- “Listen” button on my main post page
- CMB2 Post Search Field displays/repeats initial post if left empty
- Add custom field for users
- User content database [closed]
- Add HTML between feed items
- Private “Parents” content for school site
- Can a developer adopt a plugin marked as “not updated in over 2 years”?
- Is there a way to include some external script to some or all pages in a wordpress site?
- Plugin activated but plugin files nowhere to be found
- How to load css files in a specific order
- Upload images on 3D shape by customers
- Where to find remaining Boldgrid code in WP database?
- Notifications on WordPress Website [closed]
- how to restore one day before deleted data in wordpress?
- Creating a Freemium plugin in the WordPress Repository
- Add_rewrite_rule in HivePress (WordPress plugin/theme)
- Accessible ‘List Carousel’ block/pattern?
- My site has only one page, and users access my uploaded mp3 files from there – can I analyze access by song title?
- How to append TinyMCE editor in TinyMCE editor’s popup
- What plugin presents these extra columns in wp-admin -> plugins