Update API.

This commit is contained in:
Hoang Huu 2019-10-12 10:18:38 +07:00
parent 82e5de4919
commit 174811f428
2 changed files with 10 additions and 10 deletions

@ -65,6 +65,13 @@ class Opalestate_Admin_API_Keys {
} else {
static::table_list_output();
}
?>
<style>
input[name="submit-cmb"] {
display: none !important;
}
</style>
<?php
}
/**
@ -84,13 +91,6 @@ class Opalestate_Admin_API_Keys {
]
);
}
?>
<style>
input[name="submit-cmb"] {
display: none !important;
}
</style>
<?php
}
/**
@ -201,7 +201,7 @@ class Opalestate_Admin_API_Keys {
$revoked = absint( $_GET['revoked'] ); // WPCS: input var okay, CSRF ok.
/* translators: %d: count */
Opalestate_Admin_Settings::add_message( sprintf( _n( '%d API key permanently revoked.', '%d API keys permanently revoked.', $revoked, 'opalestate-pro' ), $revoked ) );
// Opalestate_Admin_Settings::add_message( sprintf( _n( '%d API key permanently revoked.', '%d API keys permanently revoked.', $revoked, 'opalestate-pro' ), $revoked ) );
}
}

@ -56,7 +56,7 @@ defined( 'ABSPATH' ) || exit;
</label>
</th>
<td class="forminp">
<select id="key_permissions" class="wc-enhanced-select">
<select id="key_permissions" class="opalestate-enhanced-select">
<?php
$permissions = array(
'read' => __( 'Read', 'opalestate-pro' ),
@ -90,7 +90,7 @@ defined( 'ABSPATH' ) || exit;
<?php
if ( ! empty( $key_data['last_access'] ) ) {
/* translators: 1: last access date 2: last access time */
$date = sprintf( __( '%1$s at %2$s', 'opalestate-pro' ), date_i18n( wc_date_format(), strtotime( $key_data['last_access'] ) ), date_i18n( wc_time_format(), strtotime(
$date = sprintf( __( '%1$s at %2$s', 'opalestate-pro' ), date_i18n( get_option( 'date_format' ), strtotime( $key_data['last_access'] ) ), date_i18n( get_option( 'time_format' ), strtotime(
$key_data['last_access'] ) ) );
echo esc_html( apply_filters( 'opalestate_api_key_last_access_datetime', $date, $key_data['last_access'] ) );