Changeset 32616
- Timestamp:
- 05/27/2015 04:05:33 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-formats.php
r32477 r32616 12 12 * @since 3.1.0 13 13 * 14 * @param int|object $post Post ID or post object. Optional, default is the current post from the loop.15 * @return mixedThe format if successful. False otherwise.14 * @param int|object|null $post Post ID or post object. Optional, default is the current post from the loop. 15 * @return string|false The format if successful. False otherwise. 16 16 */ 17 17 function get_post_format( $post = null ) { … … 37 37 * @since 3.1.0 38 38 * 39 * @param string|array $format Optional. The format or formats to check.40 * @param object|int $postOptional. The post to check. If not supplied, defaults to the current post if used in the loop.39 * @param string|array $format Optional. The format or formats to check. 40 * @param object|int|null $post Optional. The post to check. If not supplied, defaults to the current post if used in the loop. 41 41 * @return bool True if the post has any of the given formats (or any format, if no format specified), false otherwise. 42 42 */ … … 58 58 * @since 3.1.0 59 59 * 60 * @param int|object $post The post for which to assign a format.61 * @param string $format A format to assign. Use an empty string or array to remove all formats from the post.62 * @return mixedWP_Error on error. Array of affected term IDs on success.60 * @param int|object $post The post for which to assign a format. 61 * @param string $format A format to assign. Use an empty string or array to remove all formats from the post. 62 * @return array|WP_Error|false WP_Error on error. Array of affected term IDs on success. 63 63 */ 64 64 function set_post_format( $post, $format ) { … … 136 136 * 137 137 * @param string $format The post format slug. 138 * @return string The post format term link.138 * @return string|WP_Error|false The post format term link. 139 139 */ 140 140 function get_post_format_link( $format ) { … … 150 150 * @access private 151 151 * @since 3.1.0 152 * 153 * @param array $qvs 154 * @return array 152 155 */ 153 156 function _post_format_request( $qvs ) { … … 168 171 * @access private 169 172 * @since 3.1.0 173 * 174 * @global WP_Rewrite $wp_rewrite 175 * 176 * @param string $link 177 * @param object $term 178 * @param string $taxonomy 179 * @return string 170 180 */ 171 181 function _post_format_link( $link, $term, $taxonomy ) { 172 182 global $wp_rewrite; 173 if ( 'post_format' != $taxonomy ) 183 if ( 'post_format' != $taxonomy ) { 174 184 return $link; 185 } 175 186 if ( $wp_rewrite->get_extra_permastruct( $taxonomy ) ) { 176 187 return str_replace( "/{$term->slug}", '/' . str_replace( 'post-format-', '', $term->slug ), $link ); … … 186 197 * @access private 187 198 * @since 3.1.0 199 * 200 * @param object $term 201 * @return object 188 202 */ 189 203 function _post_format_get_term( $term ) { … … 199 213 * @access private 200 214 * @since 3.1.0 215 * 216 * @param array $terms 217 * @param string|array $taxonomies 218 * @param array $args 219 * @return array 201 220 */ 202 221 function _post_format_get_terms( $terms, $taxonomies, $args ) { … … 222 241 * @access private 223 242 * @since 3.1.0 243 * 244 * @param array $terms 245 * @return array 224 246 */ 225 247 function _post_format_wp_get_object_terms( $terms ) {
Note: See TracChangeset
for help on using the changeset viewer.