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:
@@ -7,14 +7,14 @@ if (!defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
class Crawlsy_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'dutchie_product_grid';
|
||||
return 'crawlsy_product_grid';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __('Dutchie Product Grid', 'dutchie-menus');
|
||||
return __('Crawlsy Product Grid', 'crawlsy-menus');
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
@@ -31,7 +31,7 @@ class Dutchie_Menus_Product_Grid_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,9 +39,9 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
$this->add_control(
|
||||
'store_id',
|
||||
[
|
||||
'label' => __('Store ID', 'dutchie-menus'),
|
||||
'label' => __('Store ID', 'crawlsy-menus'),
|
||||
'type' => \Elementor\Controls_Manager::NUMBER,
|
||||
'default' => get_option('dutchie_default_store_id', 1),
|
||||
'default' => get_option('crawlsy_default_store_id', 1),
|
||||
'min' => 1,
|
||||
]
|
||||
);
|
||||
@@ -49,17 +49,17 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
$this->add_control(
|
||||
'category_id',
|
||||
[
|
||||
'label' => __('Category ID', 'dutchie-menus'),
|
||||
'label' => __('Category ID', 'crawlsy-menus'),
|
||||
'type' => \Elementor\Controls_Manager::NUMBER,
|
||||
'default' => '',
|
||||
'description' => __('Leave empty to show all categories', 'dutchie-menus'),
|
||||
'description' => __('Leave empty to show all categories', 'crawlsy-menus'),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'limit',
|
||||
[
|
||||
'label' => __('Number of Products', 'dutchie-menus'),
|
||||
'label' => __('Number of Products', 'crawlsy-menus'),
|
||||
'type' => \Elementor\Controls_Manager::NUMBER,
|
||||
'default' => 12,
|
||||
'min' => 1,
|
||||
@@ -70,14 +70,14 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
$this->add_control(
|
||||
'columns',
|
||||
[
|
||||
'label' => __('Columns', 'dutchie-menus'),
|
||||
'label' => __('Columns', 'crawlsy-menus'),
|
||||
'type' => \Elementor\Controls_Manager::SELECT,
|
||||
'default' => '3',
|
||||
'options' => [
|
||||
'2' => __('2 Columns', 'dutchie-menus'),
|
||||
'3' => __('3 Columns', 'dutchie-menus'),
|
||||
'4' => __('4 Columns', 'dutchie-menus'),
|
||||
'6' => __('6 Columns', 'dutchie-menus'),
|
||||
'2' => __('2 Columns', 'crawlsy-menus'),
|
||||
'3' => __('3 Columns', 'crawlsy-menus'),
|
||||
'4' => __('4 Columns', 'crawlsy-menus'),
|
||||
'6' => __('6 Columns', 'crawlsy-menus'),
|
||||
],
|
||||
]
|
||||
);
|
||||
@@ -85,10 +85,10 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
$this->add_control(
|
||||
'in_stock_only',
|
||||
[
|
||||
'label' => __('In Stock Only', 'dutchie-menus'),
|
||||
'label' => __('In Stock Only', '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_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
$this->add_control(
|
||||
'search',
|
||||
[
|
||||
'label' => __('Search Filter', 'dutchie-menus'),
|
||||
'label' => __('Search Filter', 'crawlsy-menus'),
|
||||
'type' => \Elementor\Controls_Manager::TEXT,
|
||||
'default' => '',
|
||||
'description' => __('Filter products by name', 'dutchie-menus'),
|
||||
'description' => __('Filter products by name', 'crawlsy-menus'),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -110,7 +110,7 @@ class Dutchie_Menus_Product_Grid_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,
|
||||
]
|
||||
);
|
||||
@@ -118,10 +118,10 @@ class Dutchie_Menus_Product_Grid_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',
|
||||
]
|
||||
@@ -130,10 +130,10 @@ class Dutchie_Menus_Product_Grid_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',
|
||||
]
|
||||
@@ -142,10 +142,10 @@ class Dutchie_Menus_Product_Grid_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',
|
||||
]
|
||||
@@ -154,10 +154,10 @@ class Dutchie_Menus_Product_Grid_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',
|
||||
]
|
||||
@@ -166,10 +166,10 @@ class Dutchie_Menus_Product_Grid_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' => 'no',
|
||||
]
|
||||
@@ -181,7 +181,7 @@ class Dutchie_Menus_Product_Grid_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,
|
||||
]
|
||||
);
|
||||
@@ -189,11 +189,11 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
$this->add_control(
|
||||
'card_background',
|
||||
[
|
||||
'label' => __('Card Background', 'dutchie-menus'),
|
||||
'label' => __('Card Background', 'crawlsy-menus'),
|
||||
'type' => \Elementor\Controls_Manager::COLOR,
|
||||
'default' => '#ffffff',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .dutchie-product-card' => 'background-color: {{VALUE}};',
|
||||
'{{WRAPPER}} .crawlsy-product-card' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
@@ -201,7 +201,7 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
$this->add_control(
|
||||
'card_border_radius',
|
||||
[
|
||||
'label' => __('Border Radius', 'dutchie-menus'),
|
||||
'label' => __('Border Radius', 'crawlsy-menus'),
|
||||
'type' => \Elementor\Controls_Manager::SLIDER,
|
||||
'size_units' => ['px'],
|
||||
'range' => [
|
||||
@@ -214,7 +214,7 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
'size' => 8,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .dutchie-product-card' => 'border-radius: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .crawlsy-product-card' => 'border-radius: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
@@ -222,11 +222,11 @@ class Dutchie_Menus_Product_Grid_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-product-card' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .crawlsy-product-card' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
@@ -251,61 +251,61 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
|
||||
$args['search'] = $settings['search'];
|
||||
}
|
||||
|
||||
$plugin = Dutchie_Menus_Plugin::instance();
|
||||
$plugin = Crawlsy_Menus_Plugin::instance();
|
||||
$products = $plugin->fetch_products($args);
|
||||
|
||||
if (!$products) {
|
||||
echo '<p>' . __('No products found.', 'dutchie-menus') . '</p>';
|
||||
echo '<p>' . __('No products found.', 'crawlsy-menus') . '</p>';
|
||||
return;
|
||||
}
|
||||
|
||||
$columns = $settings['columns'];
|
||||
?>
|
||||
<div class="dutchie-product-grid dutchie-grid-cols-<?php echo esc_attr($columns); ?>">
|
||||
<div class="crawlsy-product-grid crawlsy-grid-cols-<?php echo esc_attr($columns); ?>">
|
||||
<?php foreach ($products as $product): ?>
|
||||
<div class="dutchie-product-card">
|
||||
<div class="crawlsy-product-card">
|
||||
<?php if ($settings['show_image'] === 'yes' && !empty($product['image_url_full'])): ?>
|
||||
<div class="dutchie-product-image">
|
||||
<div class="crawlsy-product-image">
|
||||
<img src="<?php echo esc_url($product['image_url_full']); ?>"
|
||||
alt="<?php echo esc_attr($product['name']); ?>"
|
||||
loading="lazy" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="dutchie-product-content">
|
||||
<h3 class="dutchie-product-title">
|
||||
<div class="crawlsy-product-content">
|
||||
<h3 class="crawlsy-product-title">
|
||||
<?php echo esc_html($product['name']); ?>
|
||||
</h3>
|
||||
|
||||
<?php if ($settings['show_description'] === 'yes' && !empty($product['description'])): ?>
|
||||
<p class="dutchie-product-description">
|
||||
<p class="crawlsy-product-description">
|
||||
<?php echo esc_html(wp_trim_words($product['description'], 15)); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="dutchie-product-meta">
|
||||
<div class="crawlsy-product-meta">
|
||||
<?php if ($settings['show_thc'] === 'yes' && !empty($product['metadata']['thc'])): ?>
|
||||
<span class="dutchie-meta-item dutchie-thc">
|
||||
<span class="crawlsy-meta-item crawlsy-thc">
|
||||
<strong>THC:</strong> <?php echo esc_html($product['metadata']['thc']); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($settings['show_cbd'] === 'yes' && !empty($product['metadata']['cbd'])): ?>
|
||||
<span class="dutchie-meta-item dutchie-cbd">
|
||||
<span class="crawlsy-meta-item crawlsy-cbd">
|
||||
<strong>CBD:</strong> <?php echo esc_html($product['metadata']['cbd']); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($settings['show_price'] === 'yes' && isset($product['price'])): ?>
|
||||
<div class="dutchie-product-price">
|
||||
<div class="crawlsy-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>
|
||||
|
||||
Reference in New Issue
Block a user