Skip to content

Commit

Permalink
Update admin + tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MickeyKay committed Sep 13, 2020
1 parent 5cecb12 commit 1a1be79
Show file tree
Hide file tree
Showing 11 changed files with 4,267 additions and 16 deletions.
12 changes: 6 additions & 6 deletions better-font-awesome.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ function add_settings() {
);

add_settings_field(
'version_update_frequency', // ID
__( 'Version update frequency', 'better-font-awesome' ), // Title
array( $this, 'version_update_frequency_callback' ), // Callback
'version_check_frequency', // ID
__( 'Version check frequency', 'better-font-awesome' ), // Title
array( $this, 'version_check_frequency_callback' ), // Callback
self::SLUG, // Page
'settings_section_primary' // Section
);
Expand All @@ -413,7 +413,7 @@ function add_settings() {
'settings_section_primary',
array(
'id' => 'include_v4_shim',
'description' => __( 'Include the Font Awesome v4 CSS shim to support legacy icons (<a href="https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4" target="_blank">more details</a>).', 'better-font-awesome' ),
'description' => __( 'Include the Font Awesome v4 CSS shim to support legacy icons (<a href="https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes" target="_blank">more details</a>).', 'better-font-awesome' ),
)
);

Expand Down Expand Up @@ -512,12 +512,12 @@ public function version_callback() {
*
* @since 2.0.0
*/
public function version_update_frequency_callback() {
public function version_check_frequency_callback() {
$current_time = time();
$expiration_time = time() + $this->bfa_lib->get_transient_expiration() - 1; // -1 to improve readability (e.g. "24 hours" instead of "1 days")
$human_readable_expiration = human_time_diff( $current_time, $expiration_time );

echo "<code>{$human_readable_expiration}</code> (The plugin will automatically check for new available versions of Font Awesome at this frequency)";
echo "<code>{$human_readable_expiration}</code> (The plugin automatically uses the latest version of Font Awesome, and checks for updates at this frequency)";
}

/**
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"mickey-kay/better-font-awesome-library": "v2.0.0-beta3"
},
"require-dev": {
"phpunit/phpunit": "^7"
}
}
Loading

0 comments on commit 1a1be79

Please sign in to comment.