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