Skip to content

Commit

Permalink
Removing function_exists check for TwentyFifteen init function as it …
Browse files Browse the repository at this point in the history
…isn't duplicated
  • Loading branch information
coder-karen committed Jan 29, 2025
1 parent d615788 commit 1c375e6
Showing 1 changed file with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,22 @@ function twentyfifteen_jetpack_setup() {
}
add_action( 'after_setup_theme', 'twentyfifteen_jetpack_setup' );

if ( ! function_exists( 'twentyfifteen_init_jetpack' ) ) {
/**
* Enqueue Jetpack compat styles for Twenty Fifteen.
*/
function twentyfifteen_init_jetpack() {
/**
* Enqueue Jetpack compat styles for Twenty Fifteen.
* Add our compat CSS file for custom widget stylings and such.
* Set the version equal to filemtime for development builds, and the JETPACK__VERSION for production
* or skip it entirely for wpcom.
*/
function twentyfifteen_init_jetpack() {
/**
* Add our compat CSS file for custom widget stylings and such.
* Set the version equal to filemtime for development builds, and the JETPACK__VERSION for production
* or skip it entirely for wpcom.
*/
if ( ! is_admin() ) {
$version = false;
if ( method_exists( 'Jetpack', 'is_development_version' ) ) {
$version = Jetpack::is_development_version() ? filemtime( plugin_dir_path( __FILE__ ) . 'twentyfifteen.css' ) : JETPACK__VERSION;
}
wp_enqueue_style( 'twentyfifteen-jetpack', plugins_url( 'twentyfifteen.css', __FILE__ ), array(), $version );
wp_style_add_data( 'twentyfifteen-jetpack', 'rtl', 'replace' );
if ( ! is_admin() ) {
$version = false;
if ( method_exists( 'Jetpack', 'is_development_version' ) ) {
$version = Jetpack::is_development_version() ? filemtime( plugin_dir_path( __FILE__ ) . 'twentyfifteen.css' ) : JETPACK__VERSION;
}
wp_enqueue_style( 'twentyfifteen-jetpack', plugins_url( 'twentyfifteen.css', __FILE__ ), array(), $version );
wp_style_add_data( 'twentyfifteen-jetpack', 'rtl', 'replace' );
}
add_action( 'init', 'twentyfifteen_init_jetpack' );
}
add_action( 'init', 'twentyfifteen_init_jetpack' );

0 comments on commit 1c375e6

Please sign in to comment.