updated plugin Easy Digital Downloads version 3.1.1.2

This commit is contained in:
2023-03-17 22:34:04 +00:00
committed by Gitium
parent e8a66564bd
commit 19e086d1c4
647 changed files with 20986 additions and 27305 deletions

View File

@ -18,9 +18,11 @@ function localize() {
'wp-block-editor',
'EDDBlocks',
array(
'current_user' => md5( $user->user_email ),
'all_access' => function_exists( 'edd_all_access' ),
'recurring' => function_exists( 'EDD_Recurring' ),
'current_user' => md5( $user->user_email ),
'all_access' => function_exists( 'edd_all_access' ),
'recurring' => function_exists( 'EDD_Recurring' ),
'is_pro' => edd_is_pro(),
'no_redownload' => edd_no_redownload(),
)
);
}

View File

@ -28,17 +28,29 @@ function pages( $settings ) {
$pages = edd_get_pages();
// Login page.
$settings['pages']['login_page'] = array(
'id' => 'login_page',
'name' => __( 'Login Page', 'easy-digital-downloads' ),
'desc' => __( 'This page must include the EDD Login block. Setting this allows the front end form to be used for resetting passwords.', 'easy-digital-downloads' ),
'type' => 'select',
'options' => $pages,
'chosen' => true,
'placeholder' => __( 'Select a page', 'easy-digital-downloads' ),
$login_description = __( 'This page must include the EDD Login block. Setting this allows the front end form to be used for resetting passwords.', 'easy-digital-downloads' );
$login_description .= '<br />';
$login_description .= sprintf(
/* translators: 1. opening code tag, do not translate; 2. closing code tag, do not translate. */
__( 'Do not use this with the %1$s[edd_login]%2$s shortcode; it does not support resetting passwords.', 'easy-digital-downloads' ),
'<code>',
'</code>'
);
// Login page.
$login_page = array(
array(
'id' => 'login_page',
'name' => __( 'Login Page', 'easy-digital-downloads' ),
'desc' => $login_description,
'type' => 'select',
'options' => $pages,
'chosen' => true,
'placeholder' => __( 'Select a page', 'easy-digital-downloads' ),
),
);
array_splice( $settings['pages'], -1, 0, $login_page );
if ( ! empty( $settings['pages']['purchase_page']['desc'] ) ) {
$description = __( 'This is the checkout page where customers will complete their purchases.', 'easy-digital-downloads' );
$description .= '<br />';
@ -169,3 +181,19 @@ function button_colors( $args ) {
}
echo '</div>';
}
add_filter( 'edd_settings_misc', __NAMESPACE__ . '\disable_redownload' );
/**
* Update the text for the `disable_redownload` setting.
*
* @since 2.0.4
* @param array $settings
* @return array
*/
function disable_redownload( $settings ) {
if ( ! empty( $settings['file_downloads']['disable_redownload']['desc'] ) ) {
$settings['file_downloads']['disable_redownload']['desc'] = __( 'Do not allow users to redownload items from their order history.', 'easy-digital-downloads' );
}
return $settings;
}