WPSEO_Role_Manager_WP::format_capabilities()
Formats the capabilities to the required format.
Метод класса: WPSEO_Role_Manager_WP{}
Хуков нет.
Возвращает
Массив
. Formatted capabilities.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->format_capabilities( $capabilities, $enabled );
- $capabilities(массив) (обязательный)
- Capabilities to format.
- $enabled(true|false)
- Whether these capabilities should be enabled or not.
По умолчанию: true
Код WPSEO_Role_Manager_WP::format_capabilities() WPSEO Role Manager WP::format capabilities Yoast 22.4
protected function format_capabilities( array $capabilities, $enabled = true ) { // Flip keys and values. $capabilities = array_flip( $capabilities ); // Set all values to $enabled. return array_fill_keys( array_keys( $capabilities ), $enabled ); }