Featured Articles comes with several actions and filters that allow you to control various functions of the sliders created by it.

Actions

All actions implemented in Featured Articles can be used just like any other WP action. Below, the order in which the parameters are displayed corresponds to the exact order that the actions are implemented.

fa-save-slide

fa-save-slide is an action triggered whenever a slide is created or updated. The action is triggered for both custom slides and other post types that are used as slides into a slider.

Parameters

$post_id
(integer) ID of post being saved.
$post
(object) The post object being saved.
$update
(boolean) Is a new post save (false) or an existing post update (true).


fa-save-slider

Runs when a Featured Articles slider is being saved.

Parameters

$post_id
(integer) ID of slider post being saved.
$post
The post object being saved.
$update
(boolean) Is a new post save (false) or an existing post update (true).
$values
(array) The values being saved for the edited slider.


fa_admin_notices

Allows additional admin notices to be displayed into plugin pages.

Parameters

None.


fa-remote-image-processed

Runs after a remote image for a video was successfully imported in WP Media Gallery.

Parameters

$attachment_id
(integer) ID of newly created attachment.
$post_id
(integer) ID of post having the image attached to it.
$video
(array )Array containing the video details for the image imported.


fa_assign_post_to_slider

Runs when a post is assigned as slide to a slider.

Parameters

$post_id
(integer) ID of post being assigned to a slider.
$slider_id
(integer) ID of slider the post is assigned as slide to.


fa_assign_image_to_slider

Runs when a given set of images is assigned as slides to a given slider.

Parameters

$slider_id
(integer) ID of slider that the images are set as slides for.
$images
(array) Array of image id’s.


fa_slider_post_slides

Runs after getting the slides for a slider made automatically from posts, just before displaying the slider in front-end.

Parameters

$slides
(array) An array containing all post objects for the posts to be used as slides into the slider.
$slider_id
(int) ID of slider being displayed.


fa_slider_display

Action running when displaying any slider in front-end.

Parameters

$slider_id
(integer) ID of slider being displayed.
$dynamic_area
(string) Name of the dynamic area that the slider is displayed in (false if not displayed into a dynamic area).


fa_dynamic_area

Runs when a dynamic area displays the sliders assigned to it.

Parameters

$area
(string) Name of area being displayed.
$sliders
(array) Array of slider id’s being displayed into the current dynamic area.


slides_loop_end

Runs when the loop of the slides for a given slider has ended (ie. all slides were displayed into current slider).

Parameters

$slider_id
(integer) The ID of the slider being displayed.

Slider themes actions

Following actions are designed to be used only in Featured Articles slider themes functions.php file. By using them, a slider theme can add extra settings in slider editing page.

fa_slider_content_settings-$theme

Allows slider theme to display extra settings that extend the default content settings for sliders.

Parameters

$post
(object) – the current slider post being edited


fa_slider_images_settings-$theme

Allows display of extra media settings used by the slider theme into the default slider media settings.

Parameters


$post

(object) The current slider post being edited.


fa_theme_layout_settings-$theme

Allows display of extra slider theme settings used by the slider theme into the default slider settings.

Parameters

$post
(object) The current slider post being edited.


fa_theme_js_settings-$theme

Allows displaying of extra JavaScript settings used by the theme.

Parameters

$post
(object) The current slider post being edited.