Skip to content

Commit

Permalink
version 1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
francgrasso committed May 12, 2020
1 parent 4151e28 commit c8ef874
Show file tree
Hide file tree
Showing 27 changed files with 4,379 additions and 406 deletions.
3 changes: 2 additions & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
*
* @package yith-proteo
*/

global $post;
?>
<?php echo get_theme_mod( 'yith_proteo_default_sidebar_position', 'right' ) != 'no-sidebar' ? '</div>' : ''; ?>
</div><!-- .container -->
</div><!-- #content -->
<?php
// hide site footer if meta value enabled
// hide site footer if meta value enabled.
if ( function_exists( 'wc' ) && is_shop() ) {
$hide_footer = get_post_meta( wc_get_page_id( 'shop' ), 'yith_proteo_remove_header_and_footer', true );
} elseif ( is_home() ) {
Expand Down
21 changes: 13 additions & 8 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* yith-proteo functions and definitions
* YITH-Proteo functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
Expand Down Expand Up @@ -110,14 +110,14 @@ function yith_proteo_setup() {
add_action( 'after_setup_theme', 'yith_proteo_setup' );


/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
if ( ! function_exists( 'yith_proteo_content_width' ) ) :
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
function yith_proteo_content_width() {
// This variable is intended to be overruled from themes.
// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
Expand Down Expand Up @@ -186,6 +186,11 @@ function yith_proteo_content_width() {
*/
require get_template_directory() . '/inc/customizer-inline-style.php';

/**
* Load TGM class
*/
require_once get_template_directory() . '/third-party/classes/class-tgm-plugin-activation.php';

/**
* Various functions
*/
Expand Down
3 changes: 2 additions & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*
* @package yith-proteo
*/

global $post;
?>
<!doctype html>
Expand All @@ -21,7 +22,7 @@
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'yith-proteo' ); ?></a>

<?php
// hide site header if meta value enabled
// hide site header if meta value enabled.
if ( function_exists( 'wc' ) && is_shop() ) {
$hide_header = get_post_meta( wc_get_page_id( 'shop' ), 'yith_proteo_remove_header_and_footer', true );
} elseif ( is_home() ) {
Expand Down
1 change: 1 addition & 0 deletions home.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
the_post();

echo ( 1 == $post_count ) ? '<div class="col-md-12">' : '<div class="col-lg-6">';

/*
* Include the Post-Type-specific template for the content.
* If you want to override this in a child theme, then include a file
Expand Down
17 changes: 17 additions & 0 deletions inc/class-wp-customize-notice.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
<?php
/**
* Extends WP_Customize_Control class
*
* @package yith-proteo
*/

if ( class_exists( 'WP_Customize_Control' ) ) {
/**
* Class WP_Customize_Notice
*/
class WP_Customize_Notice extends WP_Customize_Control {

/**
* Customizer control type
*
* @var $type Control type
*/
public $type = 'simple_notice';

/**
* Render controls
*/
public function render_content() {
$allowed_html = array(
'a' => array(
Expand Down
25 changes: 25 additions & 0 deletions inc/class-wp-customize-range.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
<?php
/**
* Extends WP_Customize_Control class
*
* @package yith-proteo
*/

if ( class_exists( 'WP_Customize_Control' ) ) {
/**
* Class WP_Customize_Notice
*/
class WP_Customize_Range extends WP_Customize_Control {

/**
* Customizer control type
*
* @var $type Control type
*/
public $type = 'range';

/**
* WP_Customize_Range constructor.
*
* @param mixed $manager manager.
* @param int $id element ID.
* @param array $args arguments.
*/
public function __construct( $manager, $id, $args = array() ) {
parent::__construct( $manager, $id, $args );
$defaults = array(
Expand All @@ -17,6 +39,9 @@ public function __construct( $manager, $id, $args = array() ) {
$this->step = $args['step'];
}

/**
* Render control
*/
public function render_content() {
?>
<label>
Expand Down
17 changes: 13 additions & 4 deletions inc/class-yith-proteo-walker-comment.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<?php class YITH_Proteo_Walker_Comment extends Walker_Comment {
<?php
/**
* Extends Walker_Comment class
*
* @package yith-proteo
*/

/**
* Class YITH_Proteo_Walker_Comment
*/
class YITH_Proteo_Walker_Comment extends Walker_Comment {

/**
* Outputs a comment in the HTML5 format.
*
* @param WP_Comment $comment Comment to display.
* @param int $depth Depth of the current comment.
* @param array $args An array of arguments.
* @param int $depth Depth of the current comment.
* @param array $args An array of arguments.
*
* @see wp_list_comments()
*
*/
protected function html5_comment( $comment, $depth, $args ) {

Expand Down
Loading

0 comments on commit c8ef874

Please sign in to comment.