Plugin Directory

Changeset 3348523


Ignore:
Timestamp:
08/22/2025 09:07:57 AM (7 months ago)
Author:
barestho
Message:

Release version 1.0.3

Location:
barestho
Files:
5 edited
10 copied

Legend:

Unmodified
Added
Removed
  • barestho/tags/1.0.3/README.md

    r3347566 r3348523  
    44Donate link: https://pro.barestho.com/
    55Tested up to: 6.8.2
    6 Stable tag: 1.0.2
     6Stable tag: 1.0.3
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • barestho/tags/1.0.3/barestho.php

    r3347566 r3348523  
    33Plugin Name: Barestho
    44Description: Plugin pour afficher le widget de réservation.
    5 Version: 1.0.2
     5Version: 1.0.3
    66Author: Barestho
    77License: GPLv2 or later
     
    2828    $plugin_url = plugin_dir_url(__FILE__);
    2929
    30     wp_register_style('barestho-style', $plugin_url . 'css/style-barestho.css', array(), '1.0.1');
     30    wp_register_style('barestho-style', $plugin_url . 'css/style-barestho.css', array(), '1.0.3');
    3131    wp_enqueue_style('barestho-style');
    3232
    33     wp_register_script('barestho-script', $plugin_url . 'js/script-barestho.js', array('jquery'), '1.0.1', array('strategy'  => 'defer',), true);
     33    wp_register_script('barestho-script', $plugin_url . 'js/script-barestho.js', array('jquery'), '1.0.3', array('strategy'  => 'defer',), true);
    3434    wp_enqueue_script('barestho-script');
    3535}
     
    3939
    4040    if ($hook == 'toplevel_page_barestho') {
    41         wp_register_style('barestho-admin-style', $plugin_url . 'css/barestho-admin-style.css', array(), '1.0.1');
     41        wp_register_style('barestho-admin-style', $plugin_url . 'css/barestho-admin-style.css', array(), '1.0.3');
    4242        wp_enqueue_style('barestho-admin-style');
    4343
    44         wp_register_script('barestho-admin-script', $plugin_url . 'js/barestho-admin-script.js', array('jquery', 'wp-color-picker'), '1.0.1', true);
     44        wp_register_script('barestho-admin-script', $plugin_url . 'js/barestho-admin-script.js', array('jquery', 'wp-color-picker'), '1.0.3', true);
    4545        wp_enqueue_script('barestho-admin-script');
    4646
  • barestho/tags/1.0.3/includes/barestho-display.php

    r3347566 r3348523  
    5757    }
    5858
    59     return $barestho_protocol . '://' . esc_attr($restaurant_id) . '.' . $barestho_domain_reservation . ':' . $barestho_port . '/?lng=' . esc_attr($lang) . '&view=' . $view . '&primary-color=' . rawurlencode($theme_color) . '&secondary-color=' . rawurlencode($theme_color) . $logo_params[$logo_choice];
     59    $color_with_hash = strpos($theme_color, '#') === 0 ? $theme_color : '#' . $theme_color;
     60
     61    return $barestho_protocol . '://' . esc_attr($restaurant_id) . '.' . $barestho_domain_reservation . ':' . $barestho_port
     62        . '/?lng=' . esc_attr($lang)
     63        . '&view=' . $view
     64        . '&primary-color=' . rawurlencode($color_with_hash)
     65        . '&secondary-color=' . rawurlencode($color_with_hash)
     66        . $logo_params[$logo_choice];
    6067}
    6168
  • barestho/tags/1.0.3/includes/barestho-settings.php

    r3347566 r3348523  
    9999function barestho_theme_color_render() {
    100100    $barestho_options = get_option('barestho_settings');
    101     $theme_color = !empty($barestho_options['barestho_theme_color']) ? $barestho_options['barestho_theme_color'] : 'DC0044'; // Valeur par défaut
    102     ?>
    103     <input type="text" id="barestho_theme_color" name="barestho_settings[barestho_theme_color]"
    104            value="<?php echo esc_attr($theme_color); ?>" class="regular-text" data-default-color="DC0044" />
     101
     102    // Couleur actuelle ou valeur par défaut #DC0044
     103    $theme_color = !empty($barestho_options['barestho_theme_color']) ? $barestho_options['barestho_theme_color'] : 'DC0044';
     104
     105    // Ajouter le # devant si ce n'est pas déjà présent
     106    if (strpos($theme_color, '#') !== 0) {
     107        $theme_color = '#' . $theme_color;
     108    }
     109    ?>
     110    <input type="text"
     111           id="barestho_theme_color"
     112           name="barestho_settings[barestho_theme_color]"
     113           value="<?php echo esc_attr($theme_color); ?>"
     114           class="regular-text my-color-field"
     115           data-default-color="<?php echo esc_attr($theme_color); ?>"
     116           title="<?php esc_attr_e('Primary color actuelle du restaurant', 'barestho'); ?>" />
     117    <script>
     118        jQuery(document).ready(function($){
     119            $('.my-color-field').wpColorPicker({
     120                defaultColor: '<?php echo esc_js($theme_color); ?>'
     121            });
     122        });
     123    </script>
    105124    <?php
    106125}
  • barestho/tags/1.0.3/vendor/composer/installed.php

    r3347566 r3348523  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '27f228237c8046b7a17a85f7cda9cf7fb6c769f0',
     6        'reference' => '9774e2dfa9dd1d99dbe43c8e466e55110bfd1a8b',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '27f228237c8046b7a17a85f7cda9cf7fb6c769f0',
     16            'reference' => '9774e2dfa9dd1d99dbe43c8e466e55110bfd1a8b',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • barestho/trunk/README.md

    r3347566 r3348523  
    44Donate link: https://pro.barestho.com/
    55Tested up to: 6.8.2
    6 Stable tag: 1.0.2
     6Stable tag: 1.0.3
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • barestho/trunk/barestho.php

    r3347566 r3348523  
    33Plugin Name: Barestho
    44Description: Plugin pour afficher le widget de réservation.
    5 Version: 1.0.2
     5Version: 1.0.3
    66Author: Barestho
    77License: GPLv2 or later
     
    2828    $plugin_url = plugin_dir_url(__FILE__);
    2929
    30     wp_register_style('barestho-style', $plugin_url . 'css/style-barestho.css', array(), '1.0.1');
     30    wp_register_style('barestho-style', $plugin_url . 'css/style-barestho.css', array(), '1.0.3');
    3131    wp_enqueue_style('barestho-style');
    3232
    33     wp_register_script('barestho-script', $plugin_url . 'js/script-barestho.js', array('jquery'), '1.0.1', array('strategy'  => 'defer',), true);
     33    wp_register_script('barestho-script', $plugin_url . 'js/script-barestho.js', array('jquery'), '1.0.3', array('strategy'  => 'defer',), true);
    3434    wp_enqueue_script('barestho-script');
    3535}
     
    3939
    4040    if ($hook == 'toplevel_page_barestho') {
    41         wp_register_style('barestho-admin-style', $plugin_url . 'css/barestho-admin-style.css', array(), '1.0.1');
     41        wp_register_style('barestho-admin-style', $plugin_url . 'css/barestho-admin-style.css', array(), '1.0.3');
    4242        wp_enqueue_style('barestho-admin-style');
    4343
    44         wp_register_script('barestho-admin-script', $plugin_url . 'js/barestho-admin-script.js', array('jquery', 'wp-color-picker'), '1.0.1', true);
     44        wp_register_script('barestho-admin-script', $plugin_url . 'js/barestho-admin-script.js', array('jquery', 'wp-color-picker'), '1.0.3', true);
    4545        wp_enqueue_script('barestho-admin-script');
    4646
  • barestho/trunk/includes/barestho-display.php

    r3347566 r3348523  
    5757    }
    5858
    59     return $barestho_protocol . '://' . esc_attr($restaurant_id) . '.' . $barestho_domain_reservation . ':' . $barestho_port . '/?lng=' . esc_attr($lang) . '&view=' . $view . '&primary-color=' . rawurlencode($theme_color) . '&secondary-color=' . rawurlencode($theme_color) . $logo_params[$logo_choice];
     59    $color_with_hash = strpos($theme_color, '#') === 0 ? $theme_color : '#' . $theme_color;
     60
     61    return $barestho_protocol . '://' . esc_attr($restaurant_id) . '.' . $barestho_domain_reservation . ':' . $barestho_port
     62        . '/?lng=' . esc_attr($lang)
     63        . '&view=' . $view
     64        . '&primary-color=' . rawurlencode($color_with_hash)
     65        . '&secondary-color=' . rawurlencode($color_with_hash)
     66        . $logo_params[$logo_choice];
    6067}
    6168
  • barestho/trunk/includes/barestho-settings.php

    r3347566 r3348523  
    9999function barestho_theme_color_render() {
    100100    $barestho_options = get_option('barestho_settings');
    101     $theme_color = !empty($barestho_options['barestho_theme_color']) ? $barestho_options['barestho_theme_color'] : 'DC0044'; // Valeur par défaut
    102     ?>
    103     <input type="text" id="barestho_theme_color" name="barestho_settings[barestho_theme_color]"
    104            value="<?php echo esc_attr($theme_color); ?>" class="regular-text" data-default-color="DC0044" />
     101
     102    // Couleur actuelle ou valeur par défaut #DC0044
     103    $theme_color = !empty($barestho_options['barestho_theme_color']) ? $barestho_options['barestho_theme_color'] : 'DC0044';
     104
     105    // Ajouter le # devant si ce n'est pas déjà présent
     106    if (strpos($theme_color, '#') !== 0) {
     107        $theme_color = '#' . $theme_color;
     108    }
     109    ?>
     110    <input type="text"
     111           id="barestho_theme_color"
     112           name="barestho_settings[barestho_theme_color]"
     113           value="<?php echo esc_attr($theme_color); ?>"
     114           class="regular-text my-color-field"
     115           data-default-color="<?php echo esc_attr($theme_color); ?>"
     116           title="<?php esc_attr_e('Primary color actuelle du restaurant', 'barestho'); ?>" />
     117    <script>
     118        jQuery(document).ready(function($){
     119            $('.my-color-field').wpColorPicker({
     120                defaultColor: '<?php echo esc_js($theme_color); ?>'
     121            });
     122        });
     123    </script>
    105124    <?php
    106125}
  • barestho/trunk/vendor/composer/installed.php

    r3347566 r3348523  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '27f228237c8046b7a17a85f7cda9cf7fb6c769f0',
     6        'reference' => '9774e2dfa9dd1d99dbe43c8e466e55110bfd1a8b',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '27f228237c8046b7a17a85f7cda9cf7fb6c769f0',
     16            'reference' => '9774e2dfa9dd1d99dbe43c8e466e55110bfd1a8b',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.