Rename WordPress plugin from Dutchie Menus to Crawlsy Menus v1.3.0

- Renamed plugin to avoid WordPress.org naming conflict causing false update notifications
- Added /downloads static route to serve plugin zip file
- Updated all CSS classes from dutchie- to crawlsy- prefix
- Added plugin zip to backend/public/downloads for hosting
- Plugin available at: https://dispos.crawlsy.com/downloads/crawlsy-menus-1.3.0.zip

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Kelly
2025-12-01 16:29:21 -07:00
parent e345707db2
commit 511629b4e6
10 changed files with 264 additions and 247 deletions

View File

@@ -7,14 +7,14 @@ if (!defined('ABSPATH')) {
exit;
}
class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
class Crawlsy_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
public function get_name() {
return 'dutchie_single_product';
return 'crawlsy_single_product';
}
public function get_title() {
return __('Dutchie Single Product', 'dutchie-menus');
return __('Crawlsy Single Product', 'crawlsy-menus');
}
public function get_icon() {
@@ -31,7 +31,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->start_controls_section(
'content_section',
[
'label' => __('Content', 'dutchie-menus'),
'label' => __('Content', 'crawlsy-menus'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
@@ -39,22 +39,22 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'product_id',
[
'label' => __('Product ID', 'dutchie-menus'),
'label' => __('Product ID', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::NUMBER,
'default' => '',
'description' => __('Enter the product ID to display', 'dutchie-menus'),
'description' => __('Enter the product ID to display', 'crawlsy-menus'),
]
);
$this->add_control(
'layout',
[
'label' => __('Layout', 'dutchie-menus'),
'label' => __('Layout', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'horizontal',
'options' => [
'horizontal' => __('Horizontal', 'dutchie-menus'),
'vertical' => __('Vertical', 'dutchie-menus'),
'horizontal' => __('Horizontal', 'crawlsy-menus'),
'vertical' => __('Vertical', 'crawlsy-menus'),
],
]
);
@@ -65,7 +65,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->start_controls_section(
'display_section',
[
'label' => __('Display Options', 'dutchie-menus'),
'label' => __('Display Options', 'crawlsy-menus'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
@@ -73,10 +73,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_image',
[
'label' => __('Show Image', 'dutchie-menus'),
'label' => __('Show Image', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -85,10 +85,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_price',
[
'label' => __('Show Price', 'dutchie-menus'),
'label' => __('Show Price', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -97,10 +97,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_description',
[
'label' => __('Show Description', 'dutchie-menus'),
'label' => __('Show Description', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -109,10 +109,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_thc',
[
'label' => __('Show THC', 'dutchie-menus'),
'label' => __('Show THC', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -121,10 +121,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_cbd',
[
'label' => __('Show CBD', 'dutchie-menus'),
'label' => __('Show CBD', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -133,10 +133,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_terpenes',
[
'label' => __('Show Terpenes', 'dutchie-menus'),
'label' => __('Show Terpenes', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -145,10 +145,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_effects',
[
'label' => __('Show Effects', 'dutchie-menus'),
'label' => __('Show Effects', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -157,10 +157,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_brand',
[
'label' => __('Show Brand', 'dutchie-menus'),
'label' => __('Show Brand', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -172,7 +172,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->start_controls_section(
'style_section',
[
'label' => __('Style', 'dutchie-menus'),
'label' => __('Style', 'crawlsy-menus'),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
]
);
@@ -180,11 +180,11 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'background_color',
[
'label' => __('Background Color', 'dutchie-menus'),
'label' => __('Background Color', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::COLOR,
'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .dutchie-single-product' => 'background-color: {{VALUE}};',
'{{WRAPPER}} .crawlsy-single-product' => 'background-color: {{VALUE}};',
],
]
);
@@ -192,7 +192,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'border_radius',
[
'label' => __('Border Radius', 'dutchie-menus'),
'label' => __('Border Radius', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
@@ -205,7 +205,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
'size' => 8,
],
'selectors' => [
'{{WRAPPER}} .dutchie-single-product' => 'border-radius: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .crawlsy-single-product' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
@@ -213,11 +213,11 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'text_color',
[
'label' => __('Text Color', 'dutchie-menus'),
'label' => __('Text Color', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::COLOR,
'default' => '#333333',
'selectors' => [
'{{WRAPPER}} .dutchie-single-product' => 'color: {{VALUE}};',
'{{WRAPPER}} .crawlsy-single-product' => 'color: {{VALUE}};',
],
]
);
@@ -229,64 +229,64 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$settings = $this->get_settings_for_display();
if (empty($settings['product_id'])) {
echo '<p>' . __('Please enter a product ID.', 'dutchie-menus') . '</p>';
echo '<p>' . __('Please enter a product ID.', 'crawlsy-menus') . '</p>';
return;
}
$plugin = Dutchie_Menus_Plugin::instance();
$plugin = Crawlsy_Menus_Plugin::instance();
$product = $plugin->fetch_product($settings['product_id']);
if (!$product) {
echo '<p>' . __('Product not found.', 'dutchie-menus') . '</p>';
echo '<p>' . __('Product not found.', 'crawlsy-menus') . '</p>';
return;
}
$layout = $settings['layout'];
?>
<div class="dutchie-single-product dutchie-layout-<?php echo esc_attr($layout); ?>">
<div class="crawlsy-single-product crawlsy-layout-<?php echo esc_attr($layout); ?>">
<?php if ($settings['show_image'] === 'yes' && !empty($product['image_url_full'])): ?>
<div class="dutchie-single-product-image">
<div class="crawlsy-single-product-image">
<img src="<?php echo esc_url($product['image_url_full']); ?>"
alt="<?php echo esc_attr($product['name']); ?>" />
</div>
<?php endif; ?>
<div class="dutchie-single-product-details">
<h2 class="dutchie-single-product-title">
<div class="crawlsy-single-product-details">
<h2 class="crawlsy-single-product-title">
<?php echo esc_html($product['name']); ?>
</h2>
<?php if ($settings['show_brand'] === 'yes' && !empty($product['brand'])): ?>
<div class="dutchie-single-product-brand">
<strong><?php _e('Brand:', 'dutchie-menus'); ?></strong>
<div class="crawlsy-single-product-brand">
<strong><?php _e('Brand:', 'crawlsy-menus'); ?></strong>
<?php echo esc_html($product['brand']); ?>
</div>
<?php endif; ?>
<?php if ($settings['show_description'] === 'yes' && !empty($product['description'])): ?>
<div class="dutchie-single-product-description">
<div class="crawlsy-single-product-description">
<?php echo wp_kses_post(nl2br($product['description'])); ?>
</div>
<?php endif; ?>
<div class="dutchie-single-product-info">
<div class="crawlsy-single-product-info">
<?php if ($settings['show_thc'] === 'yes' && !empty($product['metadata']['thc'])): ?>
<div class="dutchie-info-item">
<strong><?php _e('THC:', 'dutchie-menus'); ?></strong>
<div class="crawlsy-info-item">
<strong><?php _e('THC:', 'crawlsy-menus'); ?></strong>
<span><?php echo esc_html($product['metadata']['thc']); ?></span>
</div>
<?php endif; ?>
<?php if ($settings['show_cbd'] === 'yes' && !empty($product['metadata']['cbd'])): ?>
<div class="dutchie-info-item">
<strong><?php _e('CBD:', 'dutchie-menus'); ?></strong>
<div class="crawlsy-info-item">
<strong><?php _e('CBD:', 'crawlsy-menus'); ?></strong>
<span><?php echo esc_html($product['metadata']['cbd']); ?></span>
</div>
<?php endif; ?>
<?php if ($settings['show_terpenes'] === 'yes' && !empty($product['metadata']['terpenes'])): ?>
<div class="dutchie-info-item dutchie-terpenes">
<strong><?php _e('Terpenes:', 'dutchie-menus'); ?></strong>
<div class="crawlsy-info-item crawlsy-terpenes">
<strong><?php _e('Terpenes:', 'crawlsy-menus'); ?></strong>
<?php if (is_array($product['metadata']['terpenes'])): ?>
<span><?php echo esc_html(implode(', ', $product['metadata']['terpenes'])); ?></span>
<?php else: ?>
@@ -296,8 +296,8 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
<?php endif; ?>
<?php if ($settings['show_effects'] === 'yes' && !empty($product['metadata']['effects'])): ?>
<div class="dutchie-info-item dutchie-effects">
<strong><?php _e('Effects:', 'dutchie-menus'); ?></strong>
<div class="crawlsy-info-item crawlsy-effects">
<strong><?php _e('Effects:', 'crawlsy-menus'); ?></strong>
<?php if (is_array($product['metadata']['effects'])): ?>
<span><?php echo esc_html(implode(', ', $product['metadata']['effects'])); ?></span>
<?php else: ?>
@@ -308,14 +308,14 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
</div>
<?php if ($settings['show_price'] === 'yes' && isset($product['price'])): ?>
<div class="dutchie-single-product-price">
<div class="crawlsy-single-product-price">
$<?php echo number_format($product['price'], 2); ?>
</div>
<?php endif; ?>
<?php if (!$product['in_stock']): ?>
<div class="dutchie-out-of-stock">
<?php _e('Out of Stock', 'dutchie-menus'); ?>
<div class="crawlsy-out-of-stock">
<?php _e('Out of Stock', 'crawlsy-menus'); ?>
</div>
<?php endif; ?>
</div>