acf_pro_updates::modify_plugin_update_message
Displays an update message for plugin list screens.
Method of the class: acf_pro_updates{}
No Hooks.
Returns
null. Nothing (null).
Usage
$acf_pro_updates = new acf_pro_updates(); $acf_pro_updates->modify_plugin_update_message( $plugin_data, $response );
- $plugin_data(array) (required)
- An array of plugin metadata.
- $response(object) (required)
- An object of metadata about the available plugin update.
Changelog
| Since 5.3.8 | Introduced. |
acf_pro_updates::modify_plugin_update_message() acf pro updates::modify plugin update message code ACF 6.8.8
public function modify_plugin_update_message( $plugin_data, $response ) {
// Bail early if we have a key.
if ( acf_pro_get_license_key() ) {
return;
}
if ( is_multisite() ) {
/* translators: %1 A link to the updates page. %2 link to the pricing page */
$message = __( 'To enable updates, please enter your license key on the <a href="%1$s">Updates</a> page of the main site. If you don\'t have a license key, please see <a href="%2$s" target="_blank">details & pricing</a>.', 'acf' );
$updates_page_link = get_admin_url( get_main_site_id(), 'edit.php?post_type=acf-field-group&page=acf-settings-updates' );
} else {
/* translators: %1 A link to the updates page. %2 link to the pricing page */
$message = __( 'To enable updates, please enter your license key on the <a href="%1$s">Updates</a> page. If you don\'t have a license key, please see <a href="%2$s" target="_blank">details & pricing</a>.', 'acf' );
$updates_page_link = admin_url( 'edit.php?post_type=acf-field-group&page=acf-settings-updates' );
}
// Display message.
echo '<br />' . wp_kses_post( sprintf( $message, $updates_page_link, acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/pro/', 'ACF upgrade', 'updates' ) ) );
}