Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion wp-content/themes/customizr-pro-child/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,49 @@
// END ENQUEUE PARENT ACTION
/*---Move Product Title*/
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );

/**
* @return array
*
function child_thumb_size() {
$sizeinfo = array( 'width' => 240, 'height' => 180, 'crop' => false );
return $sizeinfo;
}
add_filter( 'tc_thumb_size', 'child_thumb_size');
add_filter( 'tc_thumb_fpc_size', 'child_thumb_size');
*/

/**
*
function child_theme_setup() {
add_image_size('tc-thumb', 240, 180, false);
}
add_action( 'after_setup_theme', 'child_theme_setup', 10, 2);
update_option( 'thumbnail_size_w', 240 );
update_option( 'thumbnail_size_h', 180 );
update_option( 'thumbnail_crop', 0 );
*/

/**
*
add_filter('tc_fp_link_url' , 'my_custom_fp_links', 10 ,2);
//If you are using the featured pages Unlimited Plugin or the Customizr Pro theme, uncomment this line :
add_filter('fpc_link_url' , 'my_custom_fp_links', 10 ,2);

function my_custom_fp_links( $original_link , $fp_id ) {

//assigns a custom link by page id
$custom_link = array(
//page id => 'Custom link'
59 => 'https://newswheel.vta.org/category/headways/',
29 => 'https://newswheel.vta.org/category/from-the-hub/',
129 => 'https://newswheel.vta.org/category/announcements/',
25 => 'https://newswheel.vta.org/category/safety/'
);

foreach ($custom_link as $page_id => $link) {
if ( get_permalink($page_id) == $original_link )
return $link;
}
*/
7 changes: 7 additions & 0 deletions wp-content/themes/customizr-pro-child/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,10 @@ h2.woocommerce-loop-product__title {
font-size: 12pt !important;
color: red;
}

/**
* Fix post thumbnails scaling issue
*/
figure.tc-grid-figure.has-thumb.effect-4 {
height: unset !important;
}
181 changes: 79 additions & 102 deletions wp-content/themes/customizr-pro-child/woocommerce/archive-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,121 +10,98 @@
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.0.0
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.4.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
defined( 'ABSPATH' ) || exit;

get_header( 'shop' );

get_header( 'shop' ); ?>
/**
* Hook: woocommerce_before_main_content.
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
* @hooked WC_Structured_Data::generate_website_data() - 30
*/
do_action( 'woocommerce_before_main_content' );

?>
<header class="woocommerce-products-header">
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
<h1 class="woocommerce-products-header__title page-title"><?php woocommerce_page_title(); ?></h1>
<?php endif; ?>

<?php
/**
* woocommerce_before_main_content hook.
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
* @hooked WC_Structured_Data::generate_website_data() - 30
*/
do_action( 'woocommerce_before_main_content' );
/**
* Hook: woocommerce_archive_description.
*
* @hooked woocommerce_taxonomy_archive_description - 10
* @hooked woocommerce_product_archive_description - 10
*/
do_action( 'woocommerce_archive_description' );
?>
</header>
<?php
if ( woocommerce_product_loop() ) {

<header class="woocommerce-products-header">

<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
/**
* Hook: woocommerce_before_shop_loop.
*
* @hooked wc_print_notices - 10
* @hooked woocommerce_result_count - 20
* @hooked woocommerce_catalog_ordering - 30
*/
do_action( 'woocommerce_before_shop_loop' );

<h1 class="woocommerce-products-header__title page-title"><?php woocommerce_page_title(); ?></h1>
woocommerce_product_loop_start();

<?php endif; ?>
if ( wc_get_loop_prop( 'total' ) ) {
while ( have_posts() ) {
the_post();

<?php
/**
* woocommerce_archive_description hook.
* Hook: woocommerce_shop_loop.
*
* @hooked woocommerce_taxonomy_archive_description - 10
* @hooked woocommerce_product_archive_description - 10
* @hooked WC_Structured_Data::generate_product_data() - 10
*/
do_action( 'woocommerce_archive_description' );
?>

</header>

<?php if ( have_posts() ) : ?>

<?php
/**
* woocommerce_before_shop_loop hook.
*
* @hooked wc_print_notices - 10
* @hooked woocommerce_result_count - 20
* @hooked woocommerce_catalog_ordering - 30
*/
do_action( 'woocommerce_before_shop_loop' );
?>

<?php woocommerce_product_loop_start(); ?>

<?php woocommerce_product_subcategories(); ?>

<?php while ( have_posts() ) : the_post(); ?>

<?php
/**
* woocommerce_shop_loop hook.
*
* @hooked WC_Structured_Data::generate_product_data() - 10
*/
do_action( 'woocommerce_shop_loop' );
?>

<?php wc_get_template_part( 'content', 'product' ); ?>

<?php endwhile; // end of the loop. ?>

<?php woocommerce_product_loop_end(); ?>

<?php
/**
* woocommerce_after_shop_loop hook.
*
* @hooked woocommerce_pagination - 10
*/
do_action( 'woocommerce_after_shop_loop' );
?>

<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>

<?php
/**
* woocommerce_no_products_found hook.
*
* @hooked wc_no_products_found - 10
*/
do_action( 'woocommerce_no_products_found' );
?>

<?php endif; ?>
do_action( 'woocommerce_shop_loop' );

wc_get_template_part( 'content', 'product' );
}
}

woocommerce_product_loop_end();

/**
* Hook: woocommerce_after_shop_loop.
*
* @hooked woocommerce_pagination - 10
*/
do_action( 'woocommerce_after_shop_loop' );
} else {
/**
* Hook: woocommerce_no_products_found.
*
* @hooked wc_no_products_found - 10
*/
do_action( 'woocommerce_no_products_found' );
}

<?php
/**
* woocommerce_after_main_content hook.
*
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
*/
do_action( 'woocommerce_after_main_content' );
?>
/**
* Hook: woocommerce_after_main_content.
*
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
*/
do_action( 'woocommerce_after_main_content' );

<?php
/**
* woocommerce_sidebar hook.
*
* @hooked woocommerce_get_sidebar - 10
*/
do_action( 'woocommerce_sidebar' );
?>
/**
* Hook: woocommerce_sidebar.
*
* @hooked woocommerce_get_sidebar - 10
*/
do_action( 'woocommerce_sidebar' );

<?php get_footer( 'shop' ); ?>
get_footer( 'shop' );
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

<?php do_action( 'woocommerce_auth_page_header' ); ?>

<h1><?php printf( __( '%s would like to connect to your store' , 'woocommerce' ), esc_html( $app_name ) ); ?></h1>
<h1><?php printf( __( '%s would like to connect to your store', 'woocommerce' ), esc_html( $app_name ) ); ?></h1>

<?php wc_print_notices(); ?>

<p><?php printf( __( 'This will give "%1$s" %2$s access which will allow it to:' , 'woocommerce' ), '<strong>' . esc_html( $app_name ) . '</strong>', '<strong>' . esc_html( $scope ) . '</strong>' ); ?></p>
<p><?php printf( __( 'This will give "%1$s" %2$s access which will allow it to:', 'woocommerce' ), '<strong>' . esc_html( $app_name ) . '</strong>', '<strong>' . esc_html( $scope ) . '</strong>' ); ?></p>

<ul class="wc-auth-permissions">
<?php foreach ( $permissions as $permission ) : ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,43 @@
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates/Auth
* @version 2.4.0
* @version 3.4.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit;
}
defined( 'ABSPATH' ) || exit;

?>
do_action( 'woocommerce_auth_page_header' ); ?>

<?php do_action( 'woocommerce_auth_page_header' ); ?>

<h1><?php printf( __( '%s would like to connect to your store' , 'woocommerce' ), esc_html( $app_name ) ); ?></h1>
<h1>
<?php
/* translators: %s: app name */
printf( esc_html__( '%s would like to connect to your store', 'woocommerce' ), esc_html( $app_name ) );
?>
</h1>

<?php wc_print_notices(); ?>

<p><?php printf( __( 'To connect to %1$s you need to be logged in. Log in to your store below, or <a href="%2$s">cancel and return to %1$s</a>', 'woocommerce' ), wc_clean( $app_name ), esc_url( $return_url ) ); ?></p>
<p>
<?php
/* translators: %1$s: app name, %2$s: URL */
echo wp_kses_post( sprintf( __( 'To connect to %1$s you need to be logged in. Log in to your store below, or <a href="%2$s">cancel and return to %1$s</a>', 'woocommerce' ), esc_html( wc_clean( $app_name ) ), esc_url( $return_url ) ) );
?>
</p>

<form method="post" class="wc-auth-login">
<p class="form-row form-row-wide">
<label for="username"><?php _e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
<input type="text" class="input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" /><?php //@codingStandardsIgnoreLine ?>
</p>
<p class="form-row form-row-wide">
<label for="password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
<input class="input-text" type="password" name="password" id="password" />
</p>
<p class="wc-auth-actions">
<?php wp_nonce_field( 'woocommerce-login' ); ?>
<input type="submit" class="button button-large button-primary wc-auth-login-button" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>" />
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
<button type="submit" class="button button-large button-primary wc-auth-login-button" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>"><?php esc_html_e( 'Login', 'woocommerce' ); ?></button>
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect_url ); ?>" />
</p>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
?>
<dl class="variation">
<?php foreach ( $item_data as $data ) : ?>
<dt class="variation-<?php echo sanitize_html_class( $data['key'] ); ?>"><?php echo wp_kses_post( $data['key'] ); ?>:</dt>
<dd class="variation-<?php echo sanitize_html_class( $data['key'] ); ?>"><?php echo wp_kses_post( wpautop( $data['display'] ) ); ?></dd>
<dt class="<?php echo sanitize_html_class( 'variation-' . $data['key'] ); ?>"><?php echo wp_kses_post( $data['key'] ); ?>:</dt>
<dd class="<?php echo sanitize_html_class( 'variation-' . $data['key'] ); ?>"><?php echo wp_kses_post( wpautop( $data['display'] ) ); ?></dd>
<?php endforeach; ?>
</dl>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 3.1.0
* @version 3.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
Expand Down Expand Up @@ -44,10 +44,16 @@
printf( '%3$s <input type="hidden" name="shipping_method[%1$d]" data-index="%1$d" id="shipping_method_%1$d" value="%2$s" class="shipping_method" />', $index, esc_attr( $method->id ), wc_cart_totals_shipping_method_label( $method ) );
do_action( 'woocommerce_after_shipping_rate', $method, $index );
?>
<?php elseif ( ! WC()->customer->has_calculated_shipping() ) : ?>
<?php echo wpautop( __( 'Shipping costs will be calculated once you have provided your address.', 'woocommerce' ) ); ?>
<?php else : ?>
<?php echo apply_filters( is_cart() ? 'woocommerce_cart_no_shipping_available_html' : 'woocommerce_no_shipping_available_html', wpautop( __( 'There are no shipping methods available. Please double check your address, or contact us if you need any help.', 'woocommerce' ) ) ); ?>
<?php elseif ( WC()->customer->has_calculated_shipping() ) : ?>
<?php
if ( is_cart() ) {
echo apply_filters( 'woocommerce_cart_no_shipping_available_html', wpautop( __( 'There are no shipping methods available. Please ensure that your address has been entered correctly, or contact us if you need any help.', 'woocommerce' ) ) );
} else {
echo apply_filters( 'woocommerce_no_shipping_available_html', wpautop( __( 'There are no shipping methods available. Please ensure that your address has been entered correctly, or contact us if you need any help.', 'woocommerce' ) ) );
}
?>
<?php elseif ( ! is_cart() ) : ?>
<?php echo wpautop( __( 'Enter your full address to see shipping costs.', 'woocommerce' ) ); ?>
<?php endif; ?>

<?php if ( $show_package_details ) : ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</tr>
<?php endforeach; ?>

<?php if ( wc_tax_enabled() && 'excl' === WC()->cart->tax_display_cart ) :
<?php if ( wc_tax_enabled() && ! WC()->cart->display_prices_including_tax() ) :
$taxable_address = WC()->customer->get_taxable_address();
$estimated_text = WC()->customer->is_customer_outside_base() && ! WC()->customer->has_calculated_shipping()
? sprintf( ' <small>' . __( '(estimated for %s)', 'woocommerce' ) . '</small>', WC()->countries->estimated_for_prefix( $taxable_address[0] ) . WC()->countries->countries[ $taxable_address[0] ] )
Expand Down
Loading