Plugin Directory

Changeset 2191010


Ignore:
Timestamp:
11/12/2019 11:16:00 PM (6 years ago)
Author:
lightpost
Message:

Fixed Bible class registration not recording class selection properly

Location:
lightpost/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lightpost/trunk/includes/BibleClass.php

    r2181964 r2191010  
    7979                        'name'    => sanitize_text_field(sanitize_text_field($_POST['lightpost_name'])),
    8080                        'email'   => sanitize_text_field(sanitize_text_field($_POST['lightpost_email'])),
    81                         'classes' => sanitize_text_field(sanitize_text_field($_POST['selected_classes'])),
     81                        'classes' => $this->recursive_sanitize_text_field($_POST['selected_classes']),
    8282                    ],
    8383                ]);
     
    129129        return $content;
    130130    }
     131
     132    private function recursive_sanitize_text_field($array)
     133    {
     134        foreach ( $array as $key => &$value ) {
     135            if ( is_array( $value ) ) {
     136                $value = $this->recursive_sanitize_text_field($value);
     137            }
     138            else {
     139                $value = sanitize_text_field( $value );
     140            }
     141        }
     142
     143        return $array;
     144    }
    131145}
  • lightpost/trunk/lightpost.php

    r2181964 r2191010  
    77Author:            Lightpost
    88Author URI:        https://lightpost.app
    9 Version:           1.0
     9Version:           1.0.1
    1010Requires PHP:      7.0
    1111Requires at least: 5.0
  • lightpost/trunk/readme.txt

    r2181964 r2191010  
    3636== Changelog ==
    3737
     38= 1.0.1 =
     39
     40* Fixed Bible class registration not recording class selection properly.
     41
    3842= 1.0.0 =
    3943
Note: See TracChangeset for help on using the changeset viewer.