rwhetsto
Forum Replies Created
-
Forum: Plugins
In reply to: [Gravity Forms Directory] Bulk Approve MissingOh, crap, I now understand the -2’s (approve-2, unapprove-2)…. those have to do with what form you are on. Keep this in mind, I guess you should do a strpos or something similar to look for approve or unapprove.
Forum: Plugins
In reply to: [Gravity Forms Directory] Bulk Approve MissingUpdate2: In admin.php, line 45, few updates needed as follows, commented out most of the original code to show changes. It works for me now. Hopefully this helps someone else and the creator!
public static function process_bulk_update() { global $process_bulk_update_message; //if ( RGForms::post( "action" ) === 'bulk' ) { if ( RGForms::post( "action" ) === 'unapprove-2' || RGForms::post( "action" ) === 'approve-2' ) { check_admin_referer( 'gforms_entry_list', 'gforms_entry_list' ); //$bulk_action = ! empty( $_POST["bulk_action"] ) ? $_POST["bulk_action"] : $_POST["bulk_action2"]; $leads = $_POST["entry"]; $entry_count = count( $leads ) > 1 ? sprintf( __( "%d entries", "gravityforms" ), count( $leads ) ) : __( "1 entry", "gravityforms" ); //$bulk_action = explode( '-', $bulk_action ); //if ( ! isset( $bulk_action[1] ) || empty( $leads ) ) { // return false; //} $bulk_action = RGForms::post( "action" ); switch ( $bulk_action ) { case "approve-2": self::directory_update_bulk( $leads, 1, $bulk_action[1] ); $process_bulk_update_message = sprintf( __( "%s approved.", "gravity-forms-addons" ), $entry_count ); break; case "unapprove-2": self::directory_update_bulk( $leads, 0, $bulk_action[1] ); $process_bulk_update_message = sprintf( __( "%s disapproved.", "gravity-forms-addons" ), $entry_count ); break; } } }
- This reply was modified 8 years, 2 months ago by rwhetsto.
Forum: Plugins
In reply to: [Gravity Forms Directory] Bulk Approve MissingUpdate: In edit-form.php, line 217
Add the id selector #bulk-action-selector-top, ie…
$(“#bulk_action,#bulk_action2,#bulk-action-selector-top”).append(‘<optgroup label=”Directory”><option value=”approve-‘+formID+'”><?php echo esc_js( __(‘Approve’, ‘gravity-forms-addons’)); ?></option><option value=”unapprove-‘+formID+'”><?php echo esc_js( __(‘Disapprove’, ‘gravity-forms-addons’)); ?></option></optgroup>’);This gets it to show up in the drop down, but it doesn’t work yet. Still investigating. Let me know if I’m on the wrong track.