Changeset 946579
- Timestamp:
- 07/10/2014 10:28:54 PM (11 years ago)
- Location:
- hookpress/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
services.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hookpress/trunk/readme.txt
r482005 r946579 6 6 Donate link: http://tinyurl.com/donatetomitcho 7 7 Tags: hook, filter, action, plugin, webhook, webhooks, notification, internal 8 Requires at least: 3. 19 Tested up to: 3. 38 Requires at least: 3.6 9 Tested up to: 3.8.1 10 10 Stable tag: 0.1.11 11 11 -
hookpress/trunk/services.php
r946549 r946579 2 2 3 3 function hookpress_ajax_get_fields() { 4 global $wpdb, $hookpress_actions, $hookpress_filters;5 if ($_POST['type'] == 'action')6 $args = $hookpress_actions[$_POST['hook']];7 if ($_POST['type'] == 'filter')8 $args = $hookpress_filters[$_POST['hook']];4 global $wpdb, $hookpress_actions, $hookpress_filters; 5 if ($_POST['type'] == 'action') 6 $args = $hookpress_actions[$_POST['hook']]; 7 if ($_POST['type'] == 'filter') 8 $args = $hookpress_filters[$_POST['hook']]; 9 9 10 $fields = array();11 if (is_array($args)) {12 foreach ($args as $arg) {13 if (ereg('[A-Z]+',$arg))14 $fields = array_merge($fields,hookpress_get_fields($arg));15 else16 $fields[] = $arg;17 }18 }10 $fields = array(); 11 if (is_array($args)) { 12 foreach ($args as $arg) { 13 if (ereg('[A-Z]+',$arg)) 14 $fields = array_merge($fields,hookpress_get_fields($arg)); 15 else 16 $fields[] = $arg; 17 } 18 } 19 19 20 20 header("Content-Type: text/html; charset=UTF-8"); 21 21 22 if ($_POST['type'] == 'filter') {23 $first = array_shift($fields);24 $first = esc_html( $first );25 echo "<option value='$first' selected='selected' class='first'>$first</option>";26 }22 if ($_POST['type'] == 'filter') { 23 $first = array_shift($fields); 24 $first = esc_html( $first ); 25 echo "<option value='$first' selected='selected' class='first'>$first</option>"; 26 } 27 27 sort($fields); 28 28 foreach ($fields as $field) { 29 $field = esc_html( $field );30 echo "<option value='$field'>$field</option>";31 }32 exit;29 $field = esc_html( $field ); 30 echo "<option value='$field'>$field</option>"; 31 } 32 exit; 33 33 } 34 34 35 35 function hookpress_ajax_add_fields() { 36 37 36 $nonce = $_POST['_nonce'];