acf_pro_render_manage_license_button()
Renders the "Manage License"/"Renew Subscription" button.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
acf_pro_render_manage_license_button( $status );
- $status(массив) (обязательный)
- The current license status.
Список изменений
| С версии 6.2.3 | Введена. |
Код acf_pro_render_manage_license_button() acf pro render manage license button ACF 6.4.2
function acf_pro_render_manage_license_button( $status ) {
// Lifetime licenses don't have anything to manage.
if ( ! empty( $status['lifetime'] ) ) {
return;
}
$url = acf_pro_get_manage_license_url( $status );
$url = acf_add_url_utm_tags( $url, 'updates page', 'manage license button' );
$text = __( 'Manage License', 'acf' );
$class = '';
if ( acf_pro_is_license_expired( $status ) || acf_pro_was_license_refunded( $status ) ) {
$text = __( 'Renew Subscription', 'acf' );
$class = ' acf-btn acf-renew-subscription';
}
printf(
'<a href="%1$s" target="_blank" class="acf-manage-license-btn%2$s">%3$s<i class="acf-icon acf-icon-arrow-up-right"></i></a>',
esc_url( $url ),
esc_attr( $class ),
esc_html( $text )
);
}