Skip to content

Commit 427f4bb

Browse files
Merge branch 'develop' into feature/campaign-shortcodes-GIVE-2391-2392
2 parents ad300a9 + 2f63c7c commit 427f4bb

File tree

62 files changed

+2259
-1582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2259
-1582
lines changed

give.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
77
* Author: GiveWP
88
* Author URI: https://givewp.com/
9-
* Version: 4.0.0
9+
* Version: 4.1.0
1010
* Requires at least: 6.5
1111
* Requires PHP: 7.4
1212
* Text Domain: give
@@ -420,7 +420,7 @@ private function setup_constants()
420420
{
421421
// Plugin version.
422422
if (!defined('GIVE_VERSION')) {
423-
define('GIVE_VERSION', '4.0.0');
423+
define('GIVE_VERSION', '4.1.0');
424424
}
425425

426426
// Plugin Root File.

includes/actions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ function _give_save_donor_billing_address( $payment_id ) {
213213
/**
214214
* Verify addon dependency before addon update
215215
*
216-
* @unreleased add bailout for GiveWP to protect it from licensing issues
216+
* @since 4.1.0 add bailout for GiveWP to protect it from licensing issues
217217
* @since 2.1.4
218218
*
219219
* @param $error

includes/admin/class-admin-settings.php

+32-27
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,17 @@ public static function get_option( $option_name = '', $field_id = '', $default =
316316
* Output admin fields.
317317
*
318318
* Loops though the give options array and outputs each field.
319-
*
320-
* @todo Refactor this function
321-
*
319+
*
320+
* @since 4.1.0 Display tabs only when there is more than one group available
322321
* @since 1.8
323322
* @access public
324-
*
325-
* @param array $sections Opens array to output.
326-
* @param string $option_name Opens array to output.
323+
*
324+
* @param array $sections Opens array to output.
325+
* @param string $option_name Opens array to output.
327326
*
328327
* @return void
328+
* @todo Refactor this function
329+
*
329330
*/
330331
public static function output_fields( $sections, $option_name = '' ) {
331332

@@ -338,25 +339,29 @@ public static function output_fields( $sections, $option_name = '' ) {
338339
$defaultGroup = current( array_keys( $groups ) );
339340
?>
340341
<div class="give-settings-section-content">
341-
<div class="give-settings-section-group-menu">
342-
<ul>
343-
<?php
344-
foreach ( $groups as $slug => $group ) {
345-
$current_group = ! empty( $_GET['group'] ) ? give_clean( $_GET['group'] ) : $defaultGroup;
346-
$active_class = ( $slug === $current_group ) ? 'active' : '';
347-
348-
echo sprintf(
349-
'<li><a class="%1$s" href="%2$s" data-group="%3$s">%4$s</a></li>',
350-
esc_html( $active_class ),
351-
esc_url( admin_url( "edit.php?post_type=give_forms&page={$current_page}&tab={$current_tab}&section={$current_section}&group={$slug}" ) ),
352-
esc_html( $slug ),
353-
esc_html( $group )
354-
);
355-
}
356-
?>
357-
</ul>
358-
</div>
359-
<div class="give-settings-section-group-content">
342+
<?php
343+
if (count($groups) > 1) : ?>
344+
<div class="give-settings-section-group-menu">
345+
<ul>
346+
<?php
347+
foreach ($groups as $slug => $group) {
348+
$current_group = ! empty($_GET['group']) ? give_clean($_GET['group']) : $defaultGroup;
349+
$active_class = ($slug === $current_group) ? 'active' : '';
350+
351+
echo sprintf(
352+
'<li><a class="%1$s" href="%2$s" data-group="%3$s">%4$s</a></li>',
353+
esc_html($active_class),
354+
esc_url(admin_url("edit.php?post_type=give_forms&page={$current_page}&tab={$current_tab}&section={$current_section}&group={$slug}")),
355+
esc_html($slug),
356+
esc_html($group)
357+
);
358+
}
359+
?>
360+
</ul>
361+
</div>
362+
<?php
363+
endif; ?>
364+
<div class="give-settings-section-group-content">
360365
<?php
361366
foreach ( $sections as $group => $fields ) {
362367
$current_group = ! empty( $_GET['group'] ) ? give_clean( $_GET['group'] ) : $defaultGroup;
@@ -446,7 +451,7 @@ public static function output_fields( $sections, $option_name = '' ) {
446451
/**
447452
* This function will help you prepare the admin settings field.
448453
*
449-
* @unreleased Added support for code editor field.
454+
* @since 4.1.0 Added support for code editor field.
450455
* @since 2.5.5
451456
*
452457
* @param array $value Settings Field Array.
@@ -1138,7 +1143,7 @@ public static function get_field_title( $value ) {
11381143
*
11391144
* Loops though the give options array and outputs each field.
11401145
*
1141-
* @unreleased Added validation for code editor field.
1146+
* @since 4.1.0 Added validation for code editor field.
11421147
* @since 1.8
11431148
*
11441149
* @param array $options Options array to output

includes/admin/class-give-html-elements.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public function forms_dropdown( $args = array() ) {
229229
}
230230

231231
/**
232-
* @unreleased
232+
* @since 4.1.0
233233
*/
234234
public function campaigns_dropdown($args = [])
235235
{
@@ -262,7 +262,7 @@ public function campaigns_dropdown($args = [])
262262
/**
263263
* Filter the campaigns dropdown.
264264
*
265-
* @unreleased
265+
* @since 4.1.0
266266
*
267267
* @param array $campaigns_args Arguments for campaigns_dropdown query.
268268
*

includes/admin/settings/class-settings-advanced.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct()
5858
/**
5959
* Get settings array.
6060
*
61-
* @unreleased Added Donation Forms section
61+
* @since 4.1.0 Added Donation Forms section
6262
* @since 1.8
6363
* @return array
6464
*/

0 commit comments

Comments
 (0)