Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu...
File: comment-template.php
[2500] Fix | Delete
$req = get_option( 'require_name_email' );
[2501] Fix | Delete
$html5 = 'html5' === $args['format'];
[2502] Fix | Delete
[2503] Fix | Delete
// Define attributes in HTML5 or XHTML syntax.
[2504] Fix | Delete
$required_attribute = ( $html5 ? ' required' : ' required="required"' );
[2505] Fix | Delete
$checked_attribute = ( $html5 ? ' checked' : ' checked="checked"' );
[2506] Fix | Delete
[2507] Fix | Delete
// Identify required fields visually and create a message about the indicator.
[2508] Fix | Delete
$required_indicator = ' ' . wp_required_field_indicator();
[2509] Fix | Delete
$required_text = ' ' . wp_required_field_message();
[2510] Fix | Delete
[2511] Fix | Delete
$fields = array(
[2512] Fix | Delete
'author' => sprintf(
[2513] Fix | Delete
'<p class="comment-form-author">%s %s</p>',
[2514] Fix | Delete
sprintf(
[2515] Fix | Delete
'<label for="author">%s%s</label>',
[2516] Fix | Delete
__( 'Name' ),
[2517] Fix | Delete
( $req ? $required_indicator : '' )
[2518] Fix | Delete
),
[2519] Fix | Delete
sprintf(
[2520] Fix | Delete
'<input id="author" name="author" type="text" value="%s" size="30" maxlength="245" autocomplete="name"%s />',
[2521] Fix | Delete
esc_attr( $commenter['comment_author'] ),
[2522] Fix | Delete
( $req ? $required_attribute : '' )
[2523] Fix | Delete
)
[2524] Fix | Delete
),
[2525] Fix | Delete
'email' => sprintf(
[2526] Fix | Delete
'<p class="comment-form-email">%s %s</p>',
[2527] Fix | Delete
sprintf(
[2528] Fix | Delete
'<label for="email">%s%s</label>',
[2529] Fix | Delete
__( 'Email' ),
[2530] Fix | Delete
( $req ? $required_indicator : '' )
[2531] Fix | Delete
),
[2532] Fix | Delete
sprintf(
[2533] Fix | Delete
'<input id="email" name="email" %s value="%s" size="30" maxlength="100" aria-describedby="email-notes" autocomplete="email"%s />',
[2534] Fix | Delete
( $html5 ? 'type="email"' : 'type="text"' ),
[2535] Fix | Delete
esc_attr( $commenter['comment_author_email'] ),
[2536] Fix | Delete
( $req ? $required_attribute : '' )
[2537] Fix | Delete
)
[2538] Fix | Delete
),
[2539] Fix | Delete
'url' => sprintf(
[2540] Fix | Delete
'<p class="comment-form-url">%s %s</p>',
[2541] Fix | Delete
sprintf(
[2542] Fix | Delete
'<label for="url">%s</label>',
[2543] Fix | Delete
__( 'Website' )
[2544] Fix | Delete
),
[2545] Fix | Delete
sprintf(
[2546] Fix | Delete
'<input id="url" name="url" %s value="%s" size="30" maxlength="200" autocomplete="url" />',
[2547] Fix | Delete
( $html5 ? 'type="url"' : 'type="text"' ),
[2548] Fix | Delete
esc_attr( $commenter['comment_author_url'] )
[2549] Fix | Delete
)
[2550] Fix | Delete
),
[2551] Fix | Delete
);
[2552] Fix | Delete
[2553] Fix | Delete
if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) && get_option( 'show_comments_cookies_opt_in' ) ) {
[2554] Fix | Delete
$consent = empty( $commenter['comment_author_email'] ) ? '' : $checked_attribute;
[2555] Fix | Delete
[2556] Fix | Delete
$fields['cookies'] = sprintf(
[2557] Fix | Delete
'<p class="comment-form-cookies-consent">%s %s</p>',
[2558] Fix | Delete
sprintf(
[2559] Fix | Delete
'<input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"%s />',
[2560] Fix | Delete
$consent
[2561] Fix | Delete
),
[2562] Fix | Delete
sprintf(
[2563] Fix | Delete
'<label for="wp-comment-cookies-consent">%s</label>',
[2564] Fix | Delete
__( 'Save my name, email, and website in this browser for the next time I comment.' )
[2565] Fix | Delete
)
[2566] Fix | Delete
);
[2567] Fix | Delete
[2568] Fix | Delete
// Ensure that the passed fields include cookies consent.
[2569] Fix | Delete
if ( isset( $args['fields'] ) && ! isset( $args['fields']['cookies'] ) ) {
[2570] Fix | Delete
$args['fields']['cookies'] = $fields['cookies'];
[2571] Fix | Delete
}
[2572] Fix | Delete
}
[2573] Fix | Delete
[2574] Fix | Delete
/**
[2575] Fix | Delete
* Filters the default comment form fields.
[2576] Fix | Delete
*
[2577] Fix | Delete
* @since 3.0.0
[2578] Fix | Delete
*
[2579] Fix | Delete
* @param string[] $fields Array of the default comment fields.
[2580] Fix | Delete
*/
[2581] Fix | Delete
$fields = apply_filters( 'comment_form_default_fields', $fields );
[2582] Fix | Delete
[2583] Fix | Delete
$defaults = array(
[2584] Fix | Delete
'fields' => $fields,
[2585] Fix | Delete
'comment_field' => sprintf(
[2586] Fix | Delete
'<p class="comment-form-comment">%s %s</p>',
[2587] Fix | Delete
sprintf(
[2588] Fix | Delete
'<label for="comment">%s%s</label>',
[2589] Fix | Delete
_x( 'Comment', 'noun' ),
[2590] Fix | Delete
$required_indicator
[2591] Fix | Delete
),
[2592] Fix | Delete
'<textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525"' . $required_attribute . '></textarea>'
[2593] Fix | Delete
),
[2594] Fix | Delete
'must_log_in' => sprintf(
[2595] Fix | Delete
'<p class="must-log-in">%s</p>',
[2596] Fix | Delete
sprintf(
[2597] Fix | Delete
/* translators: %s: Login URL. */
[2598] Fix | Delete
__( 'You must be <a href="%s">logged in</a> to post a comment.' ),
[2599] Fix | Delete
/** This filter is documented in wp-includes/link-template.php */
[2600] Fix | Delete
wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) )
[2601] Fix | Delete
)
[2602] Fix | Delete
),
[2603] Fix | Delete
'logged_in_as' => sprintf(
[2604] Fix | Delete
'<p class="logged-in-as">%s%s</p>',
[2605] Fix | Delete
sprintf(
[2606] Fix | Delete
/* translators: 1: User name, 2: Edit user link, 3: Logout URL. */
[2607] Fix | Delete
__( 'Logged in as %1$s. <a href="%2$s">Edit your profile</a>. <a href="%3$s">Log out?</a>' ),
[2608] Fix | Delete
$user_identity,
[2609] Fix | Delete
get_edit_user_link(),
[2610] Fix | Delete
/** This filter is documented in wp-includes/link-template.php */
[2611] Fix | Delete
wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) )
[2612] Fix | Delete
),
[2613] Fix | Delete
$required_text
[2614] Fix | Delete
),
[2615] Fix | Delete
'comment_notes_before' => sprintf(
[2616] Fix | Delete
'<p class="comment-notes">%s%s</p>',
[2617] Fix | Delete
sprintf(
[2618] Fix | Delete
'<span id="email-notes">%s</span>',
[2619] Fix | Delete
__( 'Your email address will not be published.' )
[2620] Fix | Delete
),
[2621] Fix | Delete
$required_text
[2622] Fix | Delete
),
[2623] Fix | Delete
'comment_notes_after' => '',
[2624] Fix | Delete
'action' => site_url( '/wp-comments-post.php' ),
[2625] Fix | Delete
'id_form' => 'commentform',
[2626] Fix | Delete
'id_submit' => 'submit',
[2627] Fix | Delete
'class_container' => 'comment-respond',
[2628] Fix | Delete
'class_form' => 'comment-form',
[2629] Fix | Delete
'class_submit' => 'submit',
[2630] Fix | Delete
'name_submit' => 'submit',
[2631] Fix | Delete
'title_reply' => __( 'Leave a Reply' ),
[2632] Fix | Delete
/* translators: %s: Author of the comment being replied to. */
[2633] Fix | Delete
'title_reply_to' => __( 'Leave a Reply to %s' ),
[2634] Fix | Delete
'title_reply_before' => '<h3 id="reply-title" class="comment-reply-title">',
[2635] Fix | Delete
'title_reply_after' => '</h3>',
[2636] Fix | Delete
'cancel_reply_before' => ' <small>',
[2637] Fix | Delete
'cancel_reply_after' => '</small>',
[2638] Fix | Delete
'cancel_reply_link' => __( 'Cancel reply' ),
[2639] Fix | Delete
'label_submit' => __( 'Post Comment' ),
[2640] Fix | Delete
'submit_button' => '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />',
[2641] Fix | Delete
'submit_field' => '<p class="form-submit">%1$s %2$s</p>',
[2642] Fix | Delete
'format' => 'xhtml',
[2643] Fix | Delete
);
[2644] Fix | Delete
[2645] Fix | Delete
/**
[2646] Fix | Delete
* Filters the comment form default arguments.
[2647] Fix | Delete
*
[2648] Fix | Delete
* Use {@see 'comment_form_default_fields'} to filter the comment fields.
[2649] Fix | Delete
*
[2650] Fix | Delete
* @since 3.0.0
[2651] Fix | Delete
*
[2652] Fix | Delete
* @param array $defaults The default comment form arguments.
[2653] Fix | Delete
*/
[2654] Fix | Delete
$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
[2655] Fix | Delete
[2656] Fix | Delete
// Ensure that the filtered arguments contain all required default values.
[2657] Fix | Delete
$args = array_merge( $defaults, $args );
[2658] Fix | Delete
[2659] Fix | Delete
// Remove `aria-describedby` from the email field if there's no associated description.
[2660] Fix | Delete
if ( isset( $args['fields']['email'] ) && ! str_contains( $args['comment_notes_before'], 'id="email-notes"' ) ) {
[2661] Fix | Delete
$args['fields']['email'] = str_replace(
[2662] Fix | Delete
' aria-describedby="email-notes"',
[2663] Fix | Delete
'',
[2664] Fix | Delete
$args['fields']['email']
[2665] Fix | Delete
);
[2666] Fix | Delete
}
[2667] Fix | Delete
[2668] Fix | Delete
/**
[2669] Fix | Delete
* Fires before the comment form.
[2670] Fix | Delete
*
[2671] Fix | Delete
* @since 3.0.0
[2672] Fix | Delete
*/
[2673] Fix | Delete
do_action( 'comment_form_before' );
[2674] Fix | Delete
?>
[2675] Fix | Delete
<div id="respond" class="<?php echo esc_attr( $args['class_container'] ); ?>">
[2676] Fix | Delete
<?php
[2677] Fix | Delete
echo $args['title_reply_before'];
[2678] Fix | Delete
[2679] Fix | Delete
comment_form_title( $args['title_reply'], $args['title_reply_to'], true, $post_id );
[2680] Fix | Delete
[2681] Fix | Delete
if ( get_option( 'thread_comments' ) ) {
[2682] Fix | Delete
echo $args['cancel_reply_before'];
[2683] Fix | Delete
[2684] Fix | Delete
cancel_comment_reply_link( $args['cancel_reply_link'] );
[2685] Fix | Delete
[2686] Fix | Delete
echo $args['cancel_reply_after'];
[2687] Fix | Delete
}
[2688] Fix | Delete
[2689] Fix | Delete
echo $args['title_reply_after'];
[2690] Fix | Delete
[2691] Fix | Delete
if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) :
[2692] Fix | Delete
[2693] Fix | Delete
echo $args['must_log_in'];
[2694] Fix | Delete
/**
[2695] Fix | Delete
* Fires after the HTML-formatted 'must log in after' message in the comment form.
[2696] Fix | Delete
*
[2697] Fix | Delete
* @since 3.0.0
[2698] Fix | Delete
*/
[2699] Fix | Delete
do_action( 'comment_form_must_log_in_after' );
[2700] Fix | Delete
[2701] Fix | Delete
else :
[2702] Fix | Delete
[2703] Fix | Delete
printf(
[2704] Fix | Delete
'<form action="%s" method="post" id="%s" class="%s"%s>',
[2705] Fix | Delete
esc_url( $args['action'] ),
[2706] Fix | Delete
esc_attr( $args['id_form'] ),
[2707] Fix | Delete
esc_attr( $args['class_form'] ),
[2708] Fix | Delete
( $html5 ? ' novalidate' : '' )
[2709] Fix | Delete
);
[2710] Fix | Delete
[2711] Fix | Delete
/**
[2712] Fix | Delete
* Fires at the top of the comment form, inside the form tag.
[2713] Fix | Delete
*
[2714] Fix | Delete
* @since 3.0.0
[2715] Fix | Delete
*/
[2716] Fix | Delete
do_action( 'comment_form_top' );
[2717] Fix | Delete
[2718] Fix | Delete
if ( is_user_logged_in() ) :
[2719] Fix | Delete
[2720] Fix | Delete
/**
[2721] Fix | Delete
* Filters the 'logged in' message for the comment form for display.
[2722] Fix | Delete
*
[2723] Fix | Delete
* @since 3.0.0
[2724] Fix | Delete
*
[2725] Fix | Delete
* @param string $args_logged_in The HTML for the 'logged in as [user]' message,
[2726] Fix | Delete
* the Edit profile link, and the Log out link.
[2727] Fix | Delete
* @param array $commenter An array containing the comment author's
[2728] Fix | Delete
* username, email, and URL.
[2729] Fix | Delete
* @param string $user_identity If the commenter is a registered user,
[2730] Fix | Delete
* the display name, blank otherwise.
[2731] Fix | Delete
*/
[2732] Fix | Delete
echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );
[2733] Fix | Delete
[2734] Fix | Delete
/**
[2735] Fix | Delete
* Fires after the is_user_logged_in() check in the comment form.
[2736] Fix | Delete
*
[2737] Fix | Delete
* @since 3.0.0
[2738] Fix | Delete
*
[2739] Fix | Delete
* @param array $commenter An array containing the comment author's
[2740] Fix | Delete
* username, email, and URL.
[2741] Fix | Delete
* @param string $user_identity If the commenter is a registered user,
[2742] Fix | Delete
* the display name, blank otherwise.
[2743] Fix | Delete
*/
[2744] Fix | Delete
do_action( 'comment_form_logged_in_after', $commenter, $user_identity );
[2745] Fix | Delete
[2746] Fix | Delete
else :
[2747] Fix | Delete
[2748] Fix | Delete
echo $args['comment_notes_before'];
[2749] Fix | Delete
[2750] Fix | Delete
endif;
[2751] Fix | Delete
[2752] Fix | Delete
// Prepare an array of all fields, including the textarea.
[2753] Fix | Delete
$comment_fields = array( 'comment' => $args['comment_field'] ) + (array) $args['fields'];
[2754] Fix | Delete
[2755] Fix | Delete
/**
[2756] Fix | Delete
* Filters the comment form fields, including the textarea.
[2757] Fix | Delete
*
[2758] Fix | Delete
* @since 4.4.0
[2759] Fix | Delete
*
[2760] Fix | Delete
* @param array $comment_fields The comment fields.
[2761] Fix | Delete
*/
[2762] Fix | Delete
$comment_fields = apply_filters( 'comment_form_fields', $comment_fields );
[2763] Fix | Delete
[2764] Fix | Delete
// Get an array of field names, excluding the textarea.
[2765] Fix | Delete
$comment_field_keys = array_diff( array_keys( $comment_fields ), array( 'comment' ) );
[2766] Fix | Delete
[2767] Fix | Delete
// Get the first and the last field name, excluding the textarea.
[2768] Fix | Delete
$first_field = reset( $comment_field_keys );
[2769] Fix | Delete
$last_field = end( $comment_field_keys );
[2770] Fix | Delete
[2771] Fix | Delete
foreach ( $comment_fields as $name => $field ) {
[2772] Fix | Delete
[2773] Fix | Delete
if ( 'comment' === $name ) {
[2774] Fix | Delete
[2775] Fix | Delete
/**
[2776] Fix | Delete
* Filters the content of the comment textarea field for display.
[2777] Fix | Delete
*
[2778] Fix | Delete
* @since 3.0.0
[2779] Fix | Delete
*
[2780] Fix | Delete
* @param string $args_comment_field The content of the comment textarea field.
[2781] Fix | Delete
*/
[2782] Fix | Delete
echo apply_filters( 'comment_form_field_comment', $field );
[2783] Fix | Delete
[2784] Fix | Delete
echo $args['comment_notes_after'];
[2785] Fix | Delete
[2786] Fix | Delete
} elseif ( ! is_user_logged_in() ) {
[2787] Fix | Delete
[2788] Fix | Delete
if ( $first_field === $name ) {
[2789] Fix | Delete
/**
[2790] Fix | Delete
* Fires before the comment fields in the comment form, excluding the textarea.
[2791] Fix | Delete
*
[2792] Fix | Delete
* @since 3.0.0
[2793] Fix | Delete
*/
[2794] Fix | Delete
do_action( 'comment_form_before_fields' );
[2795] Fix | Delete
}
[2796] Fix | Delete
[2797] Fix | Delete
/**
[2798] Fix | Delete
* Filters a comment form field for display.
[2799] Fix | Delete
*
[2800] Fix | Delete
* The dynamic portion of the hook name, `$name`, refers to the name
[2801] Fix | Delete
* of the comment form field.
[2802] Fix | Delete
*
[2803] Fix | Delete
* Possible hook names include:
[2804] Fix | Delete
*
[2805] Fix | Delete
* - `comment_form_field_comment`
[2806] Fix | Delete
* - `comment_form_field_author`
[2807] Fix | Delete
* - `comment_form_field_email`
[2808] Fix | Delete
* - `comment_form_field_url`
[2809] Fix | Delete
* - `comment_form_field_cookies`
[2810] Fix | Delete
*
[2811] Fix | Delete
* @since 3.0.0
[2812] Fix | Delete
*
[2813] Fix | Delete
* @param string $field The HTML-formatted output of the comment form field.
[2814] Fix | Delete
*/
[2815] Fix | Delete
echo apply_filters( "comment_form_field_{$name}", $field ) . "\n";
[2816] Fix | Delete
[2817] Fix | Delete
if ( $last_field === $name ) {
[2818] Fix | Delete
/**
[2819] Fix | Delete
* Fires after the comment fields in the comment form, excluding the textarea.
[2820] Fix | Delete
*
[2821] Fix | Delete
* @since 3.0.0
[2822] Fix | Delete
*/
[2823] Fix | Delete
do_action( 'comment_form_after_fields' );
[2824] Fix | Delete
}
[2825] Fix | Delete
}
[2826] Fix | Delete
}
[2827] Fix | Delete
[2828] Fix | Delete
$submit_button = sprintf(
[2829] Fix | Delete
$args['submit_button'],
[2830] Fix | Delete
esc_attr( $args['name_submit'] ),
[2831] Fix | Delete
esc_attr( $args['id_submit'] ),
[2832] Fix | Delete
esc_attr( $args['class_submit'] ),
[2833] Fix | Delete
esc_attr( $args['label_submit'] )
[2834] Fix | Delete
);
[2835] Fix | Delete
[2836] Fix | Delete
/**
[2837] Fix | Delete
* Filters the submit button for the comment form to display.
[2838] Fix | Delete
*
[2839] Fix | Delete
* @since 4.2.0
[2840] Fix | Delete
*
[2841] Fix | Delete
* @param string $submit_button HTML markup for the submit button.
[2842] Fix | Delete
* @param array $args Arguments passed to comment_form().
[2843] Fix | Delete
*/
[2844] Fix | Delete
$submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );
[2845] Fix | Delete
[2846] Fix | Delete
$submit_field = sprintf(
[2847] Fix | Delete
$args['submit_field'],
[2848] Fix | Delete
$submit_button,
[2849] Fix | Delete
get_comment_id_fields( $post_id )
[2850] Fix | Delete
);
[2851] Fix | Delete
[2852] Fix | Delete
/**
[2853] Fix | Delete
* Filters the submit field for the comment form to display.
[2854] Fix | Delete
*
[2855] Fix | Delete
* The submit field includes the submit button, hidden fields for the
[2856] Fix | Delete
* comment form, and any wrapper markup.
[2857] Fix | Delete
*
[2858] Fix | Delete
* @since 4.2.0
[2859] Fix | Delete
*
[2860] Fix | Delete
* @param string $submit_field HTML markup for the submit field.
[2861] Fix | Delete
* @param array $args Arguments passed to comment_form().
[2862] Fix | Delete
*/
[2863] Fix | Delete
echo apply_filters( 'comment_form_submit_field', $submit_field, $args );
[2864] Fix | Delete
[2865] Fix | Delete
/**
[2866] Fix | Delete
* Fires at the bottom of the comment form, inside the closing form tag.
[2867] Fix | Delete
*
[2868] Fix | Delete
* @since 1.5.0
[2869] Fix | Delete
*
[2870] Fix | Delete
* @param int $post_id The post ID.
[2871] Fix | Delete
*/
[2872] Fix | Delete
do_action( 'comment_form', $post_id );
[2873] Fix | Delete
[2874] Fix | Delete
echo '</form>';
[2875] Fix | Delete
[2876] Fix | Delete
endif;
[2877] Fix | Delete
?>
[2878] Fix | Delete
</div><!-- #respond -->
[2879] Fix | Delete
<?php
[2880] Fix | Delete
[2881] Fix | Delete
/**
[2882] Fix | Delete
* Fires after the comment form.
[2883] Fix | Delete
*
[2884] Fix | Delete
* @since 3.0.0
[2885] Fix | Delete
*/
[2886] Fix | Delete
do_action( 'comment_form_after' );
[2887] Fix | Delete
}
[2888] Fix | Delete
[2889] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function