Edit File by line
/home/barbar84/public_h.../wp-inclu...
File: post.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Core Post API
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Post
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
//
[8] Fix | Delete
// Post Type registration.
[9] Fix | Delete
//
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Creates the initial post types when 'init' action is fired.
[13] Fix | Delete
*
[14] Fix | Delete
* See {@see 'init'}.
[15] Fix | Delete
*
[16] Fix | Delete
* @since 2.9.0
[17] Fix | Delete
*/
[18] Fix | Delete
function create_initial_post_types() {
[19] Fix | Delete
register_post_type(
[20] Fix | Delete
'post',
[21] Fix | Delete
array(
[22] Fix | Delete
'labels' => array(
[23] Fix | Delete
'name_admin_bar' => _x( 'Post', 'add new from admin bar' ),
[24] Fix | Delete
),
[25] Fix | Delete
'public' => true,
[26] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[27] Fix | Delete
'_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
[28] Fix | Delete
'capability_type' => 'post',
[29] Fix | Delete
'map_meta_cap' => true,
[30] Fix | Delete
'menu_position' => 5,
[31] Fix | Delete
'menu_icon' => 'dashicons-admin-post',
[32] Fix | Delete
'hierarchical' => false,
[33] Fix | Delete
'rewrite' => false,
[34] Fix | Delete
'query_var' => false,
[35] Fix | Delete
'delete_with_user' => true,
[36] Fix | Delete
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ),
[37] Fix | Delete
'show_in_rest' => true,
[38] Fix | Delete
'rest_base' => 'posts',
[39] Fix | Delete
'rest_controller_class' => 'WP_REST_Posts_Controller',
[40] Fix | Delete
)
[41] Fix | Delete
);
[42] Fix | Delete
[43] Fix | Delete
register_post_type(
[44] Fix | Delete
'page',
[45] Fix | Delete
array(
[46] Fix | Delete
'labels' => array(
[47] Fix | Delete
'name_admin_bar' => _x( 'Page', 'add new from admin bar' ),
[48] Fix | Delete
),
[49] Fix | Delete
'public' => true,
[50] Fix | Delete
'publicly_queryable' => false,
[51] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[52] Fix | Delete
'_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
[53] Fix | Delete
'capability_type' => 'page',
[54] Fix | Delete
'map_meta_cap' => true,
[55] Fix | Delete
'menu_position' => 20,
[56] Fix | Delete
'menu_icon' => 'dashicons-admin-page',
[57] Fix | Delete
'hierarchical' => true,
[58] Fix | Delete
'rewrite' => false,
[59] Fix | Delete
'query_var' => false,
[60] Fix | Delete
'delete_with_user' => true,
[61] Fix | Delete
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes', 'custom-fields', 'comments', 'revisions' ),
[62] Fix | Delete
'show_in_rest' => true,
[63] Fix | Delete
'rest_base' => 'pages',
[64] Fix | Delete
'rest_controller_class' => 'WP_REST_Posts_Controller',
[65] Fix | Delete
)
[66] Fix | Delete
);
[67] Fix | Delete
[68] Fix | Delete
register_post_type(
[69] Fix | Delete
'attachment',
[70] Fix | Delete
array(
[71] Fix | Delete
'labels' => array(
[72] Fix | Delete
'name' => _x( 'Media', 'post type general name' ),
[73] Fix | Delete
'name_admin_bar' => _x( 'Media', 'add new from admin bar' ),
[74] Fix | Delete
'add_new' => _x( 'Add New', 'add new media' ),
[75] Fix | Delete
'edit_item' => __( 'Edit Media' ),
[76] Fix | Delete
'view_item' => __( 'View Attachment Page' ),
[77] Fix | Delete
'attributes' => __( 'Attachment Attributes' ),
[78] Fix | Delete
),
[79] Fix | Delete
'public' => true,
[80] Fix | Delete
'show_ui' => true,
[81] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[82] Fix | Delete
'_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
[83] Fix | Delete
'capability_type' => 'post',
[84] Fix | Delete
'capabilities' => array(
[85] Fix | Delete
'create_posts' => 'upload_files',
[86] Fix | Delete
),
[87] Fix | Delete
'map_meta_cap' => true,
[88] Fix | Delete
'menu_icon' => 'dashicons-admin-media',
[89] Fix | Delete
'hierarchical' => false,
[90] Fix | Delete
'rewrite' => false,
[91] Fix | Delete
'query_var' => false,
[92] Fix | Delete
'show_in_nav_menus' => false,
[93] Fix | Delete
'delete_with_user' => true,
[94] Fix | Delete
'supports' => array( 'title', 'author', 'comments' ),
[95] Fix | Delete
'show_in_rest' => true,
[96] Fix | Delete
'rest_base' => 'media',
[97] Fix | Delete
'rest_controller_class' => 'WP_REST_Attachments_Controller',
[98] Fix | Delete
)
[99] Fix | Delete
);
[100] Fix | Delete
add_post_type_support( 'attachment:audio', 'thumbnail' );
[101] Fix | Delete
add_post_type_support( 'attachment:video', 'thumbnail' );
[102] Fix | Delete
[103] Fix | Delete
register_post_type(
[104] Fix | Delete
'revision',
[105] Fix | Delete
array(
[106] Fix | Delete
'labels' => array(
[107] Fix | Delete
'name' => __( 'Revisions' ),
[108] Fix | Delete
'singular_name' => __( 'Revision' ),
[109] Fix | Delete
),
[110] Fix | Delete
'public' => false,
[111] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[112] Fix | Delete
'_edit_link' => 'revision.php?revision=%d', /* internal use only. don't use this when registering your own post type. */
[113] Fix | Delete
'capability_type' => 'post',
[114] Fix | Delete
'map_meta_cap' => true,
[115] Fix | Delete
'hierarchical' => false,
[116] Fix | Delete
'rewrite' => false,
[117] Fix | Delete
'query_var' => false,
[118] Fix | Delete
'can_export' => false,
[119] Fix | Delete
'delete_with_user' => true,
[120] Fix | Delete
'supports' => array( 'author' ),
[121] Fix | Delete
)
[122] Fix | Delete
);
[123] Fix | Delete
[124] Fix | Delete
register_post_type(
[125] Fix | Delete
'nav_menu_item',
[126] Fix | Delete
array(
[127] Fix | Delete
'labels' => array(
[128] Fix | Delete
'name' => __( 'Navigation Menu Items' ),
[129] Fix | Delete
'singular_name' => __( 'Navigation Menu Item' ),
[130] Fix | Delete
),
[131] Fix | Delete
'public' => false,
[132] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[133] Fix | Delete
'hierarchical' => false,
[134] Fix | Delete
'rewrite' => false,
[135] Fix | Delete
'delete_with_user' => false,
[136] Fix | Delete
'query_var' => false,
[137] Fix | Delete
)
[138] Fix | Delete
);
[139] Fix | Delete
[140] Fix | Delete
register_post_type(
[141] Fix | Delete
'custom_css',
[142] Fix | Delete
array(
[143] Fix | Delete
'labels' => array(
[144] Fix | Delete
'name' => __( 'Custom CSS' ),
[145] Fix | Delete
'singular_name' => __( 'Custom CSS' ),
[146] Fix | Delete
),
[147] Fix | Delete
'public' => false,
[148] Fix | Delete
'hierarchical' => false,
[149] Fix | Delete
'rewrite' => false,
[150] Fix | Delete
'query_var' => false,
[151] Fix | Delete
'delete_with_user' => false,
[152] Fix | Delete
'can_export' => true,
[153] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[154] Fix | Delete
'supports' => array( 'title', 'revisions' ),
[155] Fix | Delete
'capabilities' => array(
[156] Fix | Delete
'delete_posts' => 'edit_theme_options',
[157] Fix | Delete
'delete_post' => 'edit_theme_options',
[158] Fix | Delete
'delete_published_posts' => 'edit_theme_options',
[159] Fix | Delete
'delete_private_posts' => 'edit_theme_options',
[160] Fix | Delete
'delete_others_posts' => 'edit_theme_options',
[161] Fix | Delete
'edit_post' => 'edit_css',
[162] Fix | Delete
'edit_posts' => 'edit_css',
[163] Fix | Delete
'edit_others_posts' => 'edit_css',
[164] Fix | Delete
'edit_published_posts' => 'edit_css',
[165] Fix | Delete
'read_post' => 'read',
[166] Fix | Delete
'read_private_posts' => 'read',
[167] Fix | Delete
'publish_posts' => 'edit_theme_options',
[168] Fix | Delete
),
[169] Fix | Delete
)
[170] Fix | Delete
);
[171] Fix | Delete
[172] Fix | Delete
register_post_type(
[173] Fix | Delete
'customize_changeset',
[174] Fix | Delete
array(
[175] Fix | Delete
'labels' => array(
[176] Fix | Delete
'name' => _x( 'Changesets', 'post type general name' ),
[177] Fix | Delete
'singular_name' => _x( 'Changeset', 'post type singular name' ),
[178] Fix | Delete
'menu_name' => _x( 'Changesets', 'admin menu' ),
[179] Fix | Delete
'name_admin_bar' => _x( 'Changeset', 'add new on admin bar' ),
[180] Fix | Delete
'add_new' => _x( 'Add New', 'Customize Changeset' ),
[181] Fix | Delete
'add_new_item' => __( 'Add New Changeset' ),
[182] Fix | Delete
'new_item' => __( 'New Changeset' ),
[183] Fix | Delete
'edit_item' => __( 'Edit Changeset' ),
[184] Fix | Delete
'view_item' => __( 'View Changeset' ),
[185] Fix | Delete
'all_items' => __( 'All Changesets' ),
[186] Fix | Delete
'search_items' => __( 'Search Changesets' ),
[187] Fix | Delete
'not_found' => __( 'No changesets found.' ),
[188] Fix | Delete
'not_found_in_trash' => __( 'No changesets found in Trash.' ),
[189] Fix | Delete
),
[190] Fix | Delete
'public' => false,
[191] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[192] Fix | Delete
'map_meta_cap' => true,
[193] Fix | Delete
'hierarchical' => false,
[194] Fix | Delete
'rewrite' => false,
[195] Fix | Delete
'query_var' => false,
[196] Fix | Delete
'can_export' => false,
[197] Fix | Delete
'delete_with_user' => false,
[198] Fix | Delete
'supports' => array( 'title', 'author' ),
[199] Fix | Delete
'capability_type' => 'customize_changeset',
[200] Fix | Delete
'capabilities' => array(
[201] Fix | Delete
'create_posts' => 'customize',
[202] Fix | Delete
'delete_others_posts' => 'customize',
[203] Fix | Delete
'delete_post' => 'customize',
[204] Fix | Delete
'delete_posts' => 'customize',
[205] Fix | Delete
'delete_private_posts' => 'customize',
[206] Fix | Delete
'delete_published_posts' => 'customize',
[207] Fix | Delete
'edit_others_posts' => 'customize',
[208] Fix | Delete
'edit_post' => 'customize',
[209] Fix | Delete
'edit_posts' => 'customize',
[210] Fix | Delete
'edit_private_posts' => 'customize',
[211] Fix | Delete
'edit_published_posts' => 'do_not_allow',
[212] Fix | Delete
'publish_posts' => 'customize',
[213] Fix | Delete
'read' => 'read',
[214] Fix | Delete
'read_post' => 'customize',
[215] Fix | Delete
'read_private_posts' => 'customize',
[216] Fix | Delete
),
[217] Fix | Delete
)
[218] Fix | Delete
);
[219] Fix | Delete
[220] Fix | Delete
register_post_type(
[221] Fix | Delete
'oembed_cache',
[222] Fix | Delete
array(
[223] Fix | Delete
'labels' => array(
[224] Fix | Delete
'name' => __( 'oEmbed Responses' ),
[225] Fix | Delete
'singular_name' => __( 'oEmbed Response' ),
[226] Fix | Delete
),
[227] Fix | Delete
'public' => false,
[228] Fix | Delete
'hierarchical' => false,
[229] Fix | Delete
'rewrite' => false,
[230] Fix | Delete
'query_var' => false,
[231] Fix | Delete
'delete_with_user' => false,
[232] Fix | Delete
'can_export' => false,
[233] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[234] Fix | Delete
'supports' => array(),
[235] Fix | Delete
)
[236] Fix | Delete
);
[237] Fix | Delete
[238] Fix | Delete
register_post_type(
[239] Fix | Delete
'user_request',
[240] Fix | Delete
array(
[241] Fix | Delete
'labels' => array(
[242] Fix | Delete
'name' => __( 'User Requests' ),
[243] Fix | Delete
'singular_name' => __( 'User Request' ),
[244] Fix | Delete
),
[245] Fix | Delete
'public' => false,
[246] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[247] Fix | Delete
'hierarchical' => false,
[248] Fix | Delete
'rewrite' => false,
[249] Fix | Delete
'query_var' => false,
[250] Fix | Delete
'can_export' => false,
[251] Fix | Delete
'delete_with_user' => false,
[252] Fix | Delete
'supports' => array(),
[253] Fix | Delete
)
[254] Fix | Delete
);
[255] Fix | Delete
[256] Fix | Delete
register_post_type(
[257] Fix | Delete
'wp_block',
[258] Fix | Delete
array(
[259] Fix | Delete
'labels' => array(
[260] Fix | Delete
'name' => _x( 'Reusable Blocks', 'post type general name' ),
[261] Fix | Delete
'singular_name' => _x( 'Reusable Block', 'post type singular name' ),
[262] Fix | Delete
'menu_name' => _x( 'Reusable Blocks', 'admin menu' ),
[263] Fix | Delete
'name_admin_bar' => _x( 'Reusable Block', 'add new on admin bar' ),
[264] Fix | Delete
'add_new' => _x( 'Add New', 'Reusable Block' ),
[265] Fix | Delete
'add_new_item' => __( 'Add New Reusable Block' ),
[266] Fix | Delete
'new_item' => __( 'New Reusable Block' ),
[267] Fix | Delete
'edit_item' => __( 'Edit Reusable Block' ),
[268] Fix | Delete
'view_item' => __( 'View Reusable Block' ),
[269] Fix | Delete
'all_items' => __( 'All Reusable Blocks' ),
[270] Fix | Delete
'search_items' => __( 'Search Reusable Blocks' ),
[271] Fix | Delete
'not_found' => __( 'No reusable blocks found.' ),
[272] Fix | Delete
'not_found_in_trash' => __( 'No reusable blocks found in Trash.' ),
[273] Fix | Delete
'filter_items_list' => __( 'Filter reusable blocks list' ),
[274] Fix | Delete
'items_list_navigation' => __( 'Reusable Blocks list navigation' ),
[275] Fix | Delete
'items_list' => __( 'Reusable Blocks list' ),
[276] Fix | Delete
'item_published' => __( 'Reusable Block published.' ),
[277] Fix | Delete
'item_published_privately' => __( 'Reusable Block published privately.' ),
[278] Fix | Delete
'item_reverted_to_draft' => __( 'Reusable Block reverted to draft.' ),
[279] Fix | Delete
'item_scheduled' => __( 'Reusable Block scheduled.' ),
[280] Fix | Delete
'item_updated' => __( 'Reusable Block updated.' ),
[281] Fix | Delete
),
[282] Fix | Delete
'public' => false,
[283] Fix | Delete
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
[284] Fix | Delete
'show_ui' => true,
[285] Fix | Delete
'show_in_menu' => false,
[286] Fix | Delete
'rewrite' => false,
[287] Fix | Delete
'show_in_rest' => true,
[288] Fix | Delete
'rest_base' => 'blocks',
[289] Fix | Delete
'rest_controller_class' => 'WP_REST_Blocks_Controller',
[290] Fix | Delete
'capability_type' => 'block',
[291] Fix | Delete
'capabilities' => array(
[292] Fix | Delete
// You need to be able to edit posts, in order to read blocks in their raw form.
[293] Fix | Delete
'read' => 'edit_posts',
[294] Fix | Delete
// You need to be able to publish posts, in order to create blocks.
[295] Fix | Delete
'create_posts' => 'publish_posts',
[296] Fix | Delete
'edit_posts' => 'edit_posts',
[297] Fix | Delete
'edit_published_posts' => 'edit_published_posts',
[298] Fix | Delete
'delete_published_posts' => 'delete_published_posts',
[299] Fix | Delete
'edit_others_posts' => 'edit_others_posts',
[300] Fix | Delete
'delete_others_posts' => 'delete_others_posts',
[301] Fix | Delete
),
[302] Fix | Delete
'map_meta_cap' => true,
[303] Fix | Delete
'supports' => array(
[304] Fix | Delete
'title',
[305] Fix | Delete
'editor',
[306] Fix | Delete
),
[307] Fix | Delete
)
[308] Fix | Delete
);
[309] Fix | Delete
[310] Fix | Delete
register_post_status(
[311] Fix | Delete
'publish',
[312] Fix | Delete
array(
[313] Fix | Delete
'label' => _x( 'Published', 'post status' ),
[314] Fix | Delete
'public' => true,
[315] Fix | Delete
'_builtin' => true, /* internal use only. */
[316] Fix | Delete
/* translators: %s: Number of published posts. */
[317] Fix | Delete
'label_count' => _n_noop(
[318] Fix | Delete
'Published <span class="count">(%s)</span>',
[319] Fix | Delete
'Published <span class="count">(%s)</span>'
[320] Fix | Delete
),
[321] Fix | Delete
)
[322] Fix | Delete
);
[323] Fix | Delete
[324] Fix | Delete
register_post_status(
[325] Fix | Delete
'future',
[326] Fix | Delete
array(
[327] Fix | Delete
'label' => _x( 'Scheduled', 'post status' ),
[328] Fix | Delete
'protected' => true,
[329] Fix | Delete
'_builtin' => true, /* internal use only. */
[330] Fix | Delete
/* translators: %s: Number of scheduled posts. */
[331] Fix | Delete
'label_count' => _n_noop(
[332] Fix | Delete
'Scheduled <span class="count">(%s)</span>',
[333] Fix | Delete
'Scheduled <span class="count">(%s)</span>'
[334] Fix | Delete
),
[335] Fix | Delete
)
[336] Fix | Delete
);
[337] Fix | Delete
[338] Fix | Delete
register_post_status(
[339] Fix | Delete
'draft',
[340] Fix | Delete
array(
[341] Fix | Delete
'label' => _x( 'Draft', 'post status' ),
[342] Fix | Delete
'protected' => true,
[343] Fix | Delete
'_builtin' => true, /* internal use only. */
[344] Fix | Delete
/* translators: %s: Number of draft posts. */
[345] Fix | Delete
'label_count' => _n_noop(
[346] Fix | Delete
'Draft <span class="count">(%s)</span>',
[347] Fix | Delete
'Drafts <span class="count">(%s)</span>'
[348] Fix | Delete
),
[349] Fix | Delete
'date_floating' => true,
[350] Fix | Delete
)
[351] Fix | Delete
);
[352] Fix | Delete
[353] Fix | Delete
register_post_status(
[354] Fix | Delete
'pending',
[355] Fix | Delete
array(
[356] Fix | Delete
'label' => _x( 'Pending', 'post status' ),
[357] Fix | Delete
'protected' => true,
[358] Fix | Delete
'_builtin' => true, /* internal use only. */
[359] Fix | Delete
/* translators: %s: Number of pending posts. */
[360] Fix | Delete
'label_count' => _n_noop(
[361] Fix | Delete
'Pending <span class="count">(%s)</span>',
[362] Fix | Delete
'Pending <span class="count">(%s)</span>'
[363] Fix | Delete
),
[364] Fix | Delete
'date_floating' => true,
[365] Fix | Delete
)
[366] Fix | Delete
);
[367] Fix | Delete
[368] Fix | Delete
register_post_status(
[369] Fix | Delete
'private',
[370] Fix | Delete
array(
[371] Fix | Delete
'label' => _x( 'Private', 'post status' ),
[372] Fix | Delete
'private' => true,
[373] Fix | Delete
'_builtin' => true, /* internal use only. */
[374] Fix | Delete
/* translators: %s: Number of private posts. */
[375] Fix | Delete
'label_count' => _n_noop(
[376] Fix | Delete
'Private <span class="count">(%s)</span>',
[377] Fix | Delete
'Private <span class="count">(%s)</span>'
[378] Fix | Delete
),
[379] Fix | Delete
)
[380] Fix | Delete
);
[381] Fix | Delete
[382] Fix | Delete
register_post_status(
[383] Fix | Delete
'trash',
[384] Fix | Delete
array(
[385] Fix | Delete
'label' => _x( 'Trash', 'post status' ),
[386] Fix | Delete
'internal' => true,
[387] Fix | Delete
'_builtin' => true, /* internal use only. */
[388] Fix | Delete
/* translators: %s: Number of trashed posts. */
[389] Fix | Delete
'label_count' => _n_noop(
[390] Fix | Delete
'Trash <span class="count">(%s)</span>',
[391] Fix | Delete
'Trash <span class="count">(%s)</span>'
[392] Fix | Delete
),
[393] Fix | Delete
'show_in_admin_status_list' => true,
[394] Fix | Delete
)
[395] Fix | Delete
);
[396] Fix | Delete
[397] Fix | Delete
register_post_status(
[398] Fix | Delete
'auto-draft',
[399] Fix | Delete
array(
[400] Fix | Delete
'label' => 'auto-draft',
[401] Fix | Delete
'internal' => true,
[402] Fix | Delete
'_builtin' => true, /* internal use only. */
[403] Fix | Delete
'date_floating' => true,
[404] Fix | Delete
)
[405] Fix | Delete
);
[406] Fix | Delete
[407] Fix | Delete
register_post_status(
[408] Fix | Delete
'inherit',
[409] Fix | Delete
array(
[410] Fix | Delete
'label' => 'inherit',
[411] Fix | Delete
'internal' => true,
[412] Fix | Delete
'_builtin' => true, /* internal use only. */
[413] Fix | Delete
'exclude_from_search' => false,
[414] Fix | Delete
)
[415] Fix | Delete
);
[416] Fix | Delete
[417] Fix | Delete
register_post_status(
[418] Fix | Delete
'request-pending',
[419] Fix | Delete
array(
[420] Fix | Delete
'label' => _x( 'Pending', 'request status' ),
[421] Fix | Delete
'internal' => true,
[422] Fix | Delete
'_builtin' => true, /* internal use only. */
[423] Fix | Delete
/* translators: %s: Number of pending requests. */
[424] Fix | Delete
'label_count' => _n_noop(
[425] Fix | Delete
'Pending <span class="count">(%s)</span>',
[426] Fix | Delete
'Pending <span class="count">(%s)</span>'
[427] Fix | Delete
),
[428] Fix | Delete
'exclude_from_search' => false,
[429] Fix | Delete
)
[430] Fix | Delete
);
[431] Fix | Delete
[432] Fix | Delete
register_post_status(
[433] Fix | Delete
'request-confirmed',
[434] Fix | Delete
array(
[435] Fix | Delete
'label' => _x( 'Confirmed', 'request status' ),
[436] Fix | Delete
'internal' => true,
[437] Fix | Delete
'_builtin' => true, /* internal use only. */
[438] Fix | Delete
/* translators: %s: Number of confirmed requests. */
[439] Fix | Delete
'label_count' => _n_noop(
[440] Fix | Delete
'Confirmed <span class="count">(%s)</span>',
[441] Fix | Delete
'Confirmed <span class="count">(%s)</span>'
[442] Fix | Delete
),
[443] Fix | Delete
'exclude_from_search' => false,
[444] Fix | Delete
)
[445] Fix | Delete
);
[446] Fix | Delete
[447] Fix | Delete
register_post_status(
[448] Fix | Delete
'request-failed',
[449] Fix | Delete
array(
[450] Fix | Delete
'label' => _x( 'Failed', 'request status' ),
[451] Fix | Delete
'internal' => true,
[452] Fix | Delete
'_builtin' => true, /* internal use only. */
[453] Fix | Delete
/* translators: %s: Number of failed requests. */
[454] Fix | Delete
'label_count' => _n_noop(
[455] Fix | Delete
'Failed <span class="count">(%s)</span>',
[456] Fix | Delete
'Failed <span class="count">(%s)</span>'
[457] Fix | Delete
),
[458] Fix | Delete
'exclude_from_search' => false,
[459] Fix | Delete
)
[460] Fix | Delete
);
[461] Fix | Delete
[462] Fix | Delete
register_post_status(
[463] Fix | Delete
'request-completed',
[464] Fix | Delete
array(
[465] Fix | Delete
'label' => _x( 'Completed', 'request status' ),
[466] Fix | Delete
'internal' => true,
[467] Fix | Delete
'_builtin' => true, /* internal use only. */
[468] Fix | Delete
/* translators: %s: Number of completed requests. */
[469] Fix | Delete
'label_count' => _n_noop(
[470] Fix | Delete
'Completed <span class="count">(%s)</span>',
[471] Fix | Delete
'Completed <span class="count">(%s)</span>'
[472] Fix | Delete
),
[473] Fix | Delete
'exclude_from_search' => false,
[474] Fix | Delete
)
[475] Fix | Delete
);
[476] Fix | Delete
}
[477] Fix | Delete
[478] Fix | Delete
/**
[479] Fix | Delete
* Retrieve attached file path based on attachment ID.
[480] Fix | Delete
*
[481] Fix | Delete
* By default the path will go through the 'get_attached_file' filter, but
[482] Fix | Delete
* passing a true to the $unfiltered argument of get_attached_file() will
[483] Fix | Delete
* return the file path unfiltered.
[484] Fix | Delete
*
[485] Fix | Delete
* The function works by getting the single post meta name, named
[486] Fix | Delete
* '_wp_attached_file' and returning it. This is a convenience function to
[487] Fix | Delete
* prevent looking up the meta name and provide a mechanism for sending the
[488] Fix | Delete
* attached filename through a filter.
[489] Fix | Delete
*
[490] Fix | Delete
* @since 2.0.0
[491] Fix | Delete
*
[492] Fix | Delete
* @param int $attachment_id Attachment ID.
[493] Fix | Delete
* @param bool $unfiltered Optional. Whether to apply filters. Default false.
[494] Fix | Delete
* @return string|false The file path to where the attached file should be, false otherwise.
[495] Fix | Delete
*/
[496] Fix | Delete
function get_attached_file( $attachment_id, $unfiltered = false ) {
[497] Fix | Delete
$file = get_post_meta( $attachment_id, '_wp_attached_file', true );
[498] Fix | Delete
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function