wpseo_allow_system_file_edit
Filter: wpseo_allow_system_file_edit Allow developers to change whether the editing of .htaccess and robots.txt is allowed.
Использование
add_filter( 'wpseo_allow_system_file_edit', 'wp_kama_wpseo_allow_system_file_edit_filter' ); /** * Function for `wpseo_allow_system_file_edit` filter-hook. * * @param bool $allowed Whether file editing is allowed. * * @return bool */ function wp_kama_wpseo_allow_system_file_edit_filter( $allowed ){ // filter... return $allowed; }
- $allowed(true|false)
- Whether file editing is allowed.
Где вызывается хук
wpseo_allow_system_file_edit
yoast/inc/class-wpseo-utils.php 48
return apply_filters( 'wpseo_allow_system_file_edit', $allowed );