Changeset 62717 for trunk/src/wp-includes/post.php
- Timestamp:
- 07/14/2026 12:27:51 AM (7 weeks ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/post.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r62699 r62717 1186 1186 * @param int|WP_Post $post Post ID or post object. 1187 1187 * @return int[] Array of ancestor IDs or empty array if there are none. 1188 * @phpstan-return list<non-negative-int> 1188 1189 */ 1189 1190 function get_post_ancestors( $post ) { … … 3002 3003 * Possible context values are: 'raw', 'edit', 'db', 'display', 'attribute' and 3003 3004 * 'js'. The 'display' context is used by default. 'attribute' and 'js' contexts 3004 * are treated like 'display' when calling filters. 3005 * are treated like 'display' when calling filters. The 'sample' value is used 3006 * for permalink previewing. 3005 3007 * 3006 3008 * @since 2.3.0 … … 3010 3012 * @param mixed $value The Post Object value. 3011 3013 * @param int $post_id Post ID. 3012 * @param string $context Optional. How to sanitize the field. Possible values are 'raw', 'edit', 3013 * ' db', 'display', 'attribute' and 'js'. Default 'display'.3014 * @param string $context Optional. How to sanitize the field. Possible values are 'raw', 'edit', 'db', 'display', 3015 * 'attribute' and 'js'. The 'sample' value is used for permalink previewing. Default 'display'. 3014 3016 * @return mixed Sanitized value. 3015 3017 * 3016 * @phpstan-param 'raw'|'edit'|'db'|'display'|'attribute'|'js' $context3018 * @phpstan-param 'raw'|'edit'|'db'|'display'|'attribute'|'js'|'sample' $context 3017 3019 * @phpstan-return ( 3018 3020 * $field is 'ID'|'post_parent'|'menu_order' ? int : ( … … 3287 3289 * @param string $context Context for how to sanitize the field. 3288 3290 * Accepts 'raw', 'edit', 'db', 'display', 3289 * 'attribute', or 'js'. Default 'display'. 3291 * 'attribute', or 'js'. The 'sample' value is 3292 * used for permalink previewing. Default 'display'. 3290 3293 */ 3291 3294 $value = apply_filters( "{$field}", $value, $post_id, $context ); … … 3314 3317 * @param string $context Context for how to sanitize the field. 3315 3318 * Accepts 'raw', 'edit', 'db', 'display', 3316 * 'attribute', or 'js'. Default 'display'. 3319 * 'attribute', or 'js'. The 'sample' value is 3320 * used for permalink previewing. Default 'display'. 3317 3321 */ 3318 3322 $value = apply_filters( "post_{$field}", $value, $post_id, $context ); … … 6150 6154 if ( ! empty( $tb_list ) ) { 6151 6155 // Get post data. 6152 $postdata = get_post( $post_id, ARRAY_A ); 6153 6154 if ( ! $postdata ) { 6156 $post = get_post( $post_id ); 6157 if ( ! $post ) { 6155 6158 return; 6156 6159 } 6160 $postdata = $post->to_array(); 6157 6161 6158 6162 // Form an excerpt.
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)