правки test1
This commit is contained in:
@@ -274,6 +274,52 @@ function twentytwentyfour_contacts_template( $template ) {
|
||||
}
|
||||
add_filter( 'template_include', 'twentytwentyfour_contacts_template' );
|
||||
|
||||
/**
|
||||
* Use a standalone PHP template for the page slug "delivery".
|
||||
*
|
||||
* @since Twenty Twenty-Four 1.0
|
||||
*
|
||||
* @param string $template Resolved template path.
|
||||
* @return string
|
||||
*/
|
||||
function twentytwentyfour_delivery_template( $template ) {
|
||||
if ( ! is_page( 'delivery' ) ) {
|
||||
return $template;
|
||||
}
|
||||
|
||||
$custom_template = get_theme_file_path( 'page-delivery.php' );
|
||||
|
||||
if ( file_exists( $custom_template ) ) {
|
||||
return $custom_template;
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
add_filter( 'template_include', 'twentytwentyfour_delivery_template' );
|
||||
|
||||
/**
|
||||
* Use a standalone PHP template for the page slug "service".
|
||||
*
|
||||
* @since Twenty Twenty-Four 1.0
|
||||
*
|
||||
* @param string $template Resolved template path.
|
||||
* @return string
|
||||
*/
|
||||
function twentytwentyfour_service_template( $template ) {
|
||||
if ( ! is_page( 'service' ) ) {
|
||||
return $template;
|
||||
}
|
||||
|
||||
$custom_template = get_theme_file_path( 'page-service.php' );
|
||||
|
||||
if ( file_exists( $custom_template ) ) {
|
||||
return $custom_template;
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
add_filter( 'template_include', 'twentytwentyfour_service_template' );
|
||||
|
||||
/**
|
||||
* Use a lightweight custom template for the WooCommerce checkout page.
|
||||
*
|
||||
@@ -327,7 +373,7 @@ add_filter( 'template_include', 'twentytwentyfour_cart_template', 20 );
|
||||
* @return void
|
||||
*/
|
||||
function twentytwentyfour_test1_assets() {
|
||||
$use_test1_assets = is_page( array( 'test1', 'faq', 'contacts' ) );
|
||||
$use_test1_assets = is_page( array( 'test1', 'faq', 'contacts', 'delivery', 'service' ) );
|
||||
|
||||
if ( ! $use_test1_assets ) {
|
||||
return;
|
||||
@@ -419,7 +465,7 @@ add_action( 'wp_enqueue_scripts', 'twentytwentyfour_test1_assets', 100 );
|
||||
* @return void
|
||||
*/
|
||||
function twentytwentyfour_test1_shared_shell_assets() {
|
||||
if ( ! ( ( function_exists( 'is_checkout' ) && is_checkout() && ! is_order_received_page() ) || ( function_exists( 'is_cart' ) && is_cart() ) || is_page( 'faq' ) || is_page( 'contacts' ) ) ) {
|
||||
if ( ! ( ( function_exists( 'is_checkout' ) && is_checkout() && ! is_order_received_page() ) || ( function_exists( 'is_cart' ) && is_cart() ) || is_page( 'faq' ) || is_page( 'contacts' ) || is_page( 'delivery' ) || is_page( 'service' ) ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user