- Dynamic content & post streams (18)
- Output & rendering (18)
- Slider lifecycle (12)
- Slide lifecycle (14)
- Import & export (15)
- Fonts (3)
- Object library & navigation (7)
- Front-end loading (7)
- Settings, roles & options (6)
- Add-ons & AJAX API (5)
Note:
Filters expect a return value; actions do not. Each Source path points at the exact file:line where the hook fires so you can verify the signature.
Dynamic content & post streams
18 hooks · ↑ Back to top
rev_slider_insert_meta · filter
Filter the value of an inserted %meta% placeholder for a post.
Source: includes/slide.class.php:976
Parameters
$text(string) — the resolved meta value$post_id(int) — the post id
Returns: string — the value.
revslider_getExcerptById · filter
Filter a generated post excerpt used inside a dynamic slide.
Source: includes/slide.class.php:961
Parameters
$excerpt(string) — the excerpt$post(mixed) — the post$limit(int) — the requested length
Returns: string — the excerpt.
revslider_get_latest_posts · filter
Filter the query used to fetch “latest posts” for a stream.
Source: includes/slider.class.php:1939
Parameters
$args(array) — the query args$post_id(int) — the reference post id
Returns: array — the query args.
revslider_get_popular_posts · filter
Filter the query used to fetch “popular posts” for a stream.
Source: includes/slider.class.php:1900
Parameters
$args(array) — the query args$post_id(int) — the reference post id
Returns: array — the query args.
revslider_get_posts · filter
Filter the assembled WP_Query argument array immediately before a post stream query is executed.
Source: includes/slider.class.php:2427
Parameters
$query(array) — the WP_Query arguments$slider_id(int) — the slider id
Returns: array — the WP_Query arguments.
add_filter('revslider_get_posts', function($query, $slider_id){
$query['post_status'] = 'publish';
return $query;
}, 10, 2);
revslider_get_posts_by_categories · filter
Filter the resulting posts after a category based stream query has run.
Source: includes/slider.class.php:2211
Parameters
$post(array) — the queried posts$slider(RevSliderSlider) — the slider object
Returns: array — the posts.
revslider_get_posts_by_category · filter
Filter the full query argument set used to build a post / WooCommerce / event based slide stream before the query runs.
Source: includes/slider.class.php:2453
Parameters
$args(array) — query args:slider_id,cat_id,sort_by,direction,max_posts,post_types,taxonomies,addition,type$slider(RevSliderSlider) — the slider object
Returns: array — the (possibly modified) query args.
add_filter('revslider_get_posts_by_category', function($args, $slider){
$args['addition']['meta_query'][] = ['key' => '_featured', 'value' => 'yes'];
return $args;
}, 10, 2);
revslider_get_related_posts · filter
Filter the query used to fetch “related posts” for a current-post stream.
Source: includes/slider.class.php:1801
Parameters
$query(array) — the query args$post_id(int) — the reference post id
Returns: array — the query args.
revslider_mod_meta · filter
Modify a meta value as it is injected into a layer built from post data.
Source: includes/slide.class.php:900
Parameters
$text(string) — the meta value$post_id(int) — the post id$post(array) — the post row
Returns: string — the meta value.
revslider_mod_stream_meta · filter
Modify a meta value injected into a layer that is built from stream (social / feed) data.
Source: includes/slide.class.php:1532
Parameters
$text(string) — the meta value$slider_id(int) — the slider id$stream_type(string) — the stream type$post_data(array) — the stream post data
Returns: string — the meta value.
revslider_post_mod_stream_data · filter
Filter the posts collection after it has been turned into slide stream data.
Source: includes/slider.class.php:2151
Parameters
$posts(array) — the posts$sourcetype(string) — the stream source type$slider_id(int) — the slider id
Returns: array — the posts.
revslider_pre_mod_stream_data · filter
Filter the posts collection before it is turned into slide stream data.
Source: includes/slider.class.php:2144
Parameters
$posts(array) — the posts$sourcetype(string) — the stream source type$slider_id(int) — the slider id
Returns: array — the posts.
revslider_set_posts_list · filter
Filter the final posts list assembled for a standard post stream.
Source: includes/slider.class.php:2403
Parameters
$posts(array) — the posts$slider_id(int) — the slider id
Returns: array — the posts.
revslider_set_posts_list_gal · filter
Filter the final posts list assembled for a gallery stream.
Source: includes/slider.class.php:2391
Parameters
$posts(array) — the posts$slider_id(int) — the slider id
Returns: array — the posts.
revslider_slide_ignore_taxonomies · filter
Filter the list of taxonomies ignored when building slides / replacements from posts.
Source: includes/slider.class.php:2622
Parameters
$taxonomies(array) — taxonomy slugs to ignore$slider(RevSliderSlider) — the slider object
Returns: array — the taxonomy slugs.
revslider_streamline_stream_data · filter
Short-circuit or supply the stream data for a custom source type. Return non-false to replace the built-in streaming for that source.
Source: includes/slider.class.php:2831
Parameters
$return(bool|array) —falseby default; return your own data to take over$data(array) — the slider data$sourcetype(string) — the stream source type$additions(array) — additional stream parameters$slider(RevSliderSlider) — the slider object
Returns: bool|array — false to keep default behaviour, or your stream data.
sr_modify_layer_text · filter
Modify a layer’s text for a given post when a dynamic slide is being built (placeholder replacement hook).
Source: includes/slide.class.php:1112
Parameters
$text(string) — the layer text$post_id(int) — the post id the slide is built from$slide(RevSliderSlide) — the slide object
Returns: string — the layer text.
add_filter('sr_modify_layer_text', function($text, $post_id, $slide){
return str_replace('%reading_time%', my_reading_time($post_id), $text);
}, 10, 3);
sr_streamline_post_data_post · filter · since 6.0.0
Inject or modify the per-post data assembled for a single dynamic slide. This is the primary hook for adding custom meta / field bindings (used internally by the WooCommerce and Events Manager integrations).
Source: includes/slider.class.php:2804
Parameters
$post_data(array) — the data that will populate the slide$data(array) — the raw post row$metas(array) — the post meta$slider(RevSliderSlider) — the slider object
Returns: array — the post data, with any extra fields you add.
add_filter('sr_streamline_post_data_post', function($post_data, $data, $metas, $slider){
$post_data['subtitle'] = get_post_meta($data['ID'], 'subtitle', true);
return $post_data;
}, 10, 4);
Output & rendering
18 hooks · ↑ Back to top
revslider_add_layer_classes · filter
Add or change the CSS classes applied to a layer wrapper element.
Source: includes/output.class.php:593
Parameters
$classes(array) — the layer CSS classes$layer(array) — the layer definition$slide(RevSliderSlide) — the slide object$slider(RevSliderSlider) — the slider object
Returns: array — the CSS classes.
add_filter('revslider_add_layer_classes', function($classes, $layer, $slide, $slider){
$classes[] = 'my-layer';
return $classes;
}, 10, 4);
revslider_add_slider_base_post · action
Fires after the base markup of a slider has been generated.
Source: includes/output.class.php:724
Parameters
$output(RevSlider7Output) — the output object
revslider_add_slider_to_stage_post · action
Fires right after a slider has been added to the page output.
Source: includes/output.class.php:76
Parameters
$slider_id(int|string) — the slider id/alias$output(RevSlider7Output) — the output object
revslider_add_slider_to_stage_pre · action
Fires just before a slider is added to the page output.
Source: includes/output.class.php:64
Parameters
$slider_id(int|string) — the slider id/alias$output(RevSlider7Output) — the output object
revslider_add_youtube_api_html · filter
Filter the YouTube API HTML/script injected when a slider uses YouTube backgrounds.
Source: includes/output.class.php:1809
Parameters
$html(string) — the injected HTML$output(RevSlider7Output) — the output object
Returns: string — the HTML.
revslider_fe_javascript_output · action
Fires when the front-end initialisation JavaScript for a slider is output.
Source: includes/output.class.php:1160
Parameters
$slider(RevSliderSlider) — the slider object$html_id(string) — the container id
revslider_get_html_id · filter
Filter the HTML id used for the slider container element.
Source: includes/output.class.php:145
Parameters
$html_id(string) — the container id$output(RevSlider7Output) — the output object$raw(bool) — whether the raw id was requested
Returns: string — the container id.
revslider_html_output · filter
Filter the complete generated HTML of a slider right before it is echoed to the page.
Source: includes/output.class.php:730
Parameters
$content(string) — the full slider markup$output(RevSlider7Output) — the output object
Returns: string — the markup.
add_filter('revslider_html_output', function($content, $output){
return $content . '<!-- rendered by my theme -->';
}, 10, 2);
revslider_layer_content · filter
Filter the final rendered HTML of a single (non-video) layer.
Source: includes/output.class.php:1487
Parameters
$html_layer(string) — the rendered layer HTML (return this)$html_layer_original(string) — the original rendered layer HTML$slider_id(int) — the slider id$slide(RevSliderSlide) — the slide object$layer(array) — the layer definition
Returns: string — the layer HTML.
revslider_modify_layer_text · filter
Filter the text content of a layer at render time.
Source: includes/output.class.php:1204
Parameters
$text(string) — the layer text$layer(array) — the layer definition
Returns: string — the layer text.
revslider_modify_slider_settings · filter
Modify the JavaScript settings object emitted for a slider before it is printed.
Source: includes/output.class.php:1733
Parameters
$settings(array) — the JS settings$slider_id(int) — the slider id
Returns: array — the JS settings.
add_filter('revslider_modify_slider_settings', function($settings, $slider_id){
$settings['sliderLayout'] = 'fullwidth';
return $settings;
}, 10, 2);
revslider_post_add_js · action
Fires after the slider JavaScript block is written.
Source: includes/output.class.php:1660
Parameters
$output(RevSlider7Output) — the output object
revslider_pre_add_js · action
Fires before the slider JavaScript block is written.
Source: includes/output.class.php:1616
Parameters
$output(RevSlider7Output) — the output object
rs_action_link_type · filter
Filter the resolved link type of a layer link action.
Source: includes/output.class.php:498
Parameters
$link_type(string) — the link type
Returns: string — the link type.
rs_action_type · filter
Filter the resolved action type of a layer action (e.g. to register a custom action).
Source: includes/output.class.php:497
Parameters
$action(string) — the action type
Returns: string — the action type.
sr_add_image_lists · filter
Add extra images to the pre-load image list.
Source: includes/output.class.php:932
Parameters
$images(array) — the image list$output(RevSlider7Output) — the output object
Returns: array — the image list.
sr_add_slide_background_image_url · filter
Filter the resolved background image URL of a slide.
Source: includes/output.class.php:1430
Parameters
$img(string) — the image URL$slide(RevSliderSlide) — the slide object$output(RevSlider7Output) — the output object
Returns: string — the image URL.
sr_get_image_lists · filter
Filter the list of images collected for pre-loading.
Source: includes/output.class.php:870
Parameters
$images(array) — the image list$output(RevSlider7Output) — the output object
Returns: array — the image list.
Slider lifecycle
12 hooks · ↑ Back to top
revslider_api_save_slider_advanced_after · action
Fires after an advanced/partial slider save through the API.
Source: includes/api.class.php:1231
Parameters
$data(array) — the saved data$slider_id(int) — the slider id
revslider_api_save_slider_after · action
Fires after a slider has been saved through the editor/API. Used internally by the image optimizer to (re)generate optimized images.
Source: includes/api.class.php:1036
Parameters
$data(array) — the saved slider data$slider_id(int) — the slider id
add_action('revslider_api_save_slider_after', function($data, $slider_id){
// e.g. bust an external page cache for this slider
}, 10, 2);
revslider_duplicate_slider · action
Fires after a slider has been duplicated.
Source: includes/slider.class.php:865
Parameters
$new_slider_id(int) — the id of the new copy$old_slider_id(int) — the id of the source slider$slides(array) — the duplicated slides$slider(RevSliderSlider) — the slider object
revslider_save_slider_v7 · action · since 7.0.0
Fires after a slider’s parameters have been written to the database (v7 save).
Source: includes/slider.class.php:1123
Parameters
$slider_id(int) — the slider id
revslider_slider_delete_all_slides · action
Fires when all slides of a slider are deleted.
Source: includes/slider.class.php:591
Parameters
$slider_id(int) — the slider id
revslider_slider_init_by_data · filter
Filter the raw slider row data while a slider object is being initialised.
Source: includes/slider.class.php:146
Parameters
$data(array) — the slider row data$slider(RevSliderSlider) — the slider object
Returns: array — the slider row data.
revslider_slider_init_by_data_post · action
Fires after a slider object has finished initialising from data.
Source: includes/slider.class.php:166
Parameters
$slider(RevSliderSlider) — the slider object
revslider_slider_on_delete_slider · action
Fires when a slider is deleted.
Source: includes/slider.class.php:578
Parameters
$slider_id(int) — the slider id
sr_get_full_slider_JSON · filter
Filter the full slider JSON object used by the editor, export and REST endpoints.
Source: includes/slider.class.php:3144
Parameters
$obj(array) — the full slider object$slider(RevSliderSlider) — the slider object$raw(bool) — whether raw data was requested$modify(bool) — whether modifications are allowed
Returns: array — the slider object.
sr_get_full_slider_object · filter
Filter the full slider object right before it is returned by the API/REST endpoint.
Source: includes/api.class.php:1172
Parameters
$JSON(array) — the slider object$slider(RevSliderSlider) — the slider object
Returns: array — the slider object.
sr_get_slider_modal_data · filter
Filter the data returned for a slider opened as a modal.
Source: includes/api.class.php:1114
Parameters
$obj(array) — the modal data$slider_id(int) — the slider id
Returns: array — the modal data.
sr_get_sliders_short_list · filter
Filter the lightweight list of sliders (id, title, alias, settings) used by admin menus.
Source: includes/slider.class.php:1238
Parameters
$sliders(array) — slider_id => [id, title, alias, settings]
Returns: array — the sliders list.
Slide lifecycle
14 hooks · ↑ Back to top
revslider_get_layers · filter
Filter the layers array of a slide.
Source: includes/slide.class.php:144
Parameters
$layers(array) — the layers$slide(RevSliderSlide) — the slide object
Returns: array — the layers.
revslider_get_slides · filter
Filter the array of slide objects belonging to a slider (e.g. to reorder, add or remove slides).
Source: includes/slider.class.php:1306
Parameters
$slides(RevSliderSlide[]) — the slides keyed by id$published(bool) — only published slides were requested$allwpml(bool) — all WPML languages were requested$first(bool) — only the first slide was requested
Returns: array — the slides.
add_filter('revslider_get_slides', function($slides, $published, $allwpml, $first){
return $slides; // inspect / reorder here
}, 10, 4);
revslider_slide_createSlide · filter
Filter the database insert payload when a new slide is created.
Source: includes/slide.class.php:1913
Parameters
$insert(array) — the insert row$slider_id(int) — the slider id$static(bool) — whether this is the static/global slide$slide(RevSliderSlide) — the slide object
Returns: array — the insert row.
revslider_slide_deleteSlide · action
Fires when a slide is deleted.
Source: includes/slide.class.php:489
Parameters
$slide_id(int) — the slide id
revslider_slide_get_image_attributes · filter
Filter the image attributes (src, alt, title, …) resolved for a slide image.
Source: includes/slide.class.php:2375
Parameters
$attributes(array) — the image attributes
Returns: array — the image attributes.
revslider_slide_get_layers_for_export · filter
Filter the layers of a slide as they are prepared for export.
Source: includes/slide.class.php:2250
Parameters
$layers(array) — the layers$slide(RevSliderSlide) — the slide object
Returns: array — the layers.
revslider_slide_get_params · filter
Filter a slide’s parameters when they are read.
Source: includes/slide.class.php:137
Parameters
$params(array) — the slide params$slide(RevSliderSlide) — the slide object
Returns: array — the slide params.
revslider_slide_get_settings · filter
Filter a slide’s settings when they are read.
Source: includes/slide.class.php:123
Parameters
$settings(array) — the slide settings$slide(RevSliderSlide) — the slide object
Returns: array — the slide settings.
revslider_slide_saveLayers · filter
Filter a slide’s layers right before they are written to the database.
Source: includes/slide.class.php:1789
Parameters
$layers(array) — the layers$static_slide(bool) — whether this is the static slide$slide(RevSliderSlide) — the slide object
Returns: array — the layers.
revslider_slide_saveParams · filter
Filter a slide’s params right before they are written to the database.
Source: includes/slide.class.php:1840
Parameters
$params(array) — the slide params$static_slide(bool) — whether this is the static slide$slide(RevSliderSlide) — the slide object
Returns: array — the slide params.
revslider_slide_save_settings · filter
Filter a slide’s settings right before they are written to the database.
Source: includes/slide.class.php:1868
Parameters
$settings(array) — the slide settings$static_slide(bool) — whether this is the static slide$slide(RevSliderSlide) — the slide object
Returns: array — the slide settings.
revslider_slide_updateSlideFromData_post · action
Fires after a slide has been updated from a data array.
Source: includes/slide.class.php:436
Parameters
$unused(bool) — always false$data(array) — the slide data$slide(RevSliderSlide) — the slide object
save_slide_v7 · action · since 7.0.0
Fires after a slide has been saved (v7 format).
Source: includes/slide.class.php:437
Parameters
$unused(bool) — always false$data(array) — the saved slide data$slide(RevSliderSlide) — the slide object
sr_api_save_slide · action
Fires after a slide has been saved through the API.
Source: includes/api.class.php:1736
Parameters
$return(mixed) — the save result$slider_id(int) — the slider id
Import & export
15 hooks · ↑ Back to top
revslider_doing_html_export · filter
Filter the slider object during a static HTML export.
Source: admin/includes/export-html.class.php:45
Parameters
$slider(RevSliderSlider) — the slider$slider_id(int) — the slider id$export(object) — the HTML export object
Returns: object — the slider.
revslider_exportSlider_export_data · filter
Filter the serialized slider export payload (slider_data.json contents).
Source: admin/includes/export.class.php:220
Parameters
$data(string) — the JSON export data$export(RevSliderSliderExport) — the export object
Returns: string — the export data.
revslider_export_html_write_footer · action
Fires while the footer of a static HTML export is written.
Source: admin/includes/export-html.class.php:146
Parameters
$export(object) — the HTML export object
revslider_export_html_write_header · action
Fires while the header of a static HTML export is written.
Source: admin/includes/export-html.class.php:127
Parameters
$export(object) — the HTML export object
revslider_export_slider_update · filter
Filter the slider object before it is exported (after any version upgrade).
Source: admin/includes/export.class.php:62
Parameters
$slider(RevSliderSliderExport) — the slider being exported$id(int) — the slider id
Returns: object — the slider.
revslider_html_export_path_replace_urls · filter
Filter the replacement paths used during a static HTML export.
Source: admin/includes/export-html.class.php:200
Parameters
$replace(array) — the replacement paths
Returns: array — the replacement paths.
revslider_html_export_replace_urls · filter
Filter the list of URLs searched for during a static HTML export.
Source: admin/includes/export-html.class.php:199
Parameters
$search(array) — the search URLs
Returns: array — the search URLs.
revslider_import_image_path · filter
Filter the target path images are imported into.
Source: includes/data.class.php:96
Parameters
$image_path(string) — the import image path
Returns: string — the image path.
revslider_import_image_path_v6 · filter
Filter the target path images are imported into for v6 imports.
Source: includes/data.class.php:123
Parameters
$image_path(string) — the import image path
Returns: string — the image path.
revslider_import_media_allowed_mimes · filter
Filter the allowed mime types when media is imported into the media library.
Source: includes/functions.class.php:858
Parameters
$allowed_mimes(array) — extension => mime map$filename(string) — the file being imported
Returns: array — the allowed mimes.
revslider_import_media_insert_attachment_before · filter
Filter the attachment paths just before an imported media file is inserted into the media library.
Source: includes/functions.class.php:852
Parameters
$paths(array) — the file paths/metadata
Returns: array — the paths.
revslider_slider_imported · action
Fires after a slider has been fully imported. Used internally to batch-optimize the imported images.
Source: admin/includes/import.class.php:140
Parameters
$slider_id(int) — the new slider id
add_action('revslider_slider_imported', function($slider_id){
// post-process the freshly imported slider
});
revslider_slider_pack_export · filter
Return true to add an info.cfg marker to the export (slider-pack export).
Source: admin/includes/export.class.php:428
Parameters
$pack(bool) —falseby default
Returns: bool — whether to write the pack marker.
sr_exportSlider_usedMedia · filter
Filter the list of media files bundled into a slider export zip.
Source: admin/includes/export.class.php:203
Parameters
$used_media(array) — media URLs/paths$slides(array) — the slides$params(array) — the slider params
Returns: array — the used media.
sr_load_slider_json · filter
Filter the slider JSON as it is loaded for front-end output or HTML export.
Source: public/revslider-front.class.php:355
Parameters
$data(array) — the slider JSON$context(object) — the loading object
Returns: array — the slider JSON.
Fonts
3 hooks · ↑ Back to top
punchfonts_collect_fonts_v7 · filter
Filter the set of fonts collected as “in use” before the font CSS is generated.
Source: includes/fonts.class.php:554
Parameters
$used_fonts(array) — the collected fonts
Returns: array — the collected fonts.
revslider_data_get_font_familys · filter
Filter the list of font families available in the editor.
Source: includes/data.class.php:286
Parameters
$fonts(array) — the font families
Returns: array — the font families.
revslider_printCleanFontImport · filter
Filter the generated font @import / @font-face output.
Source: includes/fonts.class.php:214
Parameters
$css(string) — the font CSS
Returns: string — the font CSS.
Object library & navigation
7 hooks · ↑ Back to top
revslider_delete_custom_library_item · filter
Filter the result of deleting a custom object library item.
Source: includes/object-library.class.php:984
Parameters
$return(mixed) — the result$id(int) — the item id$type(string) — the item type
Returns: mixed — the result.
revslider_get_custom_svgs · filter
Filter the user’s custom SVGs in the object library.
Source: includes/object-library.class.php:681
Parameters
$svgcustom(array) — the custom SVGs
Returns: array — the custom SVGs.
revslider_get_font_icons · filter
Filter the available font icon sets.
Source: includes/object-library.class.php:757
Parameters
$font_icons(array) — the font icons
Returns: array — the font icons.
revslider_get_svg_sets · filter
Filter the available SVG sets in the object library.
Source: includes/object-library.class.php:616
Parameters
$svg_sets(array) — the SVG sets
Returns: array — the SVG sets.
revslider_mod_default_navigations · filter
Filter the list of built-in navigation skins.
Source: includes/navigation.class.php:309
Parameters
$navigations(array) — the navigations
Returns: array — the navigations.
revslider_object_library_icon_paths · filter
Filter the filesystem paths searched for icon fonts.
Source: includes/object-library.class.php:689
Parameters
$paths(array) — the icon font paths
Returns: array — the paths.
revslider_upload_custom_library_item · filter
Filter the result of uploading a custom object library item.
Source: includes/object-library.class.php:924
Parameters
$return(mixed) — the result$data(array) — the uploaded item data
Returns: mixed — the result.
Front-end loading
7 hooks · ↑ Back to top
revslider_include_libraries · filter
Control whether the Slider Revolution front-end JavaScript libraries are enqueued.
Source: public/revslider-front.class.php:200
Parameters
$load(bool) — whether to load the libraries
Returns: bool — whether to load.
add_filter('revslider_include_libraries', '__return_true');
revslider_js_add_header_scripts · filter
Filter the inline header script block emitted by Slider Revolution.
Source: public/revslider-front.class.php:300
Parameters
$script(string) — the header script HTML
Returns: string — the header script.
revslider_meta_generator · filter
Filter (or empty out) the Slider Revolution “generator” meta tag printed in the head.
Source: public/revslider-front.class.php:41
Parameters
$tag(string) — the meta tag HTML
Returns: string — the meta tag (return ” to remove it).
add_filter('revslider_meta_generator', '__return_empty_string');
revslider_stream_http_timeout · filter
Filter the HTTP timeout (seconds) used when fetching social stream data (YouTube, Vimeo, Flickr, …) on the render path.
Source: includes/external/youtube.class.php:71
Parameters
$timeout(int) — the timeout in seconds (default 8)
Returns: int — the timeout.
rs_page_template_post_content · action
Fires after the content area of the Slider Revolution page template.
Source: public/views/revslider-page-template.php:42
rs_page_template_pre_content · action
Fires before the content area of the Slider Revolution page template.
Source: public/views/revslider-page-template.php:28
sr_front_add_scripts · action
Fires when the front-end scripts are registered/enqueued.
Source: public/revslider-front.class.php:57
Parameters
$front(RevSliderFront) — the front-end object
Settings, roles & options
6 hooks · ↑ Back to top
revslider_admin_onAjaxAction_user_restriction · filter
Allow or deny a specific admin AJAX action for a restricted (non-administrator) user. Return non-false to take over the response.
Source: includes/api.class.php:163
Parameters
$return(bool|mixed) —falseto keep default handling$module(string) — the action module$data(array) — the request data$slider(RevSliderSlider) — the slider object$slide(RevSliderSlide) — the slide object
Returns: bool|mixed — false to continue, or a response to send.
revslider_restrict_role · filter
Control whether capability checks are restricted (used by the role-based access logic).
Source: includes/functions.class.php:28
Parameters
$restrict(bool) — whether to restrict (default true)
Returns: bool — whether to restrict.
revslider_update_all_options · action
Fires after the global Slider Revolution options have been updated.
Source: includes/functions.class.php:1979
Parameters
$options(array) — the new options$field(string) — the option field that was written
rs_get_global_settings · filter
Filter the Slider Revolution global settings array.
Source: includes/functions.class.php:57
Parameters
$gs(array) — the global settings
Returns: array — the global settings.
rs_shortcode_skip_functions · filter
Filter the map of functions whose presence in the call stack suppresses slider shortcode rendering (e.g. SEO/structured-data passes).
Source: revslider.php:142
Parameters
$skip_functions(array) — class => method (or keyless method) map
Returns: array — the skip map.
set_revslider_slug · filter
Filter the plugin slug constant (RS_PLUGIN_SLUG).
Source: revslider.php:24
Parameters
$slug(string) — the slug (default ‘revslider’)
Returns: string — the slug.
Add-ons & AJAX API
5 hooks · ↑ Back to top
revslider_api_get_addon_lang · filter
Provide add-on language strings to the editor.
Source: includes/api.class.php:2229
Parameters
$lang(array) — language strings
Returns: array — the language strings.
revslider_api_get_addon_values · filter
Provide add-on default values to the editor.
Source: includes/api.class.php:2230
Parameters
$values(array) — the values
Returns: array — the values.
revslider_do_ajax · filter
Handle a custom admin AJAX action that the core does not recognise. Return non-empty to provide the response (the primary add-on AJAX entry point).
Source: includes/api.class.php:850
Parameters
$return(mixed) — the response (empty string by default)$module(string) — the action module$operation(string) — the operation$suboperation(string) — the sub-operation$data(array) — the request data
Returns: mixed — the response to send back.
add_filter('revslider_do_ajax', function($return, $module, $operation, $suboperation, $data){
if($module === 'myaddon') return ['ok' => true];
return $return;
}, 10, 5);
revslider_get_slider_html_addition · filter
Filter additional HTML appended to a slider’s AJAX HTML response.
Source: includes/api.class.php:1075
Parameters
$return(string) — the extra HTML$output(RevSlider7Output) — the output object
Returns: string — the extra HTML.
sr_get_addon_data · filter
Filter the metadata describing an add-on.
Source: admin/includes/addons.class.php:146
Parameters
$addon(object) — the add-on data$slug(string) — the add-on slug
Returns: object — the add-on data.
