Look into the WP_Fatal_Error_Handler
class. I see a couple of filters in its display_default_error_template()
method that might be helpful for you:
The entire class is a drop-in, so if you need to you can replace it entirely with your own version, but I think one of those filters—probably wp_php_error_args
—might be what you’re looking for.
Related Posts:
- Change the footer text on the login page
- Check if page parent has certain template
- Hooking new functions to actions + passing parameters
- Find variables available at a given hook
- Why do filters/actions require an argument count?
- How to use return in my custom function instead of echo
- Handling Body class based on Template
- add_action shortcut?
- Contact Fom 7 – how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-control?
- WordPress Gravatar filter is removing my custom attributes
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Modify custom field input data before creating a new post
- Override a function defined in wp-includes/comment-template.php
- WordPress redirect redirecting too many times or not at all
- How to have different site identity logos on each page on Astra Theme [closed]
- Must filter functions receive all arguments passed to them?
- How to pass hook variable to function?
- Hook into all password resets in WordPress and get password before hashing?
- WordPress HTML Helper
- How to add custom checkout field in user details mail template
- Assign new post author IF another user in custom field on post transition
- Run a filter when a walker runs
- Randomise upload filenames (or another solution to hide the original image URL from theft?)
- Get_avatar filter?
- Adding Default Settings to Theme My Login plugin
- Add a class to the anchor tag on HTML5 gallery
- Remove an action hook within a Class
- Modify a function without editing template
- How to pass arguments to add_action() or retrieve return value of called function?
- Is it acceptable to treat a filter like an action?
- How can I remove a function that has been added to wordpress with add_filter?
- How to control WordPress image metadata (using Imagick)?
- Edit incorrect password message WordPress
- How do I add custom bulk actions to multiple custom post types?
- Add data attribute to each li in menu
- Removing “wpautop” (auto tags) only on certain pages?
- Woocommerce: hook action/filter I could use to add variation id and price with each attribute opt on WooCommerce Rest api
- Why ajax doesn’t work on certain wordpress hooks?
- Remove a div from RSS feed
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- Print last modified date only on posts
- Set meta field to publish date + 2 weeks
- How to add an arrow to menu items has submenus
- Error in custom php function doesn’t exist
- Return a numerical function value in Customizer controls
- Adding widgets to my plugin page instead of WordPress dashboard
- Unique icons next to each WordPress menu item
- Adding function to Genesis genesis_header [closed]
- how to make custom ajax handler?
- Error call_user_func_array() expects parameter 1 to be a valid callback when using image_size_names_choose
- jQuery code not working when included in functions.php
- Alter required message using comment form api
- Add item to top of menu using a filter in functions.php
- Should `wp_login` be used since it’s deprecated?
- Override the WordPress core function wp_referer_field
- How to make modifications only to certain elements of an HTML string on the server-side?
- Omit custom post type from wp-sitemap.xml based on meta key using wp_sitemaps_posts_query_args
- Nested “do” and “add” Actions is possible?
- Run a code only on theme activation only during first activation
- Filtering a function’ output for a new continued function
- Deleting Certain terms from appearing on the front end as links
- Theme not calling Jquery properly
- Content filter won’t work
- Are there action hooks for comments?
- How to catch wordpress post ID when it’s published
- Call to undefined function is_home() or any conditional tags
- Why does the post_type_link hook everything twice?
- Warning: in_array() null given in PHP function
- Upload multiple files in randomly generated folder using wp_upload_bits
- Create page template via functions.php?
- Add meta tags to a custom header
- How can I hook into the wp_mail function used by BackWPup?
- Can not add admin notices from the edit_user_profile_update hook (notices not being displayed)?
- Get user custom field value on function.php
- Custom query vars filters problem with pagination
- Adding function to child theme’s function.php
- Get the name of menu item with wp_nav_menu
- Insert Content Before div#main from the functions.php File
- How to add aria role and schema markup to custom walker container
- Dynamically adding filters
- Creating customized php files in theme folder
- Dynamically Generate Functions and Hooks
- User filter posts by year
- How to sort WooCommerce products page by latest in-stock items first?
- Filter wordpress posts without searching the keywords in the post content
- Variation prices breakdown only for single product page
- How do I add a function to parent theme
- How to remove get_header From all single pages in wordpress with functions.php without plugin?
- Contain multiple page templates in one PHP custom template file in WordPress?
- Wp_Schedule_Event every few minutes doesn’t work
- remove_action from parent theme using child theme functions.php
- Apply function.php filter only if url not has /amp/
- Adding custom field to product category and show it to shop/category shop page
- Change lost password url to a mailto URL in WordPress
- Save_post – Warning: Cannot modify header information
- Remove span tags from WooCommerce Downloads page
- How to edit post meta data before publishing the post it self wordpress?
- How Do I Unhook This Parent Theme Function?
- I want to hide “sold by” on certain pages with id page 43
- Fatal error: Uncaught Error: Class ‘WP_Block_Styles_Registry’