features
5 years ago
roles
5 years ago
admin.php
5 years ago
backup-handler.php
5 years ago
backup.php
5 years ago
cap-helper.php
6 years ago
filters-admin.php
6 years ago
filters-woocommerce.php
7 years ago
filters-wp_rest_workarounds.php
5 years ago
filters.php
5 years ago
functions-admin.php
5 years ago
functions.php
5 years ago
handler.php
5 years ago
inflect-cme.php
7 years ago
manager.php
5 years ago
network.php
5 years ago
pp-handler.php
6 years ago
pp-ui.php
5 years ago
publishpress-roles.php
5 years ago
settings-handler.php
5 years ago
settings.php
5 years ago
settings-handler.php
18 lines
| 1 | <?php |
| 2 | |
| 3 | add_action('init', function() { |
| 4 | |
| 5 | if (!empty($_POST['all_options'])) { |
| 6 | foreach(explode(',', $_POST['all_options']) as $option_name) { |
| 7 | $value = isset($_POST[$option_name]) ? $_POST[$option_name] : ''; |
| 8 | |
| 9 | if (!is_array($value)) { |
| 10 | $value = trim($value); |
| 11 | } |
| 12 | |
| 13 | update_option($option_name, stripslashes_deep($value)); |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | do_action('pp-capabilities-update-settings'); |
| 18 | }); |