WP actions hooks and filter hooks

There are two types of hooks: Actions and Filters.

Actions allow you to add data or change how WordPress operates.

Filters give you the ability to change data during the execution of WordPress Core, plugins, and themes.

function add_action( $hook_name, $callback, $priority = 10, $accepted_args = 1 ) {
    return add_filter( $hook_name, $callback, $priority, $accepted_args );
}

function has_action( $hook_name, $callback = false ) {
	return has_filter( $hook_name, $callback );
}
public function has_filters() {
    foreach ($this->callbacks as $callbacks) {
        if ($callbacks) {
            return true;
        }
    }

    return false;
}

#php #wordpress #why

2025.11.27 12:17

Новая версия вордпресса

Запамятовав что запретно окаянный ворпдресс обновлять свершилось сие сомнительное действо.

Оказывается, в этой новой версии потрясающий новый редактор.

Восторг!

#wordpress #vostorg

2020.03.22 05:11