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

@ -96,9 +96,9 @@ function edd_downloads_contextual_help() {
);
$screen->add_help_tab( array(
'id' => 'edd-purchase-shortcode',
'title' => __( 'Purchase Shortcode', 'easy-digital-downloads' ),
'content' =>
'id' => 'edd-purchase-shortcode',
'title' => __( 'Purchase Shortcode', 'easy-digital-downloads' ),
'content' =>
'<p>' . __( '<strong>Purchase Shortcode</strong> - If the automatic output of the purchase button has been disabled via the Download Configuration box, a shortcode can be used to output the button or link.', 'easy-digital-downloads' ) . '</p>' .
'<p><code>[purchase_link id="#" price="1" text="Add to Cart" color="blue"]</code></p>' .
'<ul>
@ -109,7 +109,11 @@ function edd_downloads_contextual_help() {
<li><strong>color</strong> - <em>' . implode( '</em> | <em>', $colors ) . '</em></li>
<li><strong>class</strong> - ' . __( 'One or more custom CSS classes you want applied to the button.', 'easy-digital-downloads' ) . '</li>
</ul>' .
'<p>' . sprintf( __( 'For more information, see <a href="%s">using Shortcodes</a> on the WordPress.org Codex or <a href="%s">Easy Digital Downloads Documentation</a>', 'easy-digital-downloads' ), 'https://codex.wordpress.org/Shortcode', 'https://docs.easydigitaldownloads.com/article/229-purchaselink' ) . '</p>'
'<p>' . sprintf(
__( 'For more information, see <a href="%s">using Shortcodes</a> on the WordPress.org Codex or <a href="%s">Easy Digital Downloads Documentation</a>', 'easy-digital-downloads' ),
'https://codex.wordpress.org/Shortcode',
'https://easydigitaldownloads.com/docs/purchase_link-shortcode/'
) . '</p>'
) );
/**

View File

@ -43,7 +43,7 @@ function edd_add_download_meta_box() {
}
}
}
add_action( 'add_meta_boxes', 'edd_add_download_meta_box' );
add_action( 'add_meta_boxes', 'edd_add_download_meta_box', 9 );
/**
* Returns default EDD Download meta fields.
@ -111,6 +111,25 @@ function edd_download_meta_box_save( $post_id, $post ) {
return;
}
edd_download_meta_box_fields_save( $post_id, $post );
}
add_action( 'save_post', 'edd_download_meta_box_save', 10, 2 );
/**
* Save post meta when the save_post action is called
*
* @since 3.2
* @param int $post_id Download (Post) ID.
* @global array $post All the data of the the current post.
* @return void
*/
function edd_download_meta_box_fields_save( $post_id, $post ) {
if ( ! current_user_can( 'edit_product', $post_id ) ) {
return;
}
// The default fields that get saved
$fields = edd_download_metabox_fields();
foreach ( $fields as $field ) {
@ -148,7 +167,6 @@ function edd_download_meta_box_save( $post_id, $post ) {
do_action( 'edd_save_download', $post_id, $post );
}
add_action( 'save_post', 'edd_download_meta_box_save', 10, 2 );
/**
* Sanitize bundled products on save
@ -312,7 +330,7 @@ function edd_render_price_field( $post_id ) {
<strong><?php echo apply_filters( 'edd_price_options_heading', __( 'Pricing Options:', 'easy-digital-downloads' ) ); ?></strong>
</p>
<div class="edd-form-group">
<div id="edd_variable_pricing_control" class="edd-form-group">
<div class="edd-form-group__control">
<input type="checkbox" class="edd-form-group__input" name="_variable_pricing" id="edd_variable_pricing" value="1" <?php checked( 1, $variable_pricing ); ?> />
<label for="edd_variable_pricing">