Filter Hooks (Modify Output & Data)
MovieEngine filter hooks modify output data before it is used or displayed in Movie Engine. Filters allow you to modify data before it is used or displayed in Movie Engine. They are essential for customizing behavior, output, and logic — without editing plugin core files. Modify MovieEngine output and data with filter hooks to change titles, values, and display without editing core plugin files, for clean and update-safe customization.
Movie Engine provides powerful filter hooks to fully control data, logic, and frontend behavior — without modifying core files.
Use them in your theme functions.php or a custom plugin.
🚀 How to Use Filters
1. Modify Data
add_filter('filter_name', 'your_callback', 10, $num_args);
2. Return Modified Value
function your_callback($value) {
return $value;
}
3. Merge or Override
- Modify arrays (e.g., query args, JS data)
- Override default logic (permissions, duration, etc.)
💡 Why Use Filters?
- ✅ No core edits (safe updates)
- ✅ Full control over output and logic
- ✅ Easy integration with third-party tools
- ✅ Modify queries, templates, and restrictions
- ✅ Developer-friendly customization layer
🧩 Template & Content Filters
These filters control template loading and frontend content output, allowing you to override templates, modify content, or customize share links.
| Filter | Params | Default | Usage |
|---|---|---|---|
movie_engine_get_template_part | $template, $slug, $name | Plugin template | Override template file |
movie_engine_the_content | $content | Post content | Modify content output |
movie_engine_share_link | $url, $post_id | Permalink | Customize share URL |
Example – Override Template
add_filter('movie_engine_get_template_part', function($template, $slug, $name) {
$custom = get_stylesheet_directory() . '/movie-engine/' . $slug . ($name ? '-' . $name : '') . '.php';
return file_exists($custom) ? $custom : $template;
}, 10, 3);
Library Shortcode Filters
These filters modify the query and behavior of the library shortcode, giving you full control over displayed content.
| Filter | Params | Default | Usage |
|---|---|---|---|
movie_engine_library_args | $query_args, $atts | WP_Query args | Modify query |
Example – Custom Query
add_filter('movie_engine_library_args', function($args, $atts) {
$args['meta_query'][] = [
'key' => '_movie_engine_rating',
'value' => 7,
'compare' => '>=',
'type' => 'NUMERIC',
];
return $args;
}, 10, 2);
Review Filters
These filters control review permissions and behavior, allowing custom rules for editing or managing reviews.
| Filter | Params | Default | Usage |
|---|---|---|---|
movie_engine_can_edit_review | $can_edit, $comment | Plugin logic | Control edit permission |
Example – Limit Edit Time
add_filter('movie_engine_can_edit_review', function($can_edit, $comment) {
$hours = (time() - strtotime($comment->comment_date)) / 3600;
return $hours < 24;
}, 10, 2);
User Dashboard Filters
These filters allow you to extend the user dashboard and frontend data layer, including custom fields and JavaScript variables.
| Filter | Params | Default | Usage |
|---|---|---|---|
movie_engine_render_custom_password_fields | $rendered, $user_id, $user | false | Add custom fields |
movie_engine_dashboard_data | $data | Default array | Extend dashboard JS |
movie_engine_frontend_data | $data | Default array | Extend frontend JS |
Example – Add Frontend Data
add_filter('movie_engine_frontend_data', function($data) {
$data['my_api_key'] = 'xxx';
return $data;
});
🔐 Profile Filters
These filters control user profile and validation logic, such as password rules.
| Filter | Params | Default | Usage |
|---|---|---|---|
movie_engine_validate_password_change | $valid, $user_id, $current, $new | false | Custom validation |
📌 Full Filter Index (Quick Reference)
🧩 Template & Content
- movie_engine_get_template_part
- movie_engine_the_content
- movie_engine_share_link
🔎 Library
- movie_engine_library_args
⭐ Reviews
- movie_engine_can_edit_review
👤 Dashboard
- movie_engine_render_custom_password_fields
- movie_engine_dashboard_data
- movie_engine_frontend_data
💎 Membership
- movie_engine_is_premium
- movie_engine_is_restricted
- movie_engine_partial_paywall_duration
- movie_engine_preview_duration
🔐 Profile
- movie_engine_validate_password_change
MovieEngine filter hooks modify output data explained
MovieEngine filter hooks modify output data before it is used or displayed, so developers can control template loading and frontend content output, the library shortcode query and behavior, review permissions and behavior, the user dashboard and frontend data layer, and user profile and validation logic, all without editing plugin core files. Use them in your theme functions.php or a custom plugin: register a callback with add_filter, return the modified value from the callback, and merge or override arrays such as query args and JS data or default logic such as permissions and duration.
The filters on this page cover template and content output with movie_engine_get_template_part for overriding a template file, movie_engine_the_content for modifying content output, and movie_engine_share_link for customizing the share URL; library queries with movie_engine_library_args; reviews with movie_engine_can_edit_review for controlling edit permission; dashboard and frontend data with movie_engine_render_custom_password_fields, movie_engine_dashboard_data, and movie_engine_frontend_data; profile validation with movie_engine_validate_password_change; and membership checks in the full filter index, including movie_engine_is_premium, movie_engine_is_restricted, movie_engine_partial_paywall_duration, and movie_engine_preview_duration.
Frequently Asked Questions
What does MovieEngine Filter Hooks (Modify Output & Data) cover?
This developer guide covers MovieEngine Filter Hooks (Modify Output & Data) for extending and integrating the plugin.
Who is this guide for?
This guide is for developers customizing or integrating MovieEngine beyond standard settings.
Where should developers start?
Start with the Customization Guide and Template System, then use hooks and the REST API as needed.
Related guides
Tip: visit the MovieEngine website for more about the plugin.
