run:R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
23.8 KB
2026-03-11 16:18:51
R W Run
7.8 KB
2026-03-11 16:18:52
R W Run
36.1 KB
2026-03-11 16:18:51
R W Run
11.9 KB
2026-03-11 16:18:52
R W Run
18.94 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:52
R W Run
28.6 KB
2026-03-11 16:18:51
R W Run
316 By
2026-03-11 16:18:51
R W Run
12.9 KB
2026-03-11 16:18:51
R W Run
61.02 KB
2026-03-11 16:18:52
R W Run
15 KB
2026-03-11 16:18:51
R W Run
112.05 KB
2026-03-11 16:18:51
R W Run
12.47 KB
2026-03-11 16:18:51
R W Run
15.07 KB
2026-03-11 16:18:52
R W Run
9.84 KB
2026-03-11 16:18:52
R W Run
13.17 KB
2026-03-11 16:18:52
R W Run
33.83 KB
2026-03-11 16:18:51
R W Run
42.63 KB
2026-03-11 16:18:51
R W Run
55.71 KB
2026-03-11 16:18:52
R W Run
12.53 KB
2026-03-11 16:18:51
R W Run
2.55 KB
2026-03-11 16:18:52
R W Run
28.92 KB
2026-03-11 16:18:52
R W Run
539 By
2026-03-11 16:18:51
R W Run
367 By
2026-03-11 16:18:52
R W Run
42.65 KB
2026-03-11 16:18:51
R W Run
401 By
2026-03-11 16:18:51
R W Run
6.61 KB
2026-03-11 16:18:51
R W Run
664 By
2026-03-11 16:18:52
R W Run
20.63 KB
2026-03-11 16:18:51
R W Run
2.18 KB
2026-03-11 16:18:52
R W Run
453 By
2026-03-11 16:18:52
R W Run
457 By
2026-03-11 16:18:51
R W Run
36.83 KB
2026-03-11 16:18:52
R W Run
2.41 KB
2026-03-11 16:18:52
R W Run
8.28 KB
2026-03-11 16:18:51
R W Run
13.89 KB
2026-03-11 16:18:51
R W Run
11.76 KB
2026-03-11 16:18:51
R W Run
2.65 KB
2026-03-11 16:18:51
R W Run
7.43 KB
2026-03-11 16:18:51
R W Run
17.46 KB
2026-03-11 16:18:51
R W Run
5.14 KB
2026-03-11 16:18:52
R W Run
16.7 KB
2026-03-11 16:18:51
R W Run
8.28 KB
2026-03-11 16:18:52
R W Run
2.92 KB
2026-03-11 16:18:52
R W Run
1.32 KB
2026-03-11 16:18:51
R W Run
4.6 KB
2026-03-11 16:18:52
R W Run
11.62 KB
2026-03-11 16:18:52
R W Run
2.5 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
11.25 KB
2026-03-11 16:18:52
R W Run
5.32 KB
2026-03-11 16:18:51
R W Run
10.99 KB
2026-03-11 16:18:52
R W Run
68.32 KB
2026-03-11 16:18:51
R W Run
6.34 KB
2026-03-11 16:18:51
R W Run
5.49 KB
2026-03-11 16:18:51
R W Run
1.99 KB
2026-03-11 16:18:52
R W Run
7.02 KB
2026-03-11 16:18:51
R W Run
4.91 KB
2026-03-11 16:18:52
R W Run
16.86 KB
2026-03-11 16:18:51
R W Run
24.23 KB
2026-03-11 16:18:51
R W Run
3.97 KB
2026-03-11 16:18:51
R W Run
47.66 KB
2026-03-11 16:18:51
R W Run
9.22 KB
2026-03-11 16:18:51
R W Run
25.51 KB
2026-03-11 16:18:51
R W Run
198.38 KB
2026-03-11 16:18:52
R W Run
56.65 KB
2026-03-11 16:18:51
R W Run
10.46 KB
2026-03-11 16:18:51
R W Run
10.95 KB
2026-03-11 16:18:52
R W Run
29.26 KB
2026-03-11 16:18:51
R W Run
70.91 KB
2026-03-11 16:18:52
R W Run
35.3 KB
2026-03-11 16:18:52
R W Run
16.61 KB
2026-03-11 16:18:52
R W Run
2.57 KB
2026-03-11 16:18:52
R W Run
39.83 KB
2026-03-11 16:18:51
R W Run
70.64 KB
2026-03-11 16:18:51
R W Run
15.56 KB
2026-03-11 16:18:52
R W Run
7.33 KB
2026-03-11 16:18:52
R W Run
253 By
2026-03-11 16:18:51
R W Run
7.96 KB
2026-03-11 16:18:52
R W Run
3.23 KB
2026-03-11 16:18:52
R W Run
969 By
2026-03-11 16:18:52
R W Run
16.28 KB
2026-03-11 16:18:51
R W Run
7.22 KB
2026-03-11 16:18:51
R W Run
12.95 KB
2026-03-11 16:18:51
R W Run
6.53 KB
2026-03-11 16:18:51
R W Run
3.42 KB
2026-03-11 16:18:52
R W Run
5.84 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
4.3 KB
2026-03-11 16:18:52
R W Run
2.91 KB
2026-03-11 16:18:51
R W Run
16.46 KB
2026-03-11 16:18:52
R W Run
40.6 KB
2026-03-11 16:18:51
R W Run
20.22 KB
2026-03-11 16:18:51
R W Run
36.11 KB
2026-03-11 16:18:52
R W Run
17.01 KB
2026-03-11 16:18:51
R W Run
7.27 KB
2026-03-11 16:18:52
R W Run
6.62 KB
2026-03-11 16:18:52
R W Run
16.49 KB
2026-03-11 16:18:52
R W Run
1.79 KB
2026-03-11 16:18:52
R W Run
29.82 KB
2026-03-11 16:18:51
R W Run
6.67 KB
2026-03-11 16:18:52
R W Run
8.98 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:51
R W Run
12.01 KB
2026-03-11 16:18:51
R W Run
17.11 KB
2026-03-11 16:18:51
R W Run
6.74 KB
2026-03-11 16:18:52
R W Run
30.93 KB
2026-03-11 16:18:51
R W Run
4.99 KB
2026-03-11 16:18:51
R W Run
4.25 KB
2026-03-11 16:18:51
R W Run
24.72 KB
2026-03-11 16:18:51
R W Run
29.96 KB
2026-03-11 16:18:52
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
160 KB
2026-03-11 16:18:51
R W Run
6.72 KB
2026-03-11 16:18:52
R W Run
10.92 KB
2026-03-11 16:18:51
R W Run
4.77 KB
2026-03-11 16:18:51
R W Run
3.38 KB
2026-03-11 16:18:51
R W Run
11.18 KB
2026-03-11 16:18:51
R W Run
62.19 KB
2026-03-11 16:18:51
R W Run
2.46 KB
2026-03-11 16:18:51
R W Run
9.17 KB
2026-03-11 16:18:51
R W Run
32.15 KB
2026-03-11 16:18:51
R W Run
34.05 KB
2026-03-11 16:18:52
R W Run
7.15 KB
2026-03-11 16:18:51
R W Run
3.47 KB
2026-03-11 16:18:52
R W Run
1.87 KB
2026-03-11 16:18:52
R W Run
30.91 KB
2026-03-11 16:18:51
R W Run
7.29 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:51
R W Run
12.54 KB
2026-03-11 16:18:51
R W Run
19.12 KB
2026-03-11 16:18:51
R W Run
18.12 KB
2026-03-11 16:18:52
R W Run
39.99 KB
2026-03-11 16:18:52
R W Run
5.17 KB
2026-03-11 16:18:52
R W Run
979 By
2026-03-11 16:18:51
R W Run
18.44 KB
2026-03-11 16:18:52
R W Run
10.24 KB
2026-03-11 16:18:51
R W Run
1.77 KB
2026-03-11 16:18:52
R W Run
34.9 KB
2026-03-11 16:18:51
R W Run
7.19 KB
2026-03-11 16:18:52
R W Run
160.5 KB
2026-03-11 16:18:51
R W Run
64.27 KB
2026-03-11 16:18:51
R W Run
27.95 KB
2026-03-11 16:18:51
R W Run
4.69 KB
2026-03-11 16:18:51
R W Run
2.94 KB
2026-03-11 16:18:51
R W Run
43.13 KB
2026-03-11 16:18:52
R W Run
2.25 KB
2026-03-11 16:18:52
R W Run
22.5 KB
2026-03-11 16:18:51
R W Run
13.01 KB
2026-03-11 16:18:52
R W Run
3.27 KB
2026-03-11 16:18:51
R W Run
18 KB
2026-03-11 16:18:51
R W Run
210.4 KB
2026-03-11 16:18:52
R W Run
25.86 KB
2026-03-11 16:18:52
R W Run
115.85 KB
2026-03-11 16:18:51
R W Run
373 By
2026-03-11 16:18:52
R W Run
343 By
2026-03-11 16:18:52
R W Run
338 By
2026-03-11 16:18:51
R W Run
100.73 KB
2026-03-11 16:18:52
R W Run
130.93 KB
2026-03-11 16:18:51
R W Run
19.1 KB
2026-03-11 16:18:51
R W Run
17.41 KB
2026-03-11 16:18:52
R W Run
41.98 KB
2026-03-11 16:18:52
R W Run
400 By
2026-03-11 16:18:52
R W Run
11.1 KB
2026-03-11 16:18:52
R W Run
37.02 KB
2026-03-11 16:18:51
R W Run
2.24 KB
2026-03-11 16:18:51
R W Run
188.13 KB
2026-03-11 16:18:51
R W Run
338 By
2026-03-11 16:18:51
R W Run
38 KB
2026-03-11 16:18:51
R W Run
4.02 KB
2026-03-11 16:18:52
R W Run
5.38 KB
2026-03-11 16:18:51
R W Run
3.05 KB
2026-03-11 16:18:52
R W Run
2.61 KB
2026-03-11 16:18:51
R W Run
1.16 KB
2026-03-11 16:18:52
R W Run
4.04 KB
2026-03-11 16:18:51
R W Run
3.71 KB
2026-03-11 16:18:51
R W Run
24.6 KB
2026-03-11 16:18:51
R W Run
9.56 KB
2026-03-11 16:18:51
R W Run
346.43 KB
2026-03-11 16:18:52
R W Run
281.84 KB
2026-03-11 16:18:52
R W Run
14.95 KB
2026-03-11 16:18:51
R W Run
8.44 KB
2026-03-11 16:18:52
R W Run
168.95 KB
2026-03-11 16:18:52
R W Run
20.71 KB
2026-03-11 16:18:52
R W Run
25.27 KB
2026-03-11 16:18:51
R W Run
5.72 KB
2026-03-11 16:18:51
R W Run
4.63 KB
2026-03-11 16:18:52
R W Run
81.73 KB
2026-03-11 16:18:51
R W Run
67.18 KB
2026-03-11 16:18:51
R W Run
156.36 KB
2026-03-11 16:18:52
R W Run
55.19 KB
2026-03-11 16:18:51
R W Run
162 By
2026-03-11 16:18:51
R W Run
61.72 KB
2026-03-11 16:18:51
R W Run
216.06 KB
2026-03-11 16:18:52
R W Run
65.09 KB
2026-03-11 16:18:51
R W Run
25.24 KB
2026-03-11 16:18:52
R W Run
4.81 KB
2026-03-11 16:18:51
R W Run
6.48 KB
2026-03-11 16:18:52
R W Run
21.25 KB
2026-03-11 16:18:51
R W Run
2.79 KB
2026-03-11 16:18:52
R W Run
89.69 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:52
R W Run
3.69 KB
2026-03-11 16:18:52
R W Run
4.11 KB
2026-03-11 16:18:51
R W Run
40.74 KB
2026-03-11 16:18:51
R W Run
25.38 KB
2026-03-11 16:18:51
R W Run
43.31 KB
2026-03-11 16:18:52
R W Run
102.57 KB
2026-03-11 16:18:52
R W Run
6.18 KB
2026-03-11 16:18:51
R W Run
124.47 KB
2026-03-11 16:18:52
R W Run
35.65 KB
2026-03-11 16:18:52
R W Run
6.94 KB
2026-03-11 16:18:52
R W Run
67.04 KB
2026-03-11 16:18:52
R W Run
10.62 KB
2026-03-11 16:18:51
R W Run
289.35 KB
2026-03-11 16:18:52
R W Run
36.23 KB
2026-03-11 16:18:51
R W Run
200 By
2026-03-11 16:18:52
R W Run
200 By
2026-03-11 16:18:52
R W Run
98.29 KB
2026-03-11 16:18:52
R W Run
30.02 KB
2026-03-11 16:18:52
R W Run
19.03 KB
2026-03-11 16:18:52
R W Run
5.06 KB
2026-03-11 16:18:52
R W Run
255 By
2026-03-11 16:18:51
R W Run
22.66 KB
2026-03-11 16:18:52
R W Run
154.63 KB
2026-03-11 16:18:51
R W Run
9.68 KB
2026-03-11 16:18:51
R W Run
258 By
2026-03-11 16:18:51
R W Run
23.49 KB
2026-03-11 16:18:51
R W Run
3.16 KB
2026-03-11 16:18:51
R W Run
8.4 KB
2026-03-11 16:18:52
R W Run
441 By
2026-03-11 16:18:51
R W Run
7.39 KB
2026-03-11 16:18:51
R W Run
173 KB
2026-03-11 16:18:52
R W Run
544 By
2026-03-11 16:18:52
R W Run
4.17 KB
2026-03-11 16:18:51
R W Run
35.97 KB
2026-03-11 16:18:52
R W Run
1.69 KB
2026-03-11 16:18:51
R W Run
2.84 KB
2026-03-11 16:18:52
R W Run
6.09 KB
2026-03-11 16:18:51
R W Run
8.71 KB
2026-03-11 16:18:51
R W Run
131.84 KB
2026-03-11 16:18:51
R W Run
37.45 KB
2026-03-11 16:18:51
R W Run
173.89 KB
2026-03-11 16:18:51
R W Run
7.09 KB
2026-03-11 16:18:51
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
1.08 KB
2026-03-11 16:18:51
R W Run
69.46 KB
2026-03-11 16:18:52
R W Run
445 By
2026-03-11 16:18:51
R W Run
799 By
2026-03-11 16:18:52
R W Run
error_log
📄post-formats.php
1<?php
2/**
3 * Post format functions.
4 *
5 * @package WordPress
6 * @subpackage Post
7 */
8
9/**
10 * Retrieve the format slug for a post
11 *
12 * @since 3.1.0
13 *
14 * @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to the current post in the loop.
15 * @return string|false The format if successful. False otherwise.
16 */
17function get_post_format( $post = null ) {
18 $post = get_post( $post );
19
20 if ( ! $post ) {
21 return false;
22 }
23
24 if ( ! post_type_supports( $post->post_type, 'post-formats' ) ) {
25 return false;
26 }
27
28 $_format = get_the_terms( $post->ID, 'post_format' );
29
30 if ( empty( $_format ) ) {
31 return false;
32 }
33
34 $format = reset( $_format );
35
36 return str_replace( 'post-format-', '', $format->slug );
37}
38
39/**
40 * Check if a post has any of the given formats, or any format.
41 *
42 * @since 3.1.0
43 *
44 * @param string|string[] $format Optional. The format or formats to check. Default empty array.
45 * @param WP_Post|int|null $post Optional. The post to check. Defaults to the current post in the loop.
46 * @return bool True if the post has any of the given formats (or any format, if no format specified),
47 * false otherwise.
48 */
49function has_post_format( $format = array(), $post = null ) {
50 $prefixed = array();
51
52 if ( $format ) {
53 foreach ( (array) $format as $single ) {
54 $prefixed[] = 'post-format-' . sanitize_key( $single );
55 }
56 }
57
58 return has_term( $prefixed, 'post_format', $post );
59}
60
61/**
62 * Assign a format to a post
63 *
64 * @since 3.1.0
65 *
66 * @param int|WP_Post $post The post for which to assign a format.
67 * @param string $format A format to assign. Use an empty string or array to remove all formats from the post.
68 * @return array|WP_Error|false Array of affected term IDs on success. WP_Error on error.
69 */
70function set_post_format( $post, $format ) {
71 $post = get_post( $post );
72
73 if ( ! $post ) {
74 return new WP_Error( 'invalid_post', __( 'Invalid post.' ) );
75 }
76
77 if ( ! empty( $format ) ) {
78 $format = sanitize_key( $format );
79 if ( 'standard' === $format || ! in_array( $format, get_post_format_slugs(), true ) ) {
80 $format = '';
81 } else {
82 $format = 'post-format-' . $format;
83 }
84 }
85
86 return wp_set_post_terms( $post->ID, $format, 'post_format' );
87}
88
89/**
90 * Returns an array of post format slugs to their translated and pretty display versions
91 *
92 * @since 3.1.0
93 *
94 * @return string[] Array of post format labels keyed by format slug.
95 */
96function get_post_format_strings() {
97 $strings = array(
98 'standard' => _x( 'Standard', 'Post format' ), // Special case. Any value that evals to false will be considered standard.
99 'aside' => _x( 'Aside', 'Post format' ),
100 'chat' => _x( 'Chat', 'Post format' ),
101 'gallery' => _x( 'Gallery', 'Post format' ),
102 'link' => _x( 'Link', 'Post format' ),
103 'image' => _x( 'Image', 'Post format' ),
104 'quote' => _x( 'Quote', 'Post format' ),
105 'status' => _x( 'Status', 'Post format' ),
106 'video' => _x( 'Video', 'Post format' ),
107 'audio' => _x( 'Audio', 'Post format' ),
108 );
109 return $strings;
110}
111
112/**
113 * Retrieves the array of post format slugs.
114 *
115 * @since 3.1.0
116 *
117 * @return string[] The array of post format slugs as both keys and values.
118 */
119function get_post_format_slugs() {
120 $slugs = array_keys( get_post_format_strings() );
121 return array_combine( $slugs, $slugs );
122}
123
124/**
125 * Returns a pretty, translated version of a post format slug
126 *
127 * @since 3.1.0
128 *
129 * @param string $slug A post format slug.
130 * @return string The translated post format name.
131 */
132function get_post_format_string( $slug ) {
133 $strings = get_post_format_strings();
134 if ( ! $slug ) {
135 return $strings['standard'];
136 } else {
137 return ( isset( $strings[ $slug ] ) ) ? $strings[ $slug ] : '';
138 }
139}
140
141/**
142 * Returns a link to a post format index.
143 *
144 * @since 3.1.0
145 *
146 * @param string $format The post format slug.
147 * @return string|WP_Error|false The post format term link.
148 */
149function get_post_format_link( $format ) {
150 $term = get_term_by( 'slug', 'post-format-' . $format, 'post_format' );
151 if ( ! $term || is_wp_error( $term ) ) {
152 return false;
153 }
154 return get_term_link( $term );
155}
156
157/**
158 * Filters the request to allow for the format prefix.
159 *
160 * @access private
161 * @since 3.1.0
162 *
163 * @param array $qvs
164 * @return array
165 */
166function _post_format_request( $qvs ) {
167 if ( ! isset( $qvs['post_format'] ) ) {
168 return $qvs;
169 }
170 $slugs = get_post_format_slugs();
171 if ( isset( $slugs[ $qvs['post_format'] ] ) ) {
172 $qvs['post_format'] = 'post-format-' . $slugs[ $qvs['post_format'] ];
173 }
174 $tax = get_taxonomy( 'post_format' );
175 if ( ! is_admin() ) {
176 $qvs['post_type'] = $tax->object_type;
177 }
178 return $qvs;
179}
180
181/**
182 * Filters the post format term link to remove the format prefix.
183 *
184 * @access private
185 * @since 3.1.0
186 *
187 * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
188 *
189 * @param string $link
190 * @param WP_Term $term
191 * @param string $taxonomy
192 * @return string
193 */
194function _post_format_link( $link, $term, $taxonomy ) {
195 global $wp_rewrite;
196 if ( 'post_format' !== $taxonomy ) {
197 return $link;
198 }
199 if ( $wp_rewrite->get_extra_permastruct( $taxonomy ) ) {
200 return str_replace( "/{$term->slug}", '/' . str_replace( 'post-format-', '', $term->slug ), $link );
201 } else {
202 $link = remove_query_arg( 'post_format', $link );
203 return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $link );
204 }
205}
206
207/**
208 * Remove the post format prefix from the name property of the term object created by get_term().
209 *
210 * @access private
211 * @since 3.1.0
212 *
213 * @param object $term
214 * @return object
215 */
216function _post_format_get_term( $term ) {
217 if ( isset( $term->slug ) ) {
218 $term->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
219 }
220 return $term;
221}
222
223/**
224 * Remove the post format prefix from the name property of the term objects created by get_terms().
225 *
226 * @access private
227 * @since 3.1.0
228 *
229 * @param array $terms
230 * @param string|array $taxonomies
231 * @param array $args
232 * @return array
233 */
234function _post_format_get_terms( $terms, $taxonomies, $args ) {
235 if ( in_array( 'post_format', (array) $taxonomies, true ) ) {
236 if ( isset( $args['fields'] ) && 'names' === $args['fields'] ) {
237 foreach ( $terms as $order => $name ) {
238 $terms[ $order ] = get_post_format_string( str_replace( 'post-format-', '', $name ) );
239 }
240 } else {
241 foreach ( (array) $terms as $order => $term ) {
242 if ( isset( $term->taxonomy ) && 'post_format' === $term->taxonomy ) {
243 $terms[ $order ]->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
244 }
245 }
246 }
247 }
248 return $terms;
249}
250
251/**
252 * Remove the post format prefix from the name property of the term objects created by wp_get_object_terms().
253 *
254 * @access private
255 * @since 3.1.0
256 *
257 * @param array $terms
258 * @return array
259 */
260function _post_format_wp_get_object_terms( $terms ) {
261 foreach ( (array) $terms as $order => $term ) {
262 if ( isset( $term->taxonomy ) && 'post_format' === $term->taxonomy ) {
263 $terms[ $order ]->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
264 }
265 }
266 return $terms;
267}
268