Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/modules/theme-to.../compat
File: twentytwentyone.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Jetpack Compatibility File
[2] Fix | Delete
* See: https://jetpack.com/
[3] Fix | Delete
*
[4] Fix | Delete
* @package automattic/jetpack
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[8] Fix | Delete
exit( 0 );
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Add Jetpack extra functionality to Twenty Twenty One.
[13] Fix | Delete
*/
[14] Fix | Delete
function twentytwentyone_jetpack_setup() {
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* Add theme support for Infinite Scroll.
[18] Fix | Delete
*/
[19] Fix | Delete
add_theme_support(
[20] Fix | Delete
'infinite-scroll',
[21] Fix | Delete
array(
[22] Fix | Delete
'type' => 'click',
[23] Fix | Delete
'container' => 'main',
[24] Fix | Delete
'render' => 'twentytwentyone_infinite_scroll_render',
[25] Fix | Delete
'footer' => 'main',
[26] Fix | Delete
)
[27] Fix | Delete
);
[28] Fix | Delete
}
[29] Fix | Delete
add_action( 'after_setup_theme', 'twentytwentyone_jetpack_setup' );
[30] Fix | Delete
[31] Fix | Delete
/**
[32] Fix | Delete
* Custom render function for Infinite Scroll.
[33] Fix | Delete
*/
[34] Fix | Delete
function twentytwentyone_infinite_scroll_render() {
[35] Fix | Delete
while ( have_posts() ) {
[36] Fix | Delete
the_post();
[37] Fix | Delete
get_template_part( 'template-parts/content/content', get_theme_mod( 'display_excerpt_or_full_post', 'excerpt' ) );
[38] Fix | Delete
}
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
/**
[42] Fix | Delete
* Add our compat CSS file for custom styles.
[43] Fix | Delete
* Set the version equal to filemtime for development builds, and the JETPACK__VERSION for production
[44] Fix | Delete
* or skip it entirely for wpcom.
[45] Fix | Delete
*/
[46] Fix | Delete
function twentytwentyone_enqueue_jetpack_style() {
[47] Fix | Delete
$version = Jetpack::is_development_version()
[48] Fix | Delete
? filemtime( JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentytwentyone.css' )
[49] Fix | Delete
: JETPACK__VERSION;
[50] Fix | Delete
[51] Fix | Delete
wp_enqueue_style( 'twentytwentyone-jetpack', plugins_url( 'twentytwentyone.css', __FILE__ ), array(), $version );
[52] Fix | Delete
wp_style_add_data( 'twentytwentyone-jetpack', 'rtl', 'replace' );
[53] Fix | Delete
}
[54] Fix | Delete
add_action( 'wp_enqueue_scripts', 'twentytwentyone_enqueue_jetpack_style' );
[55] Fix | Delete
[56] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function