863 | | //temporary_hook #25368 |
864 | | do_action( 'temp_dynamic_sidebar_before', $index, false ); |
865 | | //temporary_hook #25368 |
866 | | do_action( 'temp_dynamic_sidebar_after', $index, false ); |
867 | | //temporary_hook #25368 |
868 | | return apply_filters( 'temp_dynamic_sidebar_has_widgets', false, $index ); |
| 863 | /** This action is documented in wp-includes/widgets.php */ |
| 864 | do_action( 'dynamic_sidebar_before', $index, false ); |
| 865 | /** This action is documented in wp-includes/widgets.php */ |
| 866 | do_action( 'dynamic_sidebar_after', $index, false ); |
| 867 | /** This filter is documented in wp-includes/widgets.php */ |
| 868 | return apply_filters( 'dynamic_sidebar_has_widgets', false, $index ); |
871 | | //temporary_hook #25368 |
872 | | do_action( 'temp_dynamic_sidebar_before', $index, true ); |
| 871 | /** |
| 872 | * Fires before widgets are rendered in a dynamic sidebar. |
| 873 | * |
| 874 | * Note: The action also fires for empty sidebars, and on both the front-end |
| 875 | * and back-end, including the Inactive Widgets sidebar on the Widgets screen. |
| 876 | * |
| 877 | * @since 3.9.0 |
| 878 | * |
| 879 | * @param int|string $index Index, name, or ID of the dynamic sidebar. |
| 880 | * @param bool $has_widgets Whether the sidebar is populated with widgets. |
| 881 | * Default true. |
| 882 | */ |
| 883 | do_action( 'dynamic_sidebar_before', $index, true ); |
| 907 | /** |
| 908 | * Filter the parameters passed to a widget's display callback. |
| 909 | * |
| 910 | * Note: The filter is evaluated on both the front-end and back-end, |
| 911 | * including for the Inactive Widgets sidebar on the Widgets screen. |
| 912 | * |
| 913 | * @since 2.5.0 |
| 914 | * |
| 915 | * @see register_sidebar() |
| 916 | * |
| 917 | * @param array $params { |
| 918 | * @type array $args { |
| 919 | * An array of widget display arguments. |
| 920 | * |
| 921 | * @type string $name Name of the sidebar the widget is assigned to. |
| 922 | * @type string $id ID of the sidebar the widget is assigned to. |
| 923 | * @type string $description The sidebar description. |
| 924 | * @type string $class CSS class applied to the sidebar container. |
| 925 | * @type string $before_widget HTML markup to prepend to each widget in the sidebar. |
| 926 | * @type string $after_widget HTML markup to append to each widget in the sidebar. |
| 927 | * @type string $before_title HTML markup to prepend to the widget title when displayed. |
| 928 | * @type string $after_title HTML markup to append to the widget title when displayed. |
| 929 | * @type string $widget_id ID of the widget. |
| 930 | * @type string $widget_name Name of the widget. |
| 931 | * } |
| 932 | * @type array $widget_args { |
| 933 | * An array of multi-widget arguments. |
| 934 | * |
| 935 | * @type int $number Number increment used for multiples of the same widget. |
| 936 | * } |
| 937 | * } |
| 938 | */ |
900 | | do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] ); |
| 943 | /** |
| 944 | * Fires before a widget's display callback is called. |
| 945 | * |
| 946 | * Note: The action fires on both the front-end and back-end, including |
| 947 | * for widgets in the Inactive Widgets sidebar on the Widgets screen. |
| 948 | * |
| 949 | * The action is not fired for empty sidebars. |
| 950 | * |
| 951 | * @since 3.0.0 |
| 952 | * |
| 953 | * @param array $widget_id { |
| 954 | * An associative array of widget arguments. |
| 955 | * |
| 956 | * @type string $name Name of the widget. |
| 957 | * @type string $id Widget ID. |
| 958 | * @type array|callback $callback When the hook is fired on the front-end, $callback is an array |
| 959 | * containing the widget object. Fired on the back-end, $callback |
| 960 | * is 'wp_widget_control', see $_callback. |
| 961 | * @type array $params An associative array of multi-widget arguments. |
| 962 | * @type string $classname CSS class applied to the widget container. |
| 963 | * @type string $description The widget description. |
| 964 | * @type array $_callback When the hook is fired on the back-end, $_callback is populated |
| 965 | * with an array containing the widget object, see $callback. |
| 966 | * } |
| 967 | */ |
| 968 | do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] ); |
908 | | //temporary_hook #25368 |
909 | | do_action( 'temp_dynamic_sidebar_after', $index, true ); |
910 | | //temporary_hook #25368 |
911 | | $did_one = apply_filters( 'temp_dynamic_sidebar_has_widgets', $did_one, $index ); |
| 976 | /** |
| 977 | * Fires after widgets are rendered in a dynamic sidebar. |
| 978 | * |
| 979 | * Note: The action also fires for empty sidebars, and on both the front-end |
| 980 | * and back-end, including the Inactive Widgets sidebar on the Widgets screen. |
| 981 | * |
| 982 | * @since 3.9.0 |
| 983 | * |
| 984 | * @param int|string $index Index, name, or ID of the dynamic sidebar. |
| 985 | * @param bool $has_widgets Whether the sidebar is populated with widgets. |
| 986 | * Default true. |
| 987 | */ |
| 988 | do_action( 'dynamic_sidebar_after', $index, true ); |
| 989 | |
| 990 | /** |
| 991 | * Filter whether a sidebar has widgets. |
| 992 | * |
| 993 | * Note: The filter is also evaluated for empty sidebars, and on both the front-end |
| 994 | * and back-end, including the Inactive Widgets sidebar on the Widgets screen. |
| 995 | * |
| 996 | * @since 3.9.0 |
| 997 | * |
| 998 | * @param bool $did_one Whether at least one widget was rendered in the sidebar. |
| 999 | * Default false. |
| 1000 | * @param int|string $index Index, name, or ID of the dynamic sidebar. |
| 1001 | */ |
| 1002 | |
| 1003 | $did_one = apply_filters( 'dynamic_sidebar_has_widgets', $did_one, $index ); |
| 1004 | |
991 | | //temporary_hook #25368 |
992 | | $is_active_sidebar = apply_filters( 'temp_is_active_sidebar', $is_active_sidebar, $index ); |
993 | | return $is_active_sidebar; |
| 1084 | |
| 1085 | /** |
| 1086 | * Filter whether a dynamic sidebar is considered "active". |
| 1087 | * |
| 1088 | * @since 3.9.0 |
| 1089 | * |
| 1090 | * @param bool $is_active_sidebar Whether or not the sidebar should be considered "active". |
| 1091 | * In other words, whether the sidebar contains any widgets. |
| 1092 | * @param int|string $index Index, name, or ID of the dynamic sidebar. |
| 1093 | */ |
| 1094 | return apply_filters( 'is_active_sidebar', $is_active_sidebar, $index ); |