PHP Class Jetpack_Widget_Conditions, jetpack

Afficher le fichier Open project: automattic/jetpack Class Usage Examples

Méthodes publiques

Свойство Type Description
$passed_template_redirect

Méthodes publiques

Méthode Description
filter_widget ( array $instance ) : array Determine whether the widget should be displayed based on conditions set by the user.
generate_condition_key ( array $rule ) : string Generates a condition key based on the rule array
init ( )
maybe_get_split_term ( $old_term_id = '', $taxonomy = '' )
sidebars_widgets ( array $widget_areas ) : array Filter the list of widgets for a sidebar so that active sidebars work as expected.
strcasecmp_name ( $a, $b )
template_redirect ( )
widget_admin_setup ( )
widget_conditions_admin ( $widget, $return, array $instance ) Add the widget conditions to each widget in the admin.
widget_conditions_has_children ( ) This is the AJAX endpoint for the has_children input.
widget_conditions_has_children_echo ( $major = '', $minor = '', $has_children = false ) Provide an option to include children of pages.
widget_conditions_options ( ) This is the AJAX endpoint for the second level of conditions.
widget_conditions_options_echo ( $major = '', $minor = '' ) Provided a second level of granularity for widget conditions.
widget_update ( $instance, array $new_instance, array $old_instance ) : array On an AJAX update of the widget settings, process the display conditions.

Method Details

filter_widget() public static méthode

Determine whether the widget should be displayed based on conditions set by the user.
public static filter_widget ( array $instance ) : array
$instance array The widget settings.
Résultat array Settings to display or bool false to hide.

generate_condition_key() static public méthode

Generates a condition key based on the rule array
static public generate_condition_key ( array $rule ) : string
$rule array
Résultat string key used to retrieve the condition.

init() public static méthode

public static init ( )

maybe_get_split_term() public static méthode

public static maybe_get_split_term ( $old_term_id = '', $taxonomy = '' )

sidebars_widgets() public static méthode

Filter the list of widgets for a sidebar so that active sidebars work as expected.
public static sidebars_widgets ( array $widget_areas ) : array
$widget_areas array An array of widget areas and their widgets.
Résultat array The modified $widget_area array.

strcasecmp_name() public static méthode

public static strcasecmp_name ( $a, $b )

template_redirect() public static méthode

public static template_redirect ( )

widget_admin_setup() public static méthode

public static widget_admin_setup ( )

widget_conditions_admin() public static méthode

Add the widget conditions to each widget in the admin.
public static widget_conditions_admin ( $widget, $return, array $instance )
$widget unused.
$return unused.
$instance array The widget settings.

widget_conditions_has_children() public static méthode

This is the AJAX endpoint for the has_children input.
public static widget_conditions_has_children ( )

widget_conditions_has_children_echo() public static méthode

Provide an option to include children of pages.
public static widget_conditions_has_children_echo ( $major = '', $minor = '', $has_children = false )

widget_conditions_options() public static méthode

This is the AJAX endpoint for the second level of conditions.
public static widget_conditions_options ( )

widget_conditions_options_echo() public static méthode

Provided a second level of granularity for widget conditions.
public static widget_conditions_options_echo ( $major = '', $minor = '' )

widget_update() public static méthode

On an AJAX update of the widget settings, process the display conditions.
public static widget_update ( $instance, array $new_instance, array $old_instance ) : array
$new_instance array New settings for this instance as input by the user.
$old_instance array Old settings for this instance.
Résultat array Modified settings.

Property Details

$passed_template_redirect static_oe public_oe property

static public $passed_template_redirect