Changeset 59045
- Timestamp:
- 09/18/2024 12:00:08 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r59009 r59045 2897 2897 * 2898 2898 * The dynamic portion of the hook name, `$field`, refers to the post 2899 * field name. 2899 * field name. Possible filter names include: 2900 * 2901 * - `edit_post_author` 2902 * - `edit_post_date` 2903 * - `edit_post_date_gmt` 2904 * - `edit_post_content` 2905 * - `edit_post_title` 2906 * - `edit_post_excerpt` 2907 * - `edit_post_status` 2908 * - `edit_post_password` 2909 * - `edit_post_name` 2910 * - `edit_post_modified` 2911 * - `edit_post_modified_gmt` 2912 * - `edit_post_content_filtered` 2913 * - `edit_post_parent` 2914 * - `edit_post_type` 2915 * - `edit_post_mime_type` 2900 2916 * 2901 2917 * @since 2.3.0 … … 2909 2925 * Filters the value of a specific post field to edit. 2910 2926 * 2911 * The dynamic portion of the hook name, `$field_no_prefix`, refers to 2912 * the post field name. 2927 * Only applied to post fields with a name which is prefixed with `post_`. 2928 * 2929 * The dynamic portion of the hook name, `$field_no_prefix`, refers to the 2930 * post field name minus the `post_` prefix. Possible filter names include: 2931 * 2932 * - `author_edit_pre` 2933 * - `date_edit_pre` 2934 * - `date_gmt_edit_pre` 2935 * - `content_edit_pre` 2936 * - `title_edit_pre` 2937 * - `excerpt_edit_pre` 2938 * - `status_edit_pre` 2939 * - `password_edit_pre` 2940 * - `name_edit_pre` 2941 * - `modified_edit_pre` 2942 * - `modified_gmt_edit_pre` 2943 * - `content_filtered_edit_pre` 2944 * - `parent_edit_pre` 2945 * - `type_edit_pre` 2946 * - `mime_type_edit_pre` 2913 2947 * 2914 2948 * @since 2.3.0 … … 2919 2953 $value = apply_filters( "{$field_no_prefix}_edit_pre", $value, $post_id ); 2920 2954 } else { 2955 /** 2956 * Filters the value of a specific post field to edit. 2957 * 2958 * Only applied to post fields not prefixed with `post_`. 2959 * 2960 * The dynamic portion of the hook name, `$field`, refers to the 2961 * post field name. Possible filter names include: 2962 * 2963 * - `edit_post_ID` 2964 * - `edit_post_ping_status` 2965 * - `edit_post_pinged` 2966 * - `edit_post_to_ping` 2967 * - `edit_post_comment_count` 2968 * - `edit_post_comment_status` 2969 * - `edit_post_guid` 2970 * - `edit_post_menu_order` 2971 * @since 2972 */ 2921 2973 $value = apply_filters( "edit_post_{$field}", $value, $post_id ); 2922 2974 } … … 2937 2989 * Filters the value of a specific post field before saving. 2938 2990 * 2991 * Only applied to post fields with a name which is prefixed with `post_`. 2992 * 2939 2993 * The dynamic portion of the hook name, `$field`, refers to the post 2940 * field name. 2994 * field name. Possible filter names include: 2995 * 2996 * - `pre_post_author` 2997 * - `pre_post_date` 2998 * - `pre_post_date_gmt` 2999 * - `pre_post_content` 3000 * - `pre_post_title` 3001 * - `pre_post_excerpt` 3002 * - `pre_post_status` 3003 * - `pre_post_password` 3004 * - `pre_post_name` 3005 * - `pre_post_modified` 3006 * - `pre_post_modified_gmt` 3007 * - `pre_post_content_filtered` 3008 * - `pre_post_parent` 3009 * - `pre_post_type` 3010 * - `pre_post_mime_type` 2941 3011 * 2942 3012 * @since 2.3.0 … … 2949 3019 * Filters the value of a specific field before saving. 2950 3020 * 2951 * The dynamic portion of the hook name, `$field_no_prefix`, refers 2952 * to the post field name. 3021 * Only applied to post fields with a name which is prefixed with `post_`. 3022 * 3023 * The dynamic portion of the hook name, `$field_no_prefix`, refers to the 3024 * post field name minus the `post_` prefix. Possible filter names include: 3025 * 3026 * - `author_save_pre` 3027 * - `date_save_pre` 3028 * - `date_gmt_save_pre` 3029 * - `content_save_pre` 3030 * - `title_save_pre` 3031 * - `excerpt_save_pre` 3032 * - `status_save_pre` 3033 * - `password_save_pre` 3034 * - `name_save_pre` 3035 * - `modified_save_pre` 3036 * - `modified_gmt_save_pre` 3037 * - `content_filtered_save_pre` 3038 * - `parent_save_pre` 3039 * - `type_save_pre` 3040 * - `mime_type_save_pre` 2953 3041 * 2954 3042 * @since 2.3.0 … … 2958 3046 $value = apply_filters( "{$field_no_prefix}_save_pre", $value ); 2959 3047 } else { 3048 /** 3049 * Filters the value of a specific field before saving. 3050 * 3051 * Only applied to post fields with a name which is prefixed with `post_`. 3052 * 3053 * The dynamic portion of the hook name, `$field_no_prefix`, refers to the 3054 * post field name minus the `post_` prefix. Possible filter names include: 3055 * 3056 * - `pre_post_ID` 3057 * - `pre_post_comment_status` 3058 * - `pre_post_ping_status` 3059 * - `pre_post_to_ping` 3060 * - `pre_post_pinged` 3061 * - `pre_post_guid` 3062 * - `pre_post_menu_order` 3063 * - `pre_post_comment_count` 3064 * 3065 * @since 2.3.0 3066 * 3067 * @param mixed $value Value of the post field. 3068 */ 2960 3069 $value = apply_filters( "pre_post_{$field}", $value ); 2961 3070 … … 2963 3072 * Filters the value of a specific post field before saving. 2964 3073 * 3074 * Only applied to post fields with a name which is *not* prefixed with `post_`. 3075 * 2965 3076 * The dynamic portion of the hook name, `$field`, refers to the post 2966 * field name. 3077 * field name. Possible filter names include: 3078 * 3079 * - `ID_pre` 3080 * - `comment_status_pre` 3081 * - `ping_status_pre` 3082 * - `to_ping_pre` 3083 * - `pinged_pre` 3084 * - `guid_pre` 3085 * - `menu_order_pre` 3086 * - `comment_count_pre` 2967 3087 * 2968 3088 * @since 2.3.0 … … 2980 3100 * Filters the value of a specific post field for display. 2981 3101 * 3102 * Only applied to post fields with a name which is prefixed with `post_`. 3103 * 2982 3104 * The dynamic portion of the hook name, `$field`, refers to the post 2983 * field name. 3105 * field name. Possible filter names include: 3106 * 3107 * - `post_author` 3108 * - `post_date` 3109 * - `post_date_gmt` 3110 * - `post_content` 3111 * - `post_title` 3112 * - `post_excerpt` 3113 * - `post_status` 3114 * - `post_password` 3115 * - `post_name` 3116 * - `post_modified` 3117 * - `post_modified_gmt` 3118 * - `post_content_filtered` 3119 * - `post_parent` 3120 * - `post_type` 3121 * - `post_mime_type` 2984 3122 * 2985 3123 * @since 2.3.0 … … 2993 3131 $value = apply_filters( "{$field}", $value, $post_id, $context ); 2994 3132 } else { 3133 /** 3134 * Filters the value of a specific post field for display. 3135 * 3136 * Only applied to post fields name which is *not* prefixed with `post_`. 3137 * 3138 * The dynamic portion of the hook name, `$field`, refers to the post 3139 * field name. Possible filter names include: 3140 * 3141 * - `post_ID` 3142 * - `post_comment_status` 3143 * - `post_ping_status` 3144 * - `post_to_ping` 3145 * - `post_pinged` 3146 * - `post_guid` 3147 * - `post_menu_order` 3148 * - `post_comment_count` 3149 * 3150 * @since 2.3.0 3151 * 3152 * @param mixed $value Value of the unprefixed post field. 3153 * @param int $post_id Post ID 3154 * @param string $context Context for how to sanitize the field. 3155 * Accepts 'raw', 'edit', 'db', 'display', 3156 * 'attribute', or 'js'. Default 'display'. 3157 */ 2995 3158 $value = apply_filters( "post_{$field}", $value, $post_id, $context ); 2996 3159 } … … 3007 3170 $value = (int) $value; 3008 3171 } 3009 3010 3172 return $value; 3011 3173 }
Note: See TracChangeset
for help on using the changeset viewer.