Edit File by line
/home/barbar84/public_h.../wp-admin/includes
File: template.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Template WordPress Administration API.
[2] Fix | Delete
*
[3] Fix | Delete
* A Big Mess. Also some neat functions that are nicely written.
[4] Fix | Delete
*
[5] Fix | Delete
* @package WordPress
[6] Fix | Delete
* @subpackage Administration
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
/** Walker_Category_Checklist class */
[10] Fix | Delete
require_once ABSPATH . 'wp-admin/includes/class-walker-category-checklist.php';
[11] Fix | Delete
[12] Fix | Delete
/** WP_Internal_Pointers class */
[13] Fix | Delete
require_once ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php';
[14] Fix | Delete
[15] Fix | Delete
//
[16] Fix | Delete
// Category Checklists.
[17] Fix | Delete
//
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Output an unordered list of checkbox input elements labeled with category names.
[21] Fix | Delete
*
[22] Fix | Delete
* @since 2.5.1
[23] Fix | Delete
*
[24] Fix | Delete
* @see wp_terms_checklist()
[25] Fix | Delete
*
[26] Fix | Delete
* @param int $post_id Optional. Post to generate a categories checklist for. Default 0.
[27] Fix | Delete
* $selected_cats must not be an array. Default 0.
[28] Fix | Delete
* @param int $descendants_and_self Optional. ID of the category to output along with its descendants.
[29] Fix | Delete
* Default 0.
[30] Fix | Delete
* @param int[]|false $selected_cats Optional. Array of category IDs to mark as checked. Default false.
[31] Fix | Delete
* @param int[]|false $popular_cats Optional. Array of category IDs to receive the "popular-category" class.
[32] Fix | Delete
* Default false.
[33] Fix | Delete
* @param Walker $walker Optional. Walker object to use to build the output.
[34] Fix | Delete
* Default is a Walker_Category_Checklist instance.
[35] Fix | Delete
* @param bool $checked_ontop Optional. Whether to move checked items out of the hierarchy and to
[36] Fix | Delete
* the top of the list. Default true.
[37] Fix | Delete
*/
[38] Fix | Delete
function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) {
[39] Fix | Delete
wp_terms_checklist(
[40] Fix | Delete
$post_id,
[41] Fix | Delete
array(
[42] Fix | Delete
'taxonomy' => 'category',
[43] Fix | Delete
'descendants_and_self' => $descendants_and_self,
[44] Fix | Delete
'selected_cats' => $selected_cats,
[45] Fix | Delete
'popular_cats' => $popular_cats,
[46] Fix | Delete
'walker' => $walker,
[47] Fix | Delete
'checked_ontop' => $checked_ontop,
[48] Fix | Delete
)
[49] Fix | Delete
);
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
/**
[53] Fix | Delete
* Output an unordered list of checkbox input elements labelled with term names.
[54] Fix | Delete
*
[55] Fix | Delete
* Taxonomy-independent version of wp_category_checklist().
[56] Fix | Delete
*
[57] Fix | Delete
* @since 3.0.0
[58] Fix | Delete
* @since 4.4.0 Introduced the `$echo` argument.
[59] Fix | Delete
*
[60] Fix | Delete
* @param int $post_id Optional. Post ID. Default 0.
[61] Fix | Delete
* @param array|string $args {
[62] Fix | Delete
* Optional. Array or string of arguments for generating a terms checklist. Default empty array.
[63] Fix | Delete
*
[64] Fix | Delete
* @type int $descendants_and_self ID of the category to output along with its descendants.
[65] Fix | Delete
* Default 0.
[66] Fix | Delete
* @type int[] $selected_cats Array of category IDs to mark as checked. Default false.
[67] Fix | Delete
* @type int[] $popular_cats Array of category IDs to receive the "popular-category" class.
[68] Fix | Delete
* Default false.
[69] Fix | Delete
* @type Walker $walker Walker object to use to build the output.
[70] Fix | Delete
* Default is a Walker_Category_Checklist instance.
[71] Fix | Delete
* @type string $taxonomy Taxonomy to generate the checklist for. Default 'category'.
[72] Fix | Delete
* @type bool $checked_ontop Whether to move checked items out of the hierarchy and to
[73] Fix | Delete
* the top of the list. Default true.
[74] Fix | Delete
* @type bool $echo Whether to echo the generated markup. False to return the markup instead
[75] Fix | Delete
* of echoing it. Default true.
[76] Fix | Delete
* }
[77] Fix | Delete
* @return string HTML list of input elements.
[78] Fix | Delete
*/
[79] Fix | Delete
function wp_terms_checklist( $post_id = 0, $args = array() ) {
[80] Fix | Delete
$defaults = array(
[81] Fix | Delete
'descendants_and_self' => 0,
[82] Fix | Delete
'selected_cats' => false,
[83] Fix | Delete
'popular_cats' => false,
[84] Fix | Delete
'walker' => null,
[85] Fix | Delete
'taxonomy' => 'category',
[86] Fix | Delete
'checked_ontop' => true,
[87] Fix | Delete
'echo' => true,
[88] Fix | Delete
);
[89] Fix | Delete
[90] Fix | Delete
/**
[91] Fix | Delete
* Filters the taxonomy terms checklist arguments.
[92] Fix | Delete
*
[93] Fix | Delete
* @since 3.4.0
[94] Fix | Delete
*
[95] Fix | Delete
* @see wp_terms_checklist()
[96] Fix | Delete
*
[97] Fix | Delete
* @param array $args An array of arguments.
[98] Fix | Delete
* @param int $post_id The post ID.
[99] Fix | Delete
*/
[100] Fix | Delete
$params = apply_filters( 'wp_terms_checklist_args', $args, $post_id );
[101] Fix | Delete
[102] Fix | Delete
$parsed_args = wp_parse_args( $params, $defaults );
[103] Fix | Delete
[104] Fix | Delete
if ( empty( $parsed_args['walker'] ) || ! ( $parsed_args['walker'] instanceof Walker ) ) {
[105] Fix | Delete
$walker = new Walker_Category_Checklist;
[106] Fix | Delete
} else {
[107] Fix | Delete
$walker = $parsed_args['walker'];
[108] Fix | Delete
}
[109] Fix | Delete
[110] Fix | Delete
$taxonomy = $parsed_args['taxonomy'];
[111] Fix | Delete
$descendants_and_self = (int) $parsed_args['descendants_and_self'];
[112] Fix | Delete
[113] Fix | Delete
$args = array( 'taxonomy' => $taxonomy );
[114] Fix | Delete
[115] Fix | Delete
$tax = get_taxonomy( $taxonomy );
[116] Fix | Delete
$args['disabled'] = ! current_user_can( $tax->cap->assign_terms );
[117] Fix | Delete
[118] Fix | Delete
$args['list_only'] = ! empty( $parsed_args['list_only'] );
[119] Fix | Delete
[120] Fix | Delete
if ( is_array( $parsed_args['selected_cats'] ) ) {
[121] Fix | Delete
$args['selected_cats'] = array_map( 'intval', $parsed_args['selected_cats'] );
[122] Fix | Delete
} elseif ( $post_id ) {
[123] Fix | Delete
$args['selected_cats'] = wp_get_object_terms( $post_id, $taxonomy, array_merge( $args, array( 'fields' => 'ids' ) ) );
[124] Fix | Delete
} else {
[125] Fix | Delete
$args['selected_cats'] = array();
[126] Fix | Delete
}
[127] Fix | Delete
[128] Fix | Delete
if ( is_array( $parsed_args['popular_cats'] ) ) {
[129] Fix | Delete
$args['popular_cats'] = array_map( 'intval', $parsed_args['popular_cats'] );
[130] Fix | Delete
} else {
[131] Fix | Delete
$args['popular_cats'] = get_terms(
[132] Fix | Delete
array(
[133] Fix | Delete
'taxonomy' => $taxonomy,
[134] Fix | Delete
'fields' => 'ids',
[135] Fix | Delete
'orderby' => 'count',
[136] Fix | Delete
'order' => 'DESC',
[137] Fix | Delete
'number' => 10,
[138] Fix | Delete
'hierarchical' => false,
[139] Fix | Delete
)
[140] Fix | Delete
);
[141] Fix | Delete
}
[142] Fix | Delete
[143] Fix | Delete
if ( $descendants_and_self ) {
[144] Fix | Delete
$categories = (array) get_terms(
[145] Fix | Delete
array(
[146] Fix | Delete
'taxonomy' => $taxonomy,
[147] Fix | Delete
'child_of' => $descendants_and_self,
[148] Fix | Delete
'hierarchical' => 0,
[149] Fix | Delete
'hide_empty' => 0,
[150] Fix | Delete
)
[151] Fix | Delete
);
[152] Fix | Delete
$self = get_term( $descendants_and_self, $taxonomy );
[153] Fix | Delete
array_unshift( $categories, $self );
[154] Fix | Delete
} else {
[155] Fix | Delete
$categories = (array) get_terms(
[156] Fix | Delete
array(
[157] Fix | Delete
'taxonomy' => $taxonomy,
[158] Fix | Delete
'get' => 'all',
[159] Fix | Delete
)
[160] Fix | Delete
);
[161] Fix | Delete
}
[162] Fix | Delete
[163] Fix | Delete
$output = '';
[164] Fix | Delete
[165] Fix | Delete
if ( $parsed_args['checked_ontop'] ) {
[166] Fix | Delete
// Post-process $categories rather than adding an exclude to the get_terms() query
[167] Fix | Delete
// to keep the query the same across all posts (for any query cache).
[168] Fix | Delete
$checked_categories = array();
[169] Fix | Delete
$keys = array_keys( $categories );
[170] Fix | Delete
[171] Fix | Delete
foreach ( $keys as $k ) {
[172] Fix | Delete
if ( in_array( $categories[ $k ]->term_id, $args['selected_cats'], true ) ) {
[173] Fix | Delete
$checked_categories[] = $categories[ $k ];
[174] Fix | Delete
unset( $categories[ $k ] );
[175] Fix | Delete
}
[176] Fix | Delete
}
[177] Fix | Delete
[178] Fix | Delete
// Put checked categories on top.
[179] Fix | Delete
$output .= $walker->walk( $checked_categories, 0, $args );
[180] Fix | Delete
}
[181] Fix | Delete
// Then the rest of them.
[182] Fix | Delete
$output .= $walker->walk( $categories, 0, $args );
[183] Fix | Delete
[184] Fix | Delete
if ( $parsed_args['echo'] ) {
[185] Fix | Delete
echo $output;
[186] Fix | Delete
}
[187] Fix | Delete
[188] Fix | Delete
return $output;
[189] Fix | Delete
}
[190] Fix | Delete
[191] Fix | Delete
/**
[192] Fix | Delete
* Retrieve a list of the most popular terms from the specified taxonomy.
[193] Fix | Delete
*
[194] Fix | Delete
* If the $echo argument is true then the elements for a list of checkbox
[195] Fix | Delete
* `<input>` elements labelled with the names of the selected terms is output.
[196] Fix | Delete
* If the $post_ID global isn't empty then the terms associated with that
[197] Fix | Delete
* post will be marked as checked.
[198] Fix | Delete
*
[199] Fix | Delete
* @since 2.5.0
[200] Fix | Delete
*
[201] Fix | Delete
* @param string $taxonomy Taxonomy to retrieve terms from.
[202] Fix | Delete
* @param int $default Not used.
[203] Fix | Delete
* @param int $number Number of terms to retrieve. Defaults to 10.
[204] Fix | Delete
* @param bool $echo Optionally output the list as well. Defaults to true.
[205] Fix | Delete
* @return int[] Array of popular term IDs.
[206] Fix | Delete
*/
[207] Fix | Delete
function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
[208] Fix | Delete
$post = get_post();
[209] Fix | Delete
[210] Fix | Delete
if ( $post && $post->ID ) {
[211] Fix | Delete
$checked_terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
[212] Fix | Delete
} else {
[213] Fix | Delete
$checked_terms = array();
[214] Fix | Delete
}
[215] Fix | Delete
[216] Fix | Delete
$terms = get_terms(
[217] Fix | Delete
array(
[218] Fix | Delete
'taxonomy' => $taxonomy,
[219] Fix | Delete
'orderby' => 'count',
[220] Fix | Delete
'order' => 'DESC',
[221] Fix | Delete
'number' => $number,
[222] Fix | Delete
'hierarchical' => false,
[223] Fix | Delete
)
[224] Fix | Delete
);
[225] Fix | Delete
[226] Fix | Delete
$tax = get_taxonomy( $taxonomy );
[227] Fix | Delete
[228] Fix | Delete
$popular_ids = array();
[229] Fix | Delete
[230] Fix | Delete
foreach ( (array) $terms as $term ) {
[231] Fix | Delete
$popular_ids[] = $term->term_id;
[232] Fix | Delete
if ( ! $echo ) { // Hack for Ajax use.
[233] Fix | Delete
continue;
[234] Fix | Delete
}
[235] Fix | Delete
$id = "popular-$taxonomy-$term->term_id";
[236] Fix | Delete
$checked = in_array( $term->term_id, $checked_terms, true ) ? 'checked="checked"' : '';
[237] Fix | Delete
?>
[238] Fix | Delete
[239] Fix | Delete
<li id="<?php echo $id; ?>" class="popular-category">
[240] Fix | Delete
<label class="selectit">
[241] Fix | Delete
<input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> />
[242] Fix | Delete
<?php
[243] Fix | Delete
/** This filter is documented in wp-includes/category-template.php */
[244] Fix | Delete
echo esc_html( apply_filters( 'the_category', $term->name, '', '' ) );
[245] Fix | Delete
?>
[246] Fix | Delete
</label>
[247] Fix | Delete
</li>
[248] Fix | Delete
[249] Fix | Delete
<?php
[250] Fix | Delete
}
[251] Fix | Delete
return $popular_ids;
[252] Fix | Delete
}
[253] Fix | Delete
[254] Fix | Delete
/**
[255] Fix | Delete
* Outputs a link category checklist element.
[256] Fix | Delete
*
[257] Fix | Delete
* @since 2.5.1
[258] Fix | Delete
*
[259] Fix | Delete
* @param int $link_id
[260] Fix | Delete
*/
[261] Fix | Delete
function wp_link_category_checklist( $link_id = 0 ) {
[262] Fix | Delete
$default = 1;
[263] Fix | Delete
[264] Fix | Delete
$checked_categories = array();
[265] Fix | Delete
[266] Fix | Delete
if ( $link_id ) {
[267] Fix | Delete
$checked_categories = wp_get_link_cats( $link_id );
[268] Fix | Delete
// No selected categories, strange.
[269] Fix | Delete
if ( ! count( $checked_categories ) ) {
[270] Fix | Delete
$checked_categories[] = $default;
[271] Fix | Delete
}
[272] Fix | Delete
} else {
[273] Fix | Delete
$checked_categories[] = $default;
[274] Fix | Delete
}
[275] Fix | Delete
[276] Fix | Delete
$categories = get_terms(
[277] Fix | Delete
array(
[278] Fix | Delete
'taxonomy' => 'link_category',
[279] Fix | Delete
'orderby' => 'name',
[280] Fix | Delete
'hide_empty' => 0,
[281] Fix | Delete
)
[282] Fix | Delete
);
[283] Fix | Delete
[284] Fix | Delete
if ( empty( $categories ) ) {
[285] Fix | Delete
return;
[286] Fix | Delete
}
[287] Fix | Delete
[288] Fix | Delete
foreach ( $categories as $category ) {
[289] Fix | Delete
$cat_id = $category->term_id;
[290] Fix | Delete
[291] Fix | Delete
/** This filter is documented in wp-includes/category-template.php */
[292] Fix | Delete
$name = esc_html( apply_filters( 'the_category', $category->name, '', '' ) );
[293] Fix | Delete
$checked = in_array( $cat_id, $checked_categories, true ) ? ' checked="checked"' : '';
[294] Fix | Delete
echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, '</label></li>';
[295] Fix | Delete
}
[296] Fix | Delete
}
[297] Fix | Delete
[298] Fix | Delete
/**
[299] Fix | Delete
* Adds hidden fields with the data for use in the inline editor for posts and pages.
[300] Fix | Delete
*
[301] Fix | Delete
* @since 2.7.0
[302] Fix | Delete
*
[303] Fix | Delete
* @param WP_Post $post Post object.
[304] Fix | Delete
*/
[305] Fix | Delete
function get_inline_data( $post ) {
[306] Fix | Delete
$post_type_object = get_post_type_object( $post->post_type );
[307] Fix | Delete
if ( ! current_user_can( 'edit_post', $post->ID ) ) {
[308] Fix | Delete
return;
[309] Fix | Delete
}
[310] Fix | Delete
[311] Fix | Delete
$title = esc_textarea( trim( $post->post_title ) );
[312] Fix | Delete
[313] Fix | Delete
echo '
[314] Fix | Delete
<div class="hidden" id="inline_' . $post->ID . '">
[315] Fix | Delete
<div class="post_title">' . $title . '</div>' .
[316] Fix | Delete
/** This filter is documented in wp-admin/edit-tag-form.php */
[317] Fix | Delete
'<div class="post_name">' . apply_filters( 'editable_slug', $post->post_name, $post ) . '</div>
[318] Fix | Delete
<div class="post_author">' . $post->post_author . '</div>
[319] Fix | Delete
<div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
[320] Fix | Delete
<div class="ping_status">' . esc_html( $post->ping_status ) . '</div>
[321] Fix | Delete
<div class="_status">' . esc_html( $post->post_status ) . '</div>
[322] Fix | Delete
<div class="jj">' . mysql2date( 'd', $post->post_date, false ) . '</div>
[323] Fix | Delete
<div class="mm">' . mysql2date( 'm', $post->post_date, false ) . '</div>
[324] Fix | Delete
<div class="aa">' . mysql2date( 'Y', $post->post_date, false ) . '</div>
[325] Fix | Delete
<div class="hh">' . mysql2date( 'H', $post->post_date, false ) . '</div>
[326] Fix | Delete
<div class="mn">' . mysql2date( 'i', $post->post_date, false ) . '</div>
[327] Fix | Delete
<div class="ss">' . mysql2date( 's', $post->post_date, false ) . '</div>
[328] Fix | Delete
<div class="post_password">' . esc_html( $post->post_password ) . '</div>';
[329] Fix | Delete
[330] Fix | Delete
if ( $post_type_object->hierarchical ) {
[331] Fix | Delete
echo '<div class="post_parent">' . $post->post_parent . '</div>';
[332] Fix | Delete
}
[333] Fix | Delete
[334] Fix | Delete
echo '<div class="page_template">' . ( $post->page_template ? esc_html( $post->page_template ) : 'default' ) . '</div>';
[335] Fix | Delete
[336] Fix | Delete
if ( post_type_supports( $post->post_type, 'page-attributes' ) ) {
[337] Fix | Delete
echo '<div class="menu_order">' . $post->menu_order . '</div>';
[338] Fix | Delete
}
[339] Fix | Delete
[340] Fix | Delete
$taxonomy_names = get_object_taxonomies( $post->post_type );
[341] Fix | Delete
[342] Fix | Delete
foreach ( $taxonomy_names as $taxonomy_name ) {
[343] Fix | Delete
$taxonomy = get_taxonomy( $taxonomy_name );
[344] Fix | Delete
[345] Fix | Delete
if ( $taxonomy->hierarchical && $taxonomy->show_ui ) {
[346] Fix | Delete
[347] Fix | Delete
$terms = get_object_term_cache( $post->ID, $taxonomy_name );
[348] Fix | Delete
if ( false === $terms ) {
[349] Fix | Delete
$terms = wp_get_object_terms( $post->ID, $taxonomy_name );
[350] Fix | Delete
wp_cache_add( $post->ID, wp_list_pluck( $terms, 'term_id' ), $taxonomy_name . '_relationships' );
[351] Fix | Delete
}
[352] Fix | Delete
$term_ids = empty( $terms ) ? array() : wp_list_pluck( $terms, 'term_id' );
[353] Fix | Delete
[354] Fix | Delete
echo '<div class="post_category" id="' . $taxonomy_name . '_' . $post->ID . '">' . implode( ',', $term_ids ) . '</div>';
[355] Fix | Delete
[356] Fix | Delete
} elseif ( $taxonomy->show_ui ) {
[357] Fix | Delete
[358] Fix | Delete
$terms_to_edit = get_terms_to_edit( $post->ID, $taxonomy_name );
[359] Fix | Delete
if ( ! is_string( $terms_to_edit ) ) {
[360] Fix | Delete
$terms_to_edit = '';
[361] Fix | Delete
}
[362] Fix | Delete
[363] Fix | Delete
echo '<div class="tags_input" id="' . $taxonomy_name . '_' . $post->ID . '">'
[364] Fix | Delete
. esc_html( str_replace( ',', ', ', $terms_to_edit ) ) . '</div>';
[365] Fix | Delete
[366] Fix | Delete
}
[367] Fix | Delete
}
[368] Fix | Delete
[369] Fix | Delete
if ( ! $post_type_object->hierarchical ) {
[370] Fix | Delete
echo '<div class="sticky">' . ( is_sticky( $post->ID ) ? 'sticky' : '' ) . '</div>';
[371] Fix | Delete
}
[372] Fix | Delete
[373] Fix | Delete
if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
[374] Fix | Delete
echo '<div class="post_format">' . esc_html( get_post_format( $post->ID ) ) . '</div>';
[375] Fix | Delete
}
[376] Fix | Delete
[377] Fix | Delete
/**
[378] Fix | Delete
* Fires after outputting the fields for the inline editor for posts and pages.
[379] Fix | Delete
*
[380] Fix | Delete
* @since 4.9.8
[381] Fix | Delete
*
[382] Fix | Delete
* @param WP_Post $post The current post object.
[383] Fix | Delete
* @param WP_Post_Type $post_type_object The current post's post type object.
[384] Fix | Delete
*/
[385] Fix | Delete
do_action( 'add_inline_data', $post, $post_type_object );
[386] Fix | Delete
[387] Fix | Delete
echo '</div>';
[388] Fix | Delete
}
[389] Fix | Delete
[390] Fix | Delete
/**
[391] Fix | Delete
* Outputs the in-line comment reply-to form in the Comments list table.
[392] Fix | Delete
*
[393] Fix | Delete
* @since 2.7.0
[394] Fix | Delete
*
[395] Fix | Delete
* @global WP_List_Table $wp_list_table
[396] Fix | Delete
*
[397] Fix | Delete
* @param int $position
[398] Fix | Delete
* @param bool $checkbox
[399] Fix | Delete
* @param string $mode
[400] Fix | Delete
* @param bool $table_row
[401] Fix | Delete
*/
[402] Fix | Delete
function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $table_row = true ) {
[403] Fix | Delete
global $wp_list_table;
[404] Fix | Delete
/**
[405] Fix | Delete
* Filters the in-line comment reply-to form output in the Comments
[406] Fix | Delete
* list table.
[407] Fix | Delete
*
[408] Fix | Delete
* Returning a non-empty value here will short-circuit display
[409] Fix | Delete
* of the in-line comment-reply form in the Comments list table,
[410] Fix | Delete
* echoing the returned value instead.
[411] Fix | Delete
*
[412] Fix | Delete
* @since 2.7.0
[413] Fix | Delete
*
[414] Fix | Delete
* @see wp_comment_reply()
[415] Fix | Delete
*
[416] Fix | Delete
* @param string $content The reply-to form content.
[417] Fix | Delete
* @param array $args An array of default args.
[418] Fix | Delete
*/
[419] Fix | Delete
$content = apply_filters(
[420] Fix | Delete
'wp_comment_reply',
[421] Fix | Delete
'',
[422] Fix | Delete
array(
[423] Fix | Delete
'position' => $position,
[424] Fix | Delete
'checkbox' => $checkbox,
[425] Fix | Delete
'mode' => $mode,
[426] Fix | Delete
)
[427] Fix | Delete
);
[428] Fix | Delete
[429] Fix | Delete
if ( ! empty( $content ) ) {
[430] Fix | Delete
echo $content;
[431] Fix | Delete
return;
[432] Fix | Delete
}
[433] Fix | Delete
[434] Fix | Delete
if ( ! $wp_list_table ) {
[435] Fix | Delete
if ( 'single' === $mode ) {
[436] Fix | Delete
$wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table' );
[437] Fix | Delete
} else {
[438] Fix | Delete
$wp_list_table = _get_list_table( 'WP_Comments_List_Table' );
[439] Fix | Delete
}
[440] Fix | Delete
}
[441] Fix | Delete
[442] Fix | Delete
?>
[443] Fix | Delete
<form method="get">
[444] Fix | Delete
<?php if ( $table_row ) : ?>
[445] Fix | Delete
<table style="display:none;"><tbody id="com-reply"><tr id="replyrow" class="inline-edit-row" style="display:none;"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="colspanchange">
[446] Fix | Delete
<?php else : ?>
[447] Fix | Delete
<div id="com-reply" style="display:none;"><div id="replyrow" style="display:none;">
[448] Fix | Delete
<?php endif; ?>
[449] Fix | Delete
<fieldset class="comment-reply">
[450] Fix | Delete
<legend>
[451] Fix | Delete
<span class="hidden" id="editlegend"><?php _e( 'Edit Comment' ); ?></span>
[452] Fix | Delete
<span class="hidden" id="replyhead"><?php _e( 'Reply to Comment' ); ?></span>
[453] Fix | Delete
<span class="hidden" id="addhead"><?php _e( 'Add new Comment' ); ?></span>
[454] Fix | Delete
</legend>
[455] Fix | Delete
[456] Fix | Delete
<div id="replycontainer">
[457] Fix | Delete
<label for="replycontent" class="screen-reader-text"><?php _e( 'Comment' ); ?></label>
[458] Fix | Delete
<?php
[459] Fix | Delete
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
[460] Fix | Delete
wp_editor(
[461] Fix | Delete
'',
[462] Fix | Delete
'replycontent',
[463] Fix | Delete
array(
[464] Fix | Delete
'media_buttons' => false,
[465] Fix | Delete
'tinymce' => false,
[466] Fix | Delete
'quicktags' => $quicktags_settings,
[467] Fix | Delete
)
[468] Fix | Delete
);
[469] Fix | Delete
?>
[470] Fix | Delete
</div>
[471] Fix | Delete
[472] Fix | Delete
<div id="edithead" style="display:none;">
[473] Fix | Delete
<div class="inside">
[474] Fix | Delete
<label for="author-name"><?php _e( 'Name' ); ?></label>
[475] Fix | Delete
<input type="text" name="newcomment_author" size="50" value="" id="author-name" />
[476] Fix | Delete
</div>
[477] Fix | Delete
[478] Fix | Delete
<div class="inside">
[479] Fix | Delete
<label for="author-email"><?php _e( 'Email' ); ?></label>
[480] Fix | Delete
<input type="text" name="newcomment_author_email" size="50" value="" id="author-email" />
[481] Fix | Delete
</div>
[482] Fix | Delete
[483] Fix | Delete
<div class="inside">
[484] Fix | Delete
<label for="author-url"><?php _e( 'URL' ); ?></label>
[485] Fix | Delete
<input type="text" id="author-url" name="newcomment_author_url" class="code" size="103" value="" />
[486] Fix | Delete
</div>
[487] Fix | Delete
</div>
[488] Fix | Delete
[489] Fix | Delete
<div id="replysubmit" class="submit">
[490] Fix | Delete
<p class="reply-submit-buttons">
[491] Fix | Delete
<button type="button" class="save button button-primary">
[492] Fix | Delete
<span id="addbtn" style="display: none;"><?php _e( 'Add Comment' ); ?></span>
[493] Fix | Delete
<span id="savebtn" style="display: none;"><?php _e( 'Update Comment' ); ?></span>
[494] Fix | Delete
<span id="replybtn" style="display: none;"><?php _e( 'Submit Reply' ); ?></span>
[495] Fix | Delete
</button>
[496] Fix | Delete
<button type="button" class="cancel button"><?php _e( 'Cancel' ); ?></button>
[497] Fix | Delete
<span class="waiting spinner"></span>
[498] Fix | Delete
</p>
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function