acf_get_field_group_edit_link() ACF 5.7.7
Checks if the current user can edit the field group and returns the edit url.
Хуков нет.
Возвращает
Строку.
Использование
acf_get_field_group_edit_link( $post_id );
- $post_id(число) (обязательный)
- The field group ID.
Список изменений
С версии 5.7.7 | Введена. |
Код acf_get_field_group_edit_link() acf get field group edit link ACF 5.9.1
function acf_get_field_group_edit_link( $post_id ) {
if( $post_id && acf_current_user_can_admin() ) {
return admin_url('post.php?post=' . $post_id . '&action=edit');
}
return '';
}