WP Distraction Free View 1.9.0 has 0 actions and 20 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Change a value WP Distraction Free View is about to use
add_filter( 'wpdfv_custom_css', function( $css, $settings ) {
// Change $css here.
return $css;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filter the final Reader Mode custom CSS before frontend output. */ apply_filters( 'wpdfv_custom_css', $css, $settings ); -
/** * Filter the capability required to view and save Reader Mode custom CSS. */ apply_filters( 'wpdfv_custom_css_capability', 'edit_css' ); -
/** * Filter generated Reader Mode discovery metadata. */ apply_filters( 'wpdfv_discovery_metadata', $metadata, $data, $post ); -
/** * Filter installable free companion plugin definitions. */ apply_filters( 'wpdfv_free_plugins_catalog', $plugins ); -
/** * Filter whether Reader Mode is available for an individual post. */ apply_filters( 'wpdfv_is_post_enabled_for_post', $enabled, $post, $override ); -
/** * Filter sanitized Reader Mode content before it is returned by REST. */ apply_filters( 'wpdfv_modal_content_after_kses', $content, $post ); -
/** * Filter rendered Reader Mode content before final KSES sanitization. */ apply_filters( 'wpdfv_modal_content_before_kses', $content, $post ); -
/** * Filter text patterns removed from rendered Reader Mode content. */ apply_filters( 'wpdfv_modal_content_script_text_patterns', $patterns, $post ); -
/** * Filter scripts extracted from rendered Reader Mode content. */ apply_filters( 'wpdfv_modal_content_scripts', $scripts, $post ); -
/** * Filter full element blocks removed from rendered Reader Mode content. */ apply_filters( 'wpdfv_modal_content_strip_tags', [ 'script', 'style', 'noscript' ], $content, $post ); -
/** * Filter the rendered modal template content. */ apply_filters( 'wpdfv_modal_template_content', $content, $post, $template_slug, $template ); -
/** * Filter available block-based modal templates. */ apply_filters( 'wpdfv_modal_templates', $templates ); -
/** * Filter paid companion plugin cards. */ apply_filters( 'wpdfv_paid_plugins_catalog', $plugins ); -
/** * Filter the content unit count used for Reader Mode estimates. */ apply_filters( 'wpdfv_reading_time_word_count', $words, $content ); -
/** * Filter the words-per-minute value used for Reader Mode estimates. */ apply_filters( 'wpdfv_reading_time_words_per_minute', 200 ); -
/** * Filter whether WP Distraction Free View frontend assets should load. */ apply_filters( 'wpdfv_should_enqueue_frontend_assets', $should_enqueue ); -
/** * Filter structured Reader Mode data. */ apply_filters( 'wpdfv_structured_reader_content', $data, $post ); -
apply_filters( 'wpdfv_discovery_metadata_enabled', $enabled, $post ); -
apply_filters( 'wpdfv_reader_content_controls', [ 'media' => true, 'embeds' => true, 'comments' => true, ] ); -
apply_filters( 'wpdfv_reader_content_selectors', $defaults );
Generated from WP Distraction Free View's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: