Skip to content

Commit

Permalink
Cron Flush Descriptions (#999)
Browse files Browse the repository at this point in the history
* Updated descriptions and added descriptions for time and interval.
  • Loading branch information
jacobd91 authored Dec 2, 2024
1 parent 9ed2e12 commit 7655741
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Extension_AlwaysCached_Page_View_BoxCron.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
'label' => esc_html__( 'Start Time', 'w3-total-cache' ),
'control' => 'selectbox',
'selectbox_values' => $time_options,
'description' => esc_html__( 'This setting controls the initial start time of the cron job based on the configured WordPress timezone. It will automatically adjust the timestamp to accommodate differences between the configured WordPress and server timezones. If the selected time has already passed, it will add a day so that it begins the next day.', 'w3-total-cache' ),
'description' => esc_html__( 'This setting controls the initial start time of the cron job. If the selected time has already passed, it will schedule the job for the following day at the selected time.', 'w3-total-cache' ),
'disabled' => $pgcache_disabled || $wp_cron_disabled,
)
);
Expand Down
24 changes: 23 additions & 1 deletion inc/options/dbcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,27 @@

<?php Util_Ui::postbox_header( esc_html__( 'Purge via WP Cron', 'w3-total-cache' ), '', 'dbcache_wp_cron' ); ?>
<table class="form-table">
<p>
<?php
echo wp_kses(
sprintf(
// Translators: 1 opening HTML a tag, 2 closing HTML a tag.
__(
'Enabling this will schedule a WP-Cron event that will flush the Database Cache. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush db". Visit %1$shere%2$s for more information.',
'w3-total-cache'
),
'<a href="' . esc_url( 'https://www.boldgrid.com/support/w3-total-cache/schedule-cache-purges/' ) . '" target="_blank">',
'</a>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
)
);
?>
</p>
<?php
$c = Dispatcher::config();
$disabled = ! $c->get_boolean( 'dbcache.enabled' );
Expand Down Expand Up @@ -168,7 +189,6 @@
'label' => esc_html__( 'Enable WP-Cron Event', 'w3-total-cache' ),
'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ),
'control' => 'checkbox',
'description' => esc_html__( 'Enabling this will schedule a WP-Cron event that will flush the Database Cache. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush db".', 'w3-total-cache' ),
'disabled' => $disabled,
)
);
Expand All @@ -189,6 +209,7 @@
'label' => esc_html__( 'Start Time', 'w3-total-cache' ),
'control' => 'selectbox',
'selectbox_values' => $time_options,
'description' => esc_html__( 'This setting controls the initial start time of the cron job. If the selected time has already passed, it will schedule the job for the following day at the selected time.', 'w3-total-cache' ),
'disabled' => $disabled || $wp_disabled,
)
);
Expand All @@ -204,6 +225,7 @@
'daily' => esc_html__( 'Daily', 'w3-total-cache' ),
'weekly' => esc_html__( 'Weekly', 'w3-total-cache' ),
),
'description' => esc_html__( 'This setting controls the interval that the cron job should occur.', 'w3-total-cache' ),
'disabled' => $disabled || $wp_disabled,
)
);
Expand Down
20 changes: 19 additions & 1 deletion inc/options/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,23 @@
<?php
Util_Ui::postbox_header_tabs(
esc_html__( 'Purge via WP Cron', 'w3-total-cache' ),
esc_html__( 'Enabling this will schedule a WP-Cron event that will flush all enabled Caches. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush all". If the Always Cached extension is active and enabled, page cache entries will instead be added to the queue instead of being purged from the cache.', 'w3-total-cache' ),
wp_kses(
sprintf(
// Translators: 1 opening HTML a tag, 2 closing HTML a tag.
__(
'Enabling this will schedule a WP-Cron event that will flush all enabled Caches via a single cron job. Each cache\'s advanced settings page features similar settings to this if you wish to schedule purges for specific caches only. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush all". If the Always Cached extension is active and enabled, page cache entries will instead be added to the queue instead of being purged from the cache. Visit %1$shere%2$s for more information.',
'w3-total-cache'
),
'<a href="' . esc_url( 'https://www.boldgrid.com/support/w3-total-cache/schedule-cache-purges/' ) . '" target="_blank">',
'</a>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
)
),
'',
'allcache_wp_cron'
);
Expand Down Expand Up @@ -529,6 +545,7 @@
'label' => esc_html__( 'Start Time', 'w3-total-cache' ),
'control' => 'selectbox',
'selectbox_values' => $time_options,
'description' => esc_html__( 'This setting controls the initial start time of the cron job. If the selected time has already passed, it will schedule the job for the following day at the selected time.', 'w3-total-cache' ),
'disabled' => $wp_disabled,
)
);
Expand All @@ -544,6 +561,7 @@
'daily' => esc_html__( 'Daily', 'w3-total-cache' ),
'weekly' => esc_html__( 'Weekly', 'w3-total-cache' ),
),
'description' => esc_html__( 'This setting controls the interval that the cron job should occur.', 'w3-total-cache' ),
'disabled' => $wp_disabled,
)
);
Expand Down
24 changes: 23 additions & 1 deletion inc/options/minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,27 @@

<?php Util_Ui::postbox_header( esc_html__( 'Purge via WP Cron', 'w3-total-cache' ), '', 'minify_wp_cron' ); ?>
<table class="form-table">
<p>
<?php
echo wp_kses(
sprintf(
// Translators: 1 opening HTML a tag, 2 closing HTML a tag.
__(
'Enabling this will schedule a WP-Cron event that will flush the Minify Cache. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush minify". Visit %1$shere%2$s for more information.',
'w3-total-cache'
),
'<a href="' . esc_url( 'https://www.boldgrid.com/support/w3-total-cache/schedule-cache-purges/' ) . '" target="_blank">',
'</a>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
)
);
?>
</p>
<?php
$c = Dispatcher::config();
$disabled = ! $c->get_boolean( 'minify.enabled' );
Expand Down Expand Up @@ -1032,7 +1053,6 @@
'label' => esc_html__( 'Enable WP-Cron Event', 'w3-total-cache' ),
'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ),
'control' => 'checkbox',
'description' => esc_html__( 'Enabling this will schedule a WP-Cron event that will flush the Minify Cache. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush minify".', 'w3-total-cache' ),
'disabled' => $disabled,
)
);
Expand All @@ -1053,6 +1073,7 @@
'label' => esc_html__( 'Start Time', 'w3-total-cache' ),
'control' => 'selectbox',
'selectbox_values' => $time_options,
'description' => esc_html__( 'This setting controls the initial start time of the cron job. If the selected time has already passed, it will schedule the job for the following day at the selected time.', 'w3-total-cache' ),
'disabled' => $disabled || $wp_disabled,
)
);
Expand All @@ -1068,6 +1089,7 @@
'daily' => esc_html__( 'Daily', 'w3-total-cache' ),
'weekly' => esc_html__( 'Weekly', 'w3-total-cache' ),
),
'description' => esc_html__( 'This setting controls the interval that the cron job should occur.', 'w3-total-cache' ),
'disabled' => $disabled || $wp_disabled,
)
);
Expand Down
24 changes: 23 additions & 1 deletion inc/options/objectcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,27 @@

<?php Util_Ui::postbox_header( esc_html__( 'Purge via WP Cron', 'w3-total-cache' ), '', 'objectcache_wp_cron' ); ?>
<table class="form-table">
<p>
<?php
echo wp_kses(
sprintf(
// Translators: 1 opening HTML a tag, 2 closing HTML a tag.
__(
'Enabling this will schedule a WP-Cron event that will flush the Object Cache. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush object". Visit %1$shere%2$s for more information.',
'w3-total-cache'
),
'<a href="' . esc_url( 'https://www.boldgrid.com/support/w3-total-cache/schedule-cache-purges/' ) . '" target="_blank">',
'</a>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
)
);
?>
</p>
<?php
$c = Dispatcher::config();
$disabled = ! $c->get_boolean( 'objectcache.enabled' );
Expand Down Expand Up @@ -153,7 +174,6 @@
'label' => esc_html__( 'Enable WP-Cron Event', 'w3-total-cache' ),
'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ),
'control' => 'checkbox',
'description' => esc_html__( 'Enabling this will schedule a WP-Cron event that will flush the Object Cache. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush object".', 'w3-total-cache' ),
'disabled' => $disabled,
)
);
Expand All @@ -174,6 +194,7 @@
'label' => esc_html__( 'Start Time', 'w3-total-cache' ),
'control' => 'selectbox',
'selectbox_values' => $time_options,
'description' => esc_html__( 'This setting controls the initial start time of the cron job. If the selected time has already passed, it will schedule the job for the following day at the selected time.', 'w3-total-cache' ),
'disabled' => $disabled || $wp_disabled,
)
);
Expand All @@ -189,6 +210,7 @@
'daily' => esc_html__( 'Daily', 'w3-total-cache' ),
'weekly' => esc_html__( 'Weekly', 'w3-total-cache' ),
),
'description' => esc_html__( 'This setting controls the interval that the cron job should occur.', 'w3-total-cache' ),
'disabled' => $disabled || $wp_disabled,
)
);
Expand Down
24 changes: 23 additions & 1 deletion inc/options/pgcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,27 @@

<?php Util_Ui::postbox_header( esc_html__( 'Purge via WP Cron', 'w3-total-cache' ), '', 'pgcache_wp_cron' ); ?>
<table class="form-table">
<p>
<?php
echo wp_kses(
sprintf(
// Translators: 1 opening HTML a tag, 2 closing HTML a tag.
__(
'Enabling this will schedule a WP-Cron event that will flush the Page Cache. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush posts". If the Always Cached extension is active and enabled, page cache entries will instead be added to the queue instead of being purged from the cache. Visit %1$shere%2$s for more information.',
'w3-total-cache'
),
'<a href="' . esc_url( 'https://www.boldgrid.com/support/w3-total-cache/schedule-cache-purges/' ) . '" target="_blank">',
'</a>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
)
);
?>
</p>
<?php
$c = Dispatcher::config();
$disabled = ! $c->get_boolean( 'pgcache.enabled' );
Expand Down Expand Up @@ -877,7 +898,6 @@
'label' => esc_html__( 'Enable WP-Cron Event', 'w3-total-cache' ),
'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ),
'control' => 'checkbox',
'description' => esc_html__( 'Enabling this will schedule a WP-Cron event that will flush the Page Cache. If you prefer to use a system cron job instead of WP-Cron, you can schedule the following command to run at your desired interval: "wp w3tc flush posts". If the Always Cached extension is active and enabled, page cache entries will instead be added to the queue instead of being purged from the cache.', 'w3-total-cache' ),
'disabled' => $disabled,
)
);
Expand All @@ -898,6 +918,7 @@
'label' => esc_html__( 'Start Time', 'w3-total-cache' ),
'control' => 'selectbox',
'selectbox_values' => $time_options,
'description' => esc_html__( 'This setting controls the initial start time of the cron job. If the selected time has already passed, it will schedule the job for the following day at the selected time.', 'w3-total-cache' ),
'disabled' => $disabled || $wp_disabled,
)
);
Expand All @@ -913,6 +934,7 @@
'daily' => esc_html__( 'Daily', 'w3-total-cache' ),
'weekly' => esc_html__( 'Weekly', 'w3-total-cache' ),
),
'description' => esc_html__( 'This setting controls the interval that the cron job should occur.', 'w3-total-cache' ),
'disabled' => $disabled || $wp_disabled,
)
);
Expand Down

0 comments on commit 7655741

Please sign in to comment.