- Timestamp:
- 11/03/2016 02:17:39 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r39104 r39105 1976 1976 'type' => 'integer', 1977 1977 ), 1978 'arg_options' => array(1979 'sanitize_callback' => 'wp_parse_id_list',1980 ),1981 'context' => array( 'view', 'edit' ),1982 );1983 $schema['properties'][ $base . '_exclude' ] = array(1984 'description' => sprintf( __( 'The terms in the %s taxonomy that should not be assigned to the object.' ), $taxonomy->name ),1985 'type' => 'array',1986 'items' => array(1987 'type' => 'integer',1988 ),1989 'arg_options' => array(1990 'sanitize_callback' => 'wp_parse_id_list',1991 ),1992 1978 'context' => array( 'view', 'edit' ), 1993 1979 ); … … 2014 2000 'type' => 'string', 2015 2001 'format' => 'date-time', 2016 'validate_callback' => 'rest_validate_request_arg',2017 2002 ); 2018 2003 … … 2021 2006 'description' => __( 'Limit result set to posts assigned to specific authors.' ), 2022 2007 'type' => 'array', 2008 'items' => array( 2009 'type' => 'integer', 2010 ), 2023 2011 'default' => array(), 2024 'sanitize_callback' => 'wp_parse_id_list',2025 2012 ); 2026 2013 $params['author_exclude'] = array( 2027 2014 'description' => __( 'Ensure result set excludes posts assigned to specific authors.' ), 2028 2015 'type' => 'array', 2016 'items' => array( 2017 'type' => 'integer', 2018 ), 2029 2019 'default' => array(), 2030 'sanitize_callback' => 'wp_parse_id_list',2031 2020 ); 2032 2021 } … … 2036 2025 'type' => 'string', 2037 2026 'format' => 'date-time', 2038 'validate_callback' => 'rest_validate_request_arg',2039 2027 ); 2040 2028 … … 2042 2030 'description' => __( 'Ensure result set excludes specific ids.' ), 2043 2031 'type' => 'array', 2032 'items' => array( 2033 'type' => 'integer', 2034 ), 2044 2035 'default' => array(), 2045 'sanitize_callback' => 'wp_parse_id_list',2046 2036 ); 2047 2037 … … 2049 2039 'description' => __( 'Limit result set to specific ids.' ), 2050 2040 'type' => 'array', 2041 'items' => array( 2042 'type' => 'integer', 2043 ), 2051 2044 'default' => array(), 2052 'sanitize_callback' => 'wp_parse_id_list',2053 2045 ); 2054 2046 … … 2057 2049 'description' => __( 'Limit result set to resources with a specific menu_order value.' ), 2058 2050 'type' => 'integer', 2059 'sanitize_callback' => 'absint',2060 'validate_callback' => 'rest_validate_request_arg',2061 2051 ); 2062 2052 } … … 2065 2055 'description' => __( 'Offset the result set by a specific number of items.' ), 2066 2056 'type' => 'integer', 2067 'sanitize_callback' => 'absint',2068 'validate_callback' => 'rest_validate_request_arg',2069 2057 ); 2070 2058 … … 2074 2062 'default' => 'desc', 2075 2063 'enum' => array( 'asc', 'desc' ), 2076 'validate_callback' => 'rest_validate_request_arg',2077 2064 ); 2078 2065 … … 2089 2076 'slug', 2090 2077 ), 2091 'validate_callback' => 'rest_validate_request_arg',2092 2078 ); 2093 2079 … … 2102 2088 'description' => __( 'Limit result set to those of particular parent ids.' ), 2103 2089 'type' => 'array', 2104 'sanitize_callback' => 'wp_parse_id_list', 2090 'items' => array( 2091 'type' => 'integer', 2092 ), 2105 2093 'default' => array(), 2106 2094 ); … … 2108 2096 'description' => __( 'Limit result set to all items except those of a particular parent id.' ), 2109 2097 'type' => 'array', 2110 'sanitize_callback' => 'wp_parse_id_list', 2098 'items' => array( 2099 'type' => 'integer', 2100 ), 2111 2101 'default' => array(), 2112 2102 ); … … 2138 2128 'description' => sprintf( __( 'Limit result set to all items that have the specified term assigned in the %s taxonomy.' ), $base ), 2139 2129 'type' => 'array', 2140 'sanitize_callback' => 'wp_parse_id_list', 2130 'items' => array( 2131 'type' => 'integer', 2132 ), 2133 'default' => array(), 2134 ); 2135 2136 $params[ $base . '_exclude' ] = array( 2137 'description' => sprintf( __( 'Limit result set to all items except those that have the specified term assigned in the %s taxonomy.' ), $base ), 2138 'type' => 'array', 2139 'items' => array( 2140 'type' => 'integer', 2141 ), 2141 2142 'default' => array(), 2142 2143 ); … … 2147 2148 'description' => __( 'Limit result set to items that are sticky.' ), 2148 2149 'type' => 'boolean', 2149 'sanitize_callback' => 'rest_parse_request_arg',2150 2150 ); 2151 2151 }
Note: See TracChangeset
for help on using the changeset viewer.