Plugin Directory

Changeset 3377434


Ignore:
Timestamp:
10/13/2025 10:48:48 AM (2 months ago)
Author:
rubengc
Message:

5.4.7

Location:
automatorwp
Files:
2157 added
5 edited

Legend:

Unmodified
Added
Removed
  • automatorwp/trunk/assets/js/automatorwp-admin.js

    r3350202 r3377434  
    10311031        var first_change = row.hasClass('is-option-change');
    10321032
    1033         if( $(this).val() === 'custom' ) {
     1033        var value = $(this).val();
     1034
     1035        if( value === 'custom' || ( Array.isArray( value ) && value.includes( 'custom' ) ) ) {
    10341036            // Show the custom input
    10351037            if( first_change ) {
  • automatorwp/trunk/assets/js/automatorwp-admin.min.js

    r3350202 r3377434  
    2727term_selector.removeAttr('data-select2-id');automatorwp_term_selector(term_selector);if(first_change){term_row.show()}else{term_row.slideDown('fast')}}
    2828row.removeClass('is-option-change')});$('body').on('click','.automatorwp-automation-item-label > .automatorwp-option',function(e){var item=$(this).closest('.automatorwp-automation-item');var option=$(this).data('option');var option_form=item.find('.automatorwp-option-form-container[data-option="'+option+'"]');var taxonomy_selector=option_form.find('.automatorwp-taxonomy-selector');if(taxonomy_selector!==undefined){taxonomy_selector.addClass('is-option-change');taxonomy_selector.find('select.select2-hidden-accessible').trigger('change')}});$('body').on('change','select',function(e){var row=$(this).closest('.cmb-row');var custom_input_row=row.next('.automatorwp-selector-custom-input');if(custom_input_row===undefined){return}
    29 var first_change=row.hasClass('is-option-change');if($(this).val()==='custom'){if(first_change){custom_input_row.show()}else{custom_input_row.slideDown('fast')}}else{if(first_change){custom_input_row.hide()}else{custom_input_row.slideUp('fast')}}
     29var first_change=row.hasClass('is-option-change');var value=$(this).val();if(value==='custom'||(Array.isArray(value)&&value.includes('custom'))){if(first_change){custom_input_row.show()}else{custom_input_row.slideDown('fast')}}else{if(first_change){custom_input_row.hide()}else{custom_input_row.slideUp('fast')}}
    3030row.removeClass('is-option-change')});$('body').on('click','.automatorwp-automation-item-label > .automatorwp-option',function(e){var item=$(this).closest('.automatorwp-automation-item');var option=$(this).data('option');var option_form=item.find('.automatorwp-option-form-container[data-option="'+option+'"]');var custom_input_row=option_form.find('.automatorwp-selector-custom-input');if(custom_input_row!==undefined){var selector_row=custom_input_row.prev('.cmb-row');if(selector_row!==undefined){selector_row.addClass('is-option-change');selector_row.find('select.select2-hidden-accessible').trigger('change')}}});$('.automatorwp-selector-custom-input').each(function(){var selector_row=$(this).prev('.cmb-row');if(selector_row.find('select').val()==='custom'){$(this).show()}});$('body').on('click','.automatorwp-dialog-cancel',function(e){var target=$(this).data('dialog');if(target.length){$('.'+target).dialog('close')}});$('body').on('click','a[href$="admin.php?page=add_automatorwp_automations"]',function(e){e.preventDefault();$('.automatorwp-automation-type-dialog').dialog({dialogClass:'automatorwp-dialog',closeText:'',show:{effect:'fadeIn',duration:200},hide:{effect:'fadeOut',duration:200},resizable:!1,height:'auto',width:800,modal:!0,draggable:!1,closeOnEscape:!1,})});$('body').on('click','.automatorwp-automation-type-dialog .automatorwp-automation-type',function(e){$('.automatorwp-automation-type-dialog .automatorwp-automation-type-selected').removeClass('automatorwp-automation-type-selected');$(this).addClass('automatorwp-automation-type-selected')});$('body').on('click','.automatorwp-automation-type-dialog .automatorwp-automation-type-dialog-confirm',function(e){var $this=$(this);if($this.hasClass('disabled')){return}
    3131$this.addClass('disabled');$this.closest('.automatorwp-dialog-buttons').prepend('<span class="spinner is-active" style="float: none;"></span>');var type='user';var selected=$('.automatorwp-automation-type-dialog .automatorwp-automation-type-selected');if(selected.length){type=selected.data('type')}
  • automatorwp/trunk/automatorwp.php

    r3375150 r3377434  
    44 * Plugin URI:          https://automatorwp.com
    55 * Description:         Connect your WordPress plugins together and create automated workflows with no code!
    6  * Version:             5.4.6
     6 * Version:             5.4.7
    77 * Author:              AutomatorWP
    88 * Author URI:          https://automatorwp.com/
     
    120120
    121121        // Plugin version
    122         define( 'AUTOMATORWP_VER', '5.4.6' );
     122        define( 'AUTOMATORWP_VER', '5.4.7' );
    123123
    124124        // Plugin file
  • automatorwp/trunk/integrations/learndash/includes/actions/create-group.php

    r3140238 r3377434  
    4242                            'option_none'       => false,
    4343                            'option_custom'         => true,
    44                             'option_custom_desc'    => __( 'Course ID', 'automatorwp' ),
     44                            'option_custom_desc'    => __( 'Course ID or comma-separated list of courses IDs', 'automatorwp' ),
    4545                            'post_type'         => 'sfwd-courses',
    4646                            'placeholder'       => __( 'Select a course', 'automatorwp' ),
    47                             'default'           => ''
     47                            'default'           => '',
     48                            'multiple'          => true
    4849                        ) ),
    4950                        'post_custom' => automatorwp_utilities_custom_field( array(
    50                             'option_custom_desc'    => __( 'Course ID', 'automatorwp' ),
     51                            'option_custom_desc'    => __( 'Course ID or comma-separated list of courses IDs', 'automatorwp' ),
    5152                        ) ),
    5253                        'leader_role_assignment' => array(
     
    8182        // Shorthand
    8283        $post_title = $action_options['post_title'];
    83         $course_id = $action_options['post'];
     84        $course_ids = $action_options['post'];
    8485        $leader_role_assignment = $action_options['leader_role_assignment'];
    8586
     
    125126        ld_update_leader_group_access( $user_id, $group_id );
    126127
    127         $course = get_post( $course_id );
    128 
    129         // Bail if course not found
    130         if( ! $course ) {
    131             return;
     128        if( ! is_array( $course_ids ) ) {
     129            $course_ids = explode( ',', $course_ids );
    132130        }
    133131
    134         // Add the course to the group
    135         ld_update_course_group_access( (int) $course_id, (int) $group_id, false );
     132        foreach ($course_ids as $course_id) {
     133           
     134            //Sanitize $id
     135            $course_id = absint( trim( $course_id ) );
    136136
    137         // Delete the course groups transient
    138         delete_transient( 'learndash_course_groups_' . $course_id );
     137            $course = get_post( $course_id );
     138           
     139            // Skip this ID if course not found
     140            if( ! $course ) {
     141                continue;
     142            }
     143           
     144            // Add the course to the group
     145            ld_update_course_group_access( (int) $course_id, (int) $group_id, false );
     146   
     147            // Delete the course groups transient
     148            delete_transient( 'learndash_course_groups_' . $course_id );
     149
     150        }
    139151
    140152    }
  • automatorwp/trunk/readme.txt

    r3375150 r3377434  
    44Requires at least: 4.4
    55Tested up to: 6.8
    6 Stable tag: 5.4.6
     6Stable tag: 5.4.7
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    342342== Changelog ==
    343343
     344= 5.4.7 =
     345
     346* **New Features**
     347* LearnDash: Added support to assign multiples courses to Create Group action.
     348
    344349= 5.4.6 =
    345350
Note: See TracChangeset for help on using the changeset viewer.