Skip to content

Commit

Permalink
fix menu layout issue - fix php notice - fix missing select2 scripts …
Browse files Browse the repository at this point in the history
…when WooCommerce is not enabled - new screenshot with author credits
  • Loading branch information
francgrasso committed Feb 28, 2020
1 parent dba3999 commit 7750956
Show file tree
Hide file tree
Showing 12 changed files with 6,138 additions and 13 deletions.
5 changes: 4 additions & 1 deletion admin-scripts/admin-css.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**********************
Admin CSS goes here
***********************/
***********************/
.edit-post-meta-boxes-area.is-side .meta-box-sortables select {
max-width: 200px;
}
2 changes: 1 addition & 1 deletion inc/customizer-inline-style.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function yith_proteo_inline_style() {
$custom_css = '';

$font = '';
$default_font = ( get_theme_mod( 'yith_proteo_google_font', esc_url( 'https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700&display=swap' ) ) ) == 'https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700&display=swap' ? true : false;
$default_font = ( get_theme_mod( 'yith_proteo_google_font', esc_url_raw( 'https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700&display=swap' ) ) ) == 'https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700&display=swap' ? true : false;

$main_color_shade = get_theme_mod( 'yith_proteo_main_color_shade', '#448a85' );
$general_link_hover_color = get_theme_mod( 'yith_proteo_general_link_hover_color', yith_proteo_adjust_brightness( get_theme_mod( 'yith_proteo_main_color_shade', '#448a85' ), - 0.3 ) );
Expand Down
2 changes: 1 addition & 1 deletion inc/metaboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class="components-text-control__input" style="width: 100%">
foreach ( $icons as $key => $icon ) :
?>
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $value, $key ); ?>>
<?php echo esc_attr( $icon ); ?>
<?php echo esc_html( $icon ); ?>
</option>
<?php endforeach; ?>

Expand Down
6 changes: 5 additions & 1 deletion inc/scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ function yith_proteo_admin_scripts() {
wp_enqueue_style( 'yith-proteo-simple-line-icons', get_template_directory_uri() . '/third-party/simple-line-icons' . $suffix . '.css', array(), '2.4.1' );

wp_enqueue_style( 'select2', get_template_directory_uri() . '/third-party/select2' . $suffix . '.css', array(), '4.0.13' );
wp_enqueue_script( 'selectWoo' );
if ( function_exists( 'WC' ) ) {
wp_enqueue_script( 'selectWoo' );
} else {
wp_enqueue_script( 'select2', get_template_directory_uri() . '/third-party/select2' . $suffix . '.js', array(), '4.0.13', true );
}
wp_enqueue_script( 'yith-proteo-admin-js', get_template_directory_uri() . '/admin-scripts/admin-js.js', array(), YITH_PROTEO_VERSION, true );
wp_enqueue_style( 'yith-proteo-admin-css', get_template_directory_uri() . '/admin-scripts/admin-css.css', array(), YITH_PROTEO_VERSION );
}
Expand Down
6 changes: 3 additions & 3 deletions inc/widgets/class-yith-proteo-recent-posts-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public function widget( $args, $instance ) {

$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Recent Posts', 'yith-proteo' ) : $instance['title'], $instance, $this->id_base );

if ( empty( $instance['number'] ) ) {
$number = 5;
} elseif ( absint( $instance['number'] ) == false ) {
$number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5;
if ( ! $number ) {
$number = 5;
}


$show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false;

$posts = new WP_Query(
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ Proteo is a sleek, modern and “Gutenberg-friendly” e-commerce theme. Develop

== Screenshot Licenses ==

Screenshot image, Copyright Freepik
Source: http://www.freepik.com
https://www.pexels.com/photo/woman-smiling-while-wearing-blue-dress-3649116/ by Roberto Okaka
https://www.pexels.com/photo/woman-wearing-yellow-sleeveless-dress-3609781/ by Charles Wundengba
https://www.pexels.com/photo/adolescent-casual-cute-elegant-428338/ by Spencer Selover
https://www.pexels.com/photo/woman-wearing-white-scoop-neck-long-sleeved-shirt-and-brown-pleated-skirt-1845147/ by João Victor Barboza
https://www.pexels.com/photo/woman-wearing-white-minidress-3568546/ by Gabb Tapic
https://stocksnap.io/photo/YLD3KP3CMU by Alex Holyoake - [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/)
6 changes: 4 additions & 2 deletions sass/navigation/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@
}

a {
width: 200px;
display: inline-block;
white-space: nowrap;
max-width: 200px;

&:empty & {
display: none;
Expand Down Expand Up @@ -419,4 +421,4 @@
display: block;
text-decoration: none;
}
}
}
Binary file modified screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion style.css.map

Large diffs are not rendered by default.

Loading

0 comments on commit 7750956

Please sign in to comment.