🔒 EXCLUSIVE: Changeset/ - Full Gallery 2025

Changeset 946579


Ignore:
Timestamp:
07/10/2014 10:28:54 PM (11 years ago)
Author:
mitchoyoshitaka
Message:

Bump the wordpress version and fix whitespace.

Location:
hookpress/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • hookpress/trunk/readme.txt

    r482005 r946579  
    66Donate link: http://tinyurl.com/donatetomitcho
    77Tags: hook, filter, action, plugin, webhook, webhooks, notification, internal
    8 Requires at least: 3.1
    9 Tested up to: 3.3
     8Requires at least: 3.6
     9Tested up to: 3.8.1
    1010Stable tag: 0.1.11
    1111
  • hookpress/trunk/services.php

    r946549 r946579  
    22
    33function 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']];
    99
    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   }
     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      }
    1919
    2020    header("Content-Type: text/html; charset=UTF-8");
    2121
    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    }
    2727    sort($fields);
    2828    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;
    3333}
    3434
    3535function hookpress_ajax_add_fields() {
    36 
    3736    $nonce = $_POST['_nonce'];