IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
| | 113 | * Hook a function or method to a specific filter action. |
| | 114 | * |
| | 115 | * @since 4.4.0 |
| | 116 | * |
| | 117 | * @param array $tags |
| | 118 | * @param callable $function_to_add |
| | 119 | * @param int $priority |
| | 120 | * @param int $accepted_args |
| | 121 | * |
| | 122 | * @return bool |
| | 123 | */ |
| | 124 | function add_multiple_filters( $tags, $function_to_add, $priority = 10, $accepted_args = 1 ) |
| | 125 | { |
| | 126 | if ( ! empty( $tags ) && is_array( $tags )) { |
| | 127 | foreach ($tags AS $tag) { |
| | 128 | add_filter( $tag, $function_to_add, $priority, $accepted_args ); |
| | 129 | } |
| | 130 | |
| | 131 | return true; |
| | 132 | } |
| | 133 | |
| | 134 | return false; |
| | 135 | } |
| | 136 | |
| | 137 | /** |
| 113 | 138 | * Check if any filter has been registered for a hook. |
| 114 | 139 | * |
| 115 | 140 | * @since 2.5.0 |
| … |
… |
|
| 456 | 481 | */ |
| 457 | 482 | function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) { |
| 458 | 483 | return add_filter($tag, $function_to_add, $priority, $accepted_args); |
| | 484 | } |
| | 485 | |
| | 486 | /** |
| | 487 | * Hooks a function on to a specific action. |
| | 488 | * |
| | 489 | * @since 4.4.0 |
| | 490 | * |
| | 491 | * @param array $tags |
| | 492 | * @param callable $function_to_add |
| | 493 | * @param int $priority |
| | 494 | * @param int $accepted_args |
| | 495 | * |
| | 496 | * @return bool |
| | 497 | */ |
| | 498 | function add_multiple_actions( $tags, $function_to_add, $priority = 10, $accepted_args = 1 ) |
| | 499 | { |
| | 500 | return add_multiple_filters( $tags, $function_to_add, $priority, $accepted_args ); |
| 459 | 501 | } |
| 460 | 502 | |
| 461 | 503 | /** |