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/wp-inclu...
File: blocks.php
$comment_args['number'] = $per_page;
[2500] Fix | Delete
[2501] Fix | Delete
$page = (int) get_query_var( 'cpage' );
[2502] Fix | Delete
if ( $page ) {
[2503] Fix | Delete
$comment_args['paged'] = $page;
[2504] Fix | Delete
} elseif ( 'oldest' === $default_page ) {
[2505] Fix | Delete
$comment_args['paged'] = 1;
[2506] Fix | Delete
} elseif ( 'newest' === $default_page ) {
[2507] Fix | Delete
$max_num_pages = (int) ( new WP_Comment_Query( $comment_args ) )->max_num_pages;
[2508] Fix | Delete
if ( 0 !== $max_num_pages ) {
[2509] Fix | Delete
$comment_args['paged'] = $max_num_pages;
[2510] Fix | Delete
}
[2511] Fix | Delete
}
[2512] Fix | Delete
// Set the `cpage` query var to ensure the previous and next pagination links are correct
[2513] Fix | Delete
// when inheriting the Discussion Settings.
[2514] Fix | Delete
if ( 0 === $page && isset( $comment_args['paged'] ) && $comment_args['paged'] > 0 ) {
[2515] Fix | Delete
set_query_var( 'cpage', $comment_args['paged'] );
[2516] Fix | Delete
}
[2517] Fix | Delete
}
[2518] Fix | Delete
}
[2519] Fix | Delete
[2520] Fix | Delete
return $comment_args;
[2521] Fix | Delete
}
[2522] Fix | Delete
[2523] Fix | Delete
/**
[2524] Fix | Delete
* Helper function that returns the proper pagination arrow HTML for
[2525] Fix | Delete
* `CommentsPaginationNext` and `CommentsPaginationPrevious` blocks based on the
[2526] Fix | Delete
* provided `paginationArrow` from `CommentsPagination` context.
[2527] Fix | Delete
*
[2528] Fix | Delete
* It's used in CommentsPaginationNext and CommentsPaginationPrevious blocks.
[2529] Fix | Delete
*
[2530] Fix | Delete
* @since 6.0.0
[2531] Fix | Delete
*
[2532] Fix | Delete
* @param WP_Block $block Block instance.
[2533] Fix | Delete
* @param string $pagination_type Optional. Type of the arrow we will be rendering.
[2534] Fix | Delete
* Accepts 'next' or 'previous'. Default 'next'.
[2535] Fix | Delete
* @return string|null The pagination arrow HTML or null if there is none.
[2536] Fix | Delete
*/
[2537] Fix | Delete
function get_comments_pagination_arrow( $block, $pagination_type = 'next' ) {
[2538] Fix | Delete
$arrow_map = array(
[2539] Fix | Delete
'none' => '',
[2540] Fix | Delete
'arrow' => array(
[2541] Fix | Delete
'next' => '→',
[2542] Fix | Delete
'previous' => '←',
[2543] Fix | Delete
),
[2544] Fix | Delete
'chevron' => array(
[2545] Fix | Delete
'next' => '»',
[2546] Fix | Delete
'previous' => '«',
[2547] Fix | Delete
),
[2548] Fix | Delete
);
[2549] Fix | Delete
if ( ! empty( $block->context['comments/paginationArrow'] ) && ! empty( $arrow_map[ $block->context['comments/paginationArrow'] ][ $pagination_type ] ) ) {
[2550] Fix | Delete
$arrow_attribute = $block->context['comments/paginationArrow'];
[2551] Fix | Delete
$arrow = $arrow_map[ $block->context['comments/paginationArrow'] ][ $pagination_type ];
[2552] Fix | Delete
$arrow_classes = "wp-block-comments-pagination-$pagination_type-arrow is-arrow-$arrow_attribute";
[2553] Fix | Delete
return "<span class='$arrow_classes' aria-hidden='true'>$arrow</span>";
[2554] Fix | Delete
}
[2555] Fix | Delete
return null;
[2556] Fix | Delete
}
[2557] Fix | Delete
[2558] Fix | Delete
/**
[2559] Fix | Delete
* Strips all HTML from the content of footnotes, and sanitizes the ID.
[2560] Fix | Delete
*
[2561] Fix | Delete
* This function expects slashed data on the footnotes content.
[2562] Fix | Delete
*
[2563] Fix | Delete
* @access private
[2564] Fix | Delete
* @since 6.3.2
[2565] Fix | Delete
*
[2566] Fix | Delete
* @param string $footnotes JSON-encoded string of an array containing the content and ID of each footnote.
[2567] Fix | Delete
* @return string Filtered content without any HTML on the footnote content and with the sanitized ID.
[2568] Fix | Delete
*/
[2569] Fix | Delete
function _wp_filter_post_meta_footnotes( $footnotes ) {
[2570] Fix | Delete
$footnotes_decoded = json_decode( $footnotes, true );
[2571] Fix | Delete
if ( ! is_array( $footnotes_decoded ) ) {
[2572] Fix | Delete
return '';
[2573] Fix | Delete
}
[2574] Fix | Delete
$footnotes_sanitized = array();
[2575] Fix | Delete
foreach ( $footnotes_decoded as $footnote ) {
[2576] Fix | Delete
if ( ! empty( $footnote['content'] ) && ! empty( $footnote['id'] ) ) {
[2577] Fix | Delete
$footnotes_sanitized[] = array(
[2578] Fix | Delete
'id' => sanitize_key( $footnote['id'] ),
[2579] Fix | Delete
'content' => wp_unslash( wp_filter_post_kses( wp_slash( $footnote['content'] ) ) ),
[2580] Fix | Delete
);
[2581] Fix | Delete
}
[2582] Fix | Delete
}
[2583] Fix | Delete
return wp_json_encode( $footnotes_sanitized );
[2584] Fix | Delete
}
[2585] Fix | Delete
[2586] Fix | Delete
/**
[2587] Fix | Delete
* Adds the filters for footnotes meta field.
[2588] Fix | Delete
*
[2589] Fix | Delete
* @access private
[2590] Fix | Delete
* @since 6.3.2
[2591] Fix | Delete
*/
[2592] Fix | Delete
function _wp_footnotes_kses_init_filters() {
[2593] Fix | Delete
add_filter( 'sanitize_post_meta_footnotes', '_wp_filter_post_meta_footnotes' );
[2594] Fix | Delete
}
[2595] Fix | Delete
[2596] Fix | Delete
/**
[2597] Fix | Delete
* Removes the filters for footnotes meta field.
[2598] Fix | Delete
*
[2599] Fix | Delete
* @access private
[2600] Fix | Delete
* @since 6.3.2
[2601] Fix | Delete
*/
[2602] Fix | Delete
function _wp_footnotes_remove_filters() {
[2603] Fix | Delete
remove_filter( 'sanitize_post_meta_footnotes', '_wp_filter_post_meta_footnotes' );
[2604] Fix | Delete
}
[2605] Fix | Delete
[2606] Fix | Delete
/**
[2607] Fix | Delete
* Registers the filter of footnotes meta field if the user does not have `unfiltered_html` capability.
[2608] Fix | Delete
*
[2609] Fix | Delete
* @access private
[2610] Fix | Delete
* @since 6.3.2
[2611] Fix | Delete
*/
[2612] Fix | Delete
function _wp_footnotes_kses_init() {
[2613] Fix | Delete
_wp_footnotes_remove_filters();
[2614] Fix | Delete
if ( ! current_user_can( 'unfiltered_html' ) ) {
[2615] Fix | Delete
_wp_footnotes_kses_init_filters();
[2616] Fix | Delete
}
[2617] Fix | Delete
}
[2618] Fix | Delete
[2619] Fix | Delete
/**
[2620] Fix | Delete
* Initializes the filters for footnotes meta field when imported data should be filtered.
[2621] Fix | Delete
*
[2622] Fix | Delete
* This filter is the last one being executed on {@see 'force_filtered_html_on_import'}.
[2623] Fix | Delete
* If the input of the filter is true, it means we are in an import situation and should
[2624] Fix | Delete
* enable kses, independently of the user capabilities. So in that case we call
[2625] Fix | Delete
* _wp_footnotes_kses_init_filters().
[2626] Fix | Delete
*
[2627] Fix | Delete
* @access private
[2628] Fix | Delete
* @since 6.3.2
[2629] Fix | Delete
*
[2630] Fix | Delete
* @param string $arg Input argument of the filter.
[2631] Fix | Delete
* @return string Input argument of the filter.
[2632] Fix | Delete
*/
[2633] Fix | Delete
function _wp_footnotes_force_filtered_html_on_import_filter( $arg ) {
[2634] Fix | Delete
// If `force_filtered_html_on_import` is true, we need to init the global styles kses filters.
[2635] Fix | Delete
if ( $arg ) {
[2636] Fix | Delete
_wp_footnotes_kses_init_filters();
[2637] Fix | Delete
}
[2638] Fix | Delete
return $arg;
[2639] Fix | Delete
}
[2640] Fix | Delete
[2641] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function