Changeset 325536
- Timestamp:
- 04/28/2026 06:40:10 PM (6 months ago)
- Location:
- car-dealership-carkit/1.0.2
- Files:
-
- 4 added
- 5 deleted
- 10 edited
- 1 copied
-
. (copied) (copied from car-dealership-carkit/1.0.1 )
-
assets/images/brand-auren.jpg (added)
-
assets/images/brand-bmv.jpg (deleted)
-
assets/images/brand-ct.jpg (modified) ( previous)
-
assets/images/brand-h.jpg (modified) ( previous)
-
assets/images/brand-honda.jpg (deleted)
-
assets/images/brand-mazda.jpg (deleted)
-
assets/images/brand-revvan.jpg (added)
-
assets/images/brand-solara.jpg (added)
-
assets/images/brand-varion.jpg (added)
-
assets/images/brand-volvo.jpg (deleted)
-
assets/js/welcome.js (modified) (1 diff)
-
functions.php (modified) (6 diffs)
-
inc/patterns/brands-row.php (modified) (6 diffs)
-
inc/patterns/car-footer.php (modified) (1 diff)
-
includes/init.php (modified) (1 diff)
-
includes/ocdi/configuration.php (deleted)
-
includes/welcome.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
car-dealership-carkit/1.0.2/assets/js/welcome.js
r317746 r325536 1 1 jQuery(function ($) { 2 $('.car-dealership-carkit-install- plugin').on('click', function (event) {2 $('.car-dealership-carkit-install-activate-plugin').on('click', function (event) { 3 3 event.preventDefault(); 4 4 var $button = $(this); 5 5 var success = true; 6 7 var slugString = $button.data('slug'); 8 var pluginsRequired = typeof slugString === "string" ? slugString.split(',') : []; 9 const { __ } = wp.i18n; 10 6 11 if ($button.hasClass('updating-message')) { 7 12 return; 8 13 } 9 10 wp.updates.installPlugin({ 11 slug: $button.data('slug') 14 $button.html(importer_params.activating_text).addClass('updating-message'); 15 console.log(pluginsRequired); 16 // step 1 — get all installed plugins 17 wp.apiFetch({ path: '/wp/v2/plugins' }).then(plugins => { 18 19 let chain = Promise.resolve(); 20 21 pluginsRequired.forEach(slug => { 22 23 chain = chain.then(() => { 24 console.log('Processing:', slug); 25 26 const pluginObj = plugins.find(p => p.plugin === slug + '/' + slug); 27 28 if (pluginObj) { 29 console.log('FOUND plugin:', pluginObj.plugin); 30 31 if (pluginObj.status !== 'active') { 32 return car_dealership_carkit_ActivateViaRest(pluginObj.plugin).then(() => { 33 console.log(`Activated: ${pluginObj.plugin}`); 34 $('.data-plugin-status[data-plugin="'+slug+'"]').html( `<span class="label label-success">${__('Activated', 'wpdirectorykit')}</span>`) 35 }); 36 } else { 37 console.log('Already active'); 38 return Promise.resolve(); 39 } 40 41 } else { 42 return car_dealership_carkit_installViaRest(slug).then(() => { 43 console.log(`Installed + activated: ${slug}`); 44 $('.data-plugin-status[data-plugin="'+slug+'"]').html( `<span class="label label-success">${__('Activated', 'directorykit-car-dealer-addon')}</span>`) 45 }); 46 } 47 }); 48 49 }); 50 51 // end 52 chain.then(() => { 53 console.log('All plugins done'); 54 if (success && importer_params.success_redirect == '1') { 55 setInterval(() => { 56 window.location.href = importer_params.importer_url; 57 }, 2000); 58 } else if (success) { 59 $button.parent().append('<a href="'+importer_params.importer_url+'" class="button button-primary">'+importer_params.importer_page+'</a>') 60 $button.remove(); 61 } else { 62 $button.removeClass('updating-message').html(importer_params.error); 63 } 64 }); 65 12 66 }); 13 67 }); 14 68 15 $(document).on('click', '.car-dealership-carkit-activate-plugin', function (event) { 16 event.preventDefault(); 17 var $button = $(this); 18 $button.addClass('updating-message').html( ); 19 20 car_dealership_carkit_activate_plugin($button); 21 22 }); 23 24 $(document).on('wp-plugin-installing', function (event, args) { 25 event.preventDefault(); 26 27 $('.car-dealership-carkit-install-plugin').addClass('updating-message').html(importer_params.installing_text); 28 29 }); 30 31 $(document).on('wp-plugin-install-success', function (event, response) { 32 33 event.preventDefault(); 34 var $button = $('.car-dealership-carkit-install-plugin'); 35 36 $button.html(importer_params.activating_text); 37 38 setTimeout(function () { 39 car_dealership_carkit_activate_plugin($button); 40 }, 1000); 41 42 }); 43 44 function car_dealership_carkit_activate_plugin($button) { 45 $.ajax({ 46 url: ajaxurl, 47 type: 'POST', 48 data: { 49 action: 'carkit_activate_plugin', 50 slug: $button.data('slug'), 51 file: $button.data('filename'), 52 _wpnonce: importer_params.wpnonce, 53 }, 54 }).done(function (result) { 55 var result = JSON.parse(result) 56 if (result.success && importer_params.success_redirect == '1') { 57 window.location.href = importer_params.importer_url; 58 } else if (result.success) { 59 $button.parent().append('<a href="'+importer_params.importer_url+'" class="button button-primary">'+importer_params.success_import+'</a>') 60 $button.remove(); 61 } else { 62 $button.removeClass('updating-message').html(importer_params.error); 63 } 69 function car_dealership_carkit_installViaRest(slug) { 70 const { __ } = wp.i18n; 71 72 return wp.apiFetch({ 73 path: '/wp/v2/plugins', 74 method: 'POST', 75 data: { slug: slug } 76 }) 77 .then(plugin => { 78 $('.data-plugin-status[data-plugin="'+slug+'"]').html( `<span class="label label-success">${__('Installed', 'directorykit-car-dealer-addon')}</span>`) 79 return car_dealership_carkit_ActivateViaRest(plugin.plugin); 80 }) 81 .catch(err => { 82 console.error('Install REST error:', err); 64 83 }); 65 84 } 85 86 function car_dealership_carkit_ActivateViaRest(pluginFile, retry = false) { 87 return jQuery.post(ajaxurl, { 88 action: 'carkit_activate_plugin', 89 plugin: pluginFile, 90 _wpnonce: importer_params.wpnonce, 91 }).then(r => { 92 93 // If return html, based on elementor redirect on install 94 if (typeof r === 'string' && r.startsWith("<")) { 95 console.warn('HTML detected during activation'); 96 97 if (!retry) { 98 console.log('Retrying activation for:', pluginFile); 99 return car_dealership_carkit_ActivateViaRest(pluginFile, true); 100 } 101 102 console.error('Second HTML response — aborting.'); 103 return false; 104 } 105 console.log('AJAX activate result:', r); 106 return r; 107 }); 108 } 109 66 110 }); -
car-dealership-carkit/1.0.2/functions.php
r321344 r325536 27 27 function car_dealership_carkit_setup() 28 28 { 29 add_editor_style('./assets/css/style-shared.css');30 31 /*29 add_editor_style('./assets/css/style-shared.css'); 30 31 /* 32 32 * Load additional block styles. 33 33 * See details on how to add more styles in the readme.txt. 34 34 */ 35 $styled_blocks = ['button', 'quote', 'navigation', 'search'];36 foreach ($styled_blocks as $block_name) {37 $args = array(38 'handle' => "car_dealership_carkit-$block_name",39 'src' => get_theme_file_uri("assets/css/blocks/$block_name.min.css"),40 'path' => get_theme_file_path("assets/css/blocks/$block_name.min.css"),41 );42 // Replace the "core" prefix if you are styling blocks from plugins.43 wp_enqueue_block_style("core/$block_name", $args);44 }45 46 load_theme_textdomain('car-dealership-carkit', get_template_directory() . '/languages');47 48 // Add support for WooCommerce49 add_theme_support('woocommerce');50 add_theme_support('wc-product-gallery-zoom');51 //add_theme_support('wc-product-gallery-lightbox');52 //add_theme_support('wc-product-gallery-slider');53 54 remove_theme_support('wc-product-gallery-zoom');55 // custom logo56 add_theme_support('custom-logo');57 58 // Add theme support for selective refresh for widgets.59 add_theme_support('customize-selective-refresh-widgets');60 add_theme_support("wp-block-styles");61 add_theme_support("responsive-embeds");62 add_theme_support('custom-header');63 add_theme_support("custom-background");64 add_theme_support("align-wide");65 66 /*35 $styled_blocks = ['button', 'quote', 'navigation', 'search']; 36 foreach ($styled_blocks as $block_name) { 37 $args = array( 38 'handle' => "car_dealership_carkit-$block_name", 39 'src' => get_theme_file_uri("assets/css/blocks/$block_name.min.css"), 40 'path' => get_theme_file_path("assets/css/blocks/$block_name.min.css"), 41 ); 42 // Replace the "core" prefix if you are styling blocks from plugins. 43 wp_enqueue_block_style("core/$block_name", $args); 44 } 45 46 load_theme_textdomain('car-dealership-carkit', get_template_directory() . '/languages'); 47 48 // Add support for WooCommerce 49 add_theme_support('woocommerce'); 50 add_theme_support('wc-product-gallery-zoom'); 51 //add_theme_support('wc-product-gallery-lightbox'); 52 //add_theme_support('wc-product-gallery-slider'); 53 54 remove_theme_support('wc-product-gallery-zoom'); 55 // custom logo 56 add_theme_support('custom-logo'); 57 58 // Add theme support for selective refresh for widgets. 59 add_theme_support('customize-selective-refresh-widgets'); 60 add_theme_support("wp-block-styles"); 61 add_theme_support("responsive-embeds"); 62 add_theme_support('custom-header'); 63 add_theme_support("custom-background"); 64 add_theme_support("align-wide"); 65 66 /* 67 67 * Switch default core markup for search form, comment form, and comments 68 68 * to output valid HTML5. 69 69 */ 70 add_theme_support('html5', array(71 'search-form',72 'comment-form',73 'comment-list',74 'gallery',75 'caption',76 ));77 78 // Add default posts and comments RSS feed links to head.79 add_theme_support('automatic-feed-links');80 81 /*70 add_theme_support('html5', array( 71 'search-form', 72 'comment-form', 73 'comment-list', 74 'gallery', 75 'caption', 76 )); 77 78 // Add default posts and comments RSS feed links to head. 79 add_theme_support('automatic-feed-links'); 80 81 /* 82 82 * Let WordPress manage the document title. 83 83 * By adding theme support, we declare that this theme does not use a … … 85 85 * provide it for us. 86 86 */ 87 add_theme_support('title-tag');88 89 90 /*87 add_theme_support('title-tag'); 88 89 90 /* 91 91 * Enable support for Post Thumbnails on posts and pages. 92 92 * 93 93 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ 94 94 */ 95 add_theme_support('post-thumbnails');96 97 // This theme uses wp_nav_menu() in one location.98 register_nav_menus(array(99 'main_menu' => esc_html__('Primary Menu', 'car-dealership-carkit'),100 'footer_links' => esc_html__('Footer Links', 'car-dealership-carkit'),101 'mobile_menu' => esc_html__('Mobile Menu', 'car-dealership-carkit'),102 ));95 add_theme_support('post-thumbnails'); 96 97 // This theme uses wp_nav_menu() in one location. 98 register_nav_menus(array( 99 'main_menu' => esc_html__('Primary Menu', 'car-dealership-carkit'), 100 'footer_links' => esc_html__('Footer Links', 'car-dealership-carkit'), 101 'mobile_menu' => esc_html__('Mobile Menu', 'car-dealership-carkit'), 102 )); 103 103 } 104 104 … … 115 115 function car_dealership_carkit_styles() 116 116 { 117 wp_enqueue_style(118 'car_dealership_carkit-style',119 get_stylesheet_uri(),120 [],121 CAR_DEALERSHIP_CARKIT122 );123 wp_enqueue_style(124 'car_dealership_carkit-shared-styles',125 get_theme_file_uri('assets/css/style-shared.css'),126 [],127 CAR_DEALERSHIP_CARKIT128 );129 130 $remote_url = 'https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Space+Grotesk:wght@300..700&family=Quicksand:wght@300;400;500;600;700&display=swap';131 if (function_exists('wptt_get_webfont_url')) {132 wp_enqueue_style('google-fonts', wptt_get_webfont_url($remote_url), false);133 }134 135 wp_enqueue_style(136 'bootstrap-grid-5',137 get_theme_file_uri('assets/libs/bootstrap-5.3.3/css/bootstrap-grid.min.css'),138 [],139 '5.3.3'140 );141 wp_enqueue_script('bootstrap-5', get_theme_file_uri('assets/libs/bootstrap-5.3.3/js/bootstrap.min.js'), ['jquery'], '5.3.3', true);142 143 wp_enqueue_style(144 'fontawesome-6.5',145 get_theme_file_uri('assets/libs/fontawesome-6.7/css/all.min.css'),146 [],147 '6.7'148 );149 wp_enqueue_style(150 'car_dealership_carkit',151 get_theme_file_uri('assets/css/theme.css'),152 [],153 CAR_DEALERSHIP_CARKIT154 );155 wp_enqueue_style(156 'car_dealership_carkit-responsive',157 get_theme_file_uri('assets/css/theme-responsive.css'),158 [],159 CAR_DEALERSHIP_CARKIT160 );161 162 wp_enqueue_script('car_dealership_carkit', get_theme_file_uri('assets/js/theme.js'), ['jquery'], CAR_DEALERSHIP_CARKIT, true);117 wp_enqueue_style( 118 'car_dealership_carkit-style', 119 get_stylesheet_uri(), 120 [], 121 CAR_DEALERSHIP_CARKIT 122 ); 123 wp_enqueue_style( 124 'car_dealership_carkit-shared-styles', 125 get_theme_file_uri('assets/css/style-shared.css'), 126 [], 127 CAR_DEALERSHIP_CARKIT 128 ); 129 130 $remote_url = 'https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Space+Grotesk:wght@300..700&family=Quicksand:wght@300;400;500;600;700&display=swap'; 131 if (function_exists('wptt_get_webfont_url')) { 132 wp_enqueue_style('google-fonts', wptt_get_webfont_url($remote_url), false); 133 } 134 135 wp_enqueue_style( 136 'bootstrap-grid-5', 137 get_theme_file_uri('assets/libs/bootstrap-5.3.3/css/bootstrap-grid.min.css'), 138 [], 139 '5.3.3' 140 ); 141 wp_enqueue_script('bootstrap-5', get_theme_file_uri('assets/libs/bootstrap-5.3.3/js/bootstrap.min.js'), ['jquery'], '5.3.3', true); 142 143 wp_enqueue_style( 144 'fontawesome-6.5', 145 get_theme_file_uri('assets/libs/fontawesome-6.7/css/all.min.css'), 146 [], 147 '6.7' 148 ); 149 wp_enqueue_style( 150 'car_dealership_carkit', 151 get_theme_file_uri('assets/css/theme.css'), 152 [], 153 CAR_DEALERSHIP_CARKIT 154 ); 155 wp_enqueue_style( 156 'car_dealership_carkit-responsive', 157 get_theme_file_uri('assets/css/theme-responsive.css'), 158 [], 159 CAR_DEALERSHIP_CARKIT 160 ); 161 162 wp_enqueue_script('car_dealership_carkit', get_theme_file_uri('assets/js/theme.js'), ['jquery'], CAR_DEALERSHIP_CARKIT, true); 163 163 } 164 164 add_action('wp_enqueue_scripts', 'car_dealership_carkit_styles'); 165 165 166 function wdk_allow_svg_upload($mimes) { 166 function wdk_allow_svg_upload($mimes) 167 { 167 168 $mimes['svg'] = 'image/svg+xml'; 168 169 return $mimes; … … 194 195 */ 195 196 196 add_action('admin_head', function () {197 add_action('admin_head', function () { 197 198 echo '<style> 198 199 .appearance_page-dashboard #setting-error-tgmpa { … … 239 240 } 240 241 </style>'; 241 });242 }); 242 243 243 244 244 245 add_filter('intermediate_image_sizes_advanced', function ($sizes) { 245 if(get_option('apartment_install_ocdi_images_sizes_enable') == 1) {246 unset($sizes['thumb']);247 unset($sizes['thumbnail']);248 unset($sizes['medium']);249 unset($sizes['large']);250 unset($sizes['medium_large']);251 unset($sizes['big_image_size_threshold']);252 unset($sizes['post-thumbnail']);253 unset($sizes['1536x1536']);254 unset($sizes['nexproperty-footer-thumbnail']);255 unset($sizes['nexproperty-slider-thumbnail']);256 unset($sizes['nexproperty-post-thumbnail']);257 unset($sizes['woocommerce_thumbnail']);258 unset($sizes['woocommerce_single']);259 unset($sizes['woocommerce_gallery_thumbnail']);260 unset($sizes['shop_single']);261 unset($sizes['shop_thumbnail']);262 }263 264 return $sizes;246 if (get_option('apartment_install_ocdi_images_sizes_enable') == 1) { 247 unset($sizes['thumb']); 248 unset($sizes['thumbnail']); 249 unset($sizes['medium']); 250 unset($sizes['large']); 251 unset($sizes['medium_large']); 252 unset($sizes['big_image_size_threshold']); 253 unset($sizes['post-thumbnail']); 254 unset($sizes['1536x1536']); 255 unset($sizes['nexproperty-footer-thumbnail']); 256 unset($sizes['nexproperty-slider-thumbnail']); 257 unset($sizes['nexproperty-post-thumbnail']); 258 unset($sizes['woocommerce_thumbnail']); 259 unset($sizes['woocommerce_single']); 260 unset($sizes['woocommerce_gallery_thumbnail']); 261 unset($sizes['shop_single']); 262 unset($sizes['shop_thumbnail']); 263 } 264 265 return $sizes; 265 266 }); 266 267 267 268 268 269 if (get_option('wdk_theme_carkit_installed') == 1) { 269 270 add_filter( 'template_include', function ( $template ) { 271 // Check if the template is in the /templates/ directory and is an HTML file 272 $html_templates_dir = get_template_directory() . '/templates/'; 273 274 if ( strpos( $template, 'template-canvas.php' ) ) { 275 // No need to escape paths when including, only escape when outputting 276 return get_template_directory() . '/html-template-wrapper.php'; 277 } 278 279 if ( strpos( $template, $html_templates_dir ) === 0 && pathinfo( $template, PATHINFO_EXTENSION ) === 'html' ) { 280 // No need to escape paths when including, only escape when outputting 281 return get_template_directory() . '/html-template-wrapper.php'; 282 } 283 return $template; 284 285 } ); 286 287 add_action('wp_head', function() { 270 271 add_filter('template_include', function ($template) { 272 // Check if the template is in the /templates/ directory and is an HTML file 273 $html_templates_dir = get_template_directory() . '/templates/'; 274 275 if (strpos($template, 'template-canvas.php')) { 276 // No need to escape paths when including, only escape when outputting 277 return get_template_directory() . '/html-template-wrapper.php'; 278 } 279 280 if (strpos($template, $html_templates_dir) === 0 && pathinfo($template, PATHINFO_EXTENSION) === 'html') { 281 // No need to escape paths when including, only escape when outputting 282 return get_template_directory() . '/html-template-wrapper.php'; 283 } 284 return $template; 285 }); 286 287 add_action('wp_head', function () { 288 288 echo '<style> 289 289 /* Inline CSS for wdk_theme_carkit_installed */ … … 298 298 299 299 /** 300 * Add Sub Menu Page to the Layers Menu Item 301 */ 302 if( ! function_exists('carkit_register_submenu_page') ) { 303 function carkit_register_submenu_page(){ 304 add_theme_page( esc_html__( 'Car Dealership Carkit Help' , 'car-dealership-carkit' ), esc_html__( 'Car Dealership Carkit Help' , 'car-dealership-carkit' ), 305 'edit_theme_options', 'car-dealership-carkit-dashboard', 'carkit_get_child_onboarding' ); 306 } 307 } 308 function carkit_get_child_onboarding(){ 309 require_once get_stylesheet_directory() . '/includes/theme-help.php'; 300 * Add Sub Menu Page to the Layers Menu Item 301 */ 302 if (! function_exists('carkit_register_submenu_page')) { 303 function carkit_register_submenu_page() 304 { 305 add_theme_page( 306 esc_html__('Car Dealership Carkit Help', 'car-dealership-carkit'), 307 esc_html__('Car Dealership Carkit Help', 'car-dealership-carkit'), 308 'edit_theme_options', 309 'car-dealership-carkit-dashboard', 310 'carkit_get_child_onboarding' 311 ); 312 } 313 } 314 function carkit_get_child_onboarding() 315 { 316 require_once get_stylesheet_directory() . '/includes/theme-help.php'; 310 317 } 311 318 add_action('admin_menu', 'carkit_register_submenu_page', 60); -
car-dealership-carkit/1.0.2/inc/patterns/brands-row.php
r321344 r325536 15 15 <!-- wp:cover {"overlayColor":"base","isUserOverlayColor":true,"minHeight":144,"minHeightUnit":"px","contentPosition":"center center","isDark":false,"style":{"layout":{"selfStretch":"fixed","flexSize":"190px"},"spacing":{"blockGap":"0"},"border":{"radius":"10px","color":"#adadad","width":"1px"}}} --> 16 16 <div class="wp-block-cover is-light has-border-color wp-container-content-6610010d" style="border-color:#adadad;border-width:1px;border-radius:10px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;min-height:144px;aspect-ratio:unset;"><span aria-hidden="true" class="wp-block-cover__background has-base-background-color has-background-dim-100 has-background-dim"></span><div class="wp-block-cover__inner-container has-global-padding is-layout-constrained wp-container-core-cover-is-layout-8604e950 wp-block-cover-is-layout-constrained"> 17 <figure class="wp-block-image aligncenter size-full is-resized is-style-default" style="margin-top:0;margin-bottom:0"><img src="' . esc_url(get_template_directory_uri()) . '/assets/images/brand- bmv.jpg" alt="" class="wp-image-1902" style="object-fit:cover;width:190px;height:150px"></figure>17 <figure class="wp-block-image aligncenter size-full is-resized is-style-default" style="margin-top:0;margin-bottom:0"><img src="' . esc_url(get_template_directory_uri()) . '/assets/images/brand-varion.jpg" alt="" class="wp-image-1902" style="object-fit:cover;width:190px;height:150px"></figure> 18 18 </div></div> 19 19 <!-- /wp:cover --> 20 20 21 21 <!-- wp:heading {"textAlign":"center","level":3,"style":{"typography":{"fontSize":"18px"},"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"contrast"} --> 22 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px"> Bmv</h3>22 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px">Varion</h3> 23 23 <!-- /wp:heading --> 24 24 </div> … … 31 31 <!-- wp:cover {"overlayColor":"base","isUserOverlayColor":true,"minHeight":144,"minHeightUnit":"px","contentPosition":"center center","isDark":false,"style":{"layout":{"selfStretch":"fixed","flexSize":"190px"},"spacing":{"blockGap":"0"},"border":{"radius":"10px","color":"#adadad","width":"1px"}}} --> 32 32 <div class="wp-block-cover is-light has-border-color wp-container-content-6610010d" style="border-color:#adadad;border-width:1px;border-radius:10px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;min-height:144px;aspect-ratio:unset;"><span aria-hidden="true" class="wp-block-cover__background has-base-background-color has-background-dim-100 has-background-dim"></span><div class="wp-block-cover__inner-container has-global-padding is-layout-constrained wp-container-core-cover-is-layout-8604e950 wp-block-cover-is-layout-constrained"> 33 <figure class="wp-block-image aligncenter size-full is-resized is-style-default" style="margin-top:0;margin-bottom:0"><img src="' . esc_url(get_template_directory_uri()) . '/assets/images/brand- mazda.jpg" alt="" class="wp-image-1902" style="object-fit:cover;width:190px;height:150px"></figure>33 <figure class="wp-block-image aligncenter size-full is-resized is-style-default" style="margin-top:0;margin-bottom:0"><img src="' . esc_url(get_template_directory_uri()) . '/assets/images/brand-solara.jpg" alt="" class="wp-image-1902" style="object-fit:cover;width:190px;height:150px"></figure> 34 34 </div></div> 35 35 <!-- /wp:cover --> 36 36 37 37 <!-- wp:heading {"textAlign":"center","level":3,"style":{"typography":{"fontSize":"18px"},"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"contrast"} --> 38 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px"> Mazda</h3>38 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px">Solara</h3> 39 39 <!-- /wp:heading --> 40 40 </div> … … 47 47 <!-- wp:cover {"overlayColor":"base","isUserOverlayColor":true,"minHeight":144,"minHeightUnit":"px","contentPosition":"center center","isDark":false,"style":{"layout":{"selfStretch":"fixed","flexSize":"190px"},"spacing":{"blockGap":"0"},"border":{"radius":"10px","color":"#adadad","width":"1px"}}} --> 48 48 <div class="wp-block-cover is-light has-border-color wp-container-content-6610010d" style="border-color:#adadad;border-width:1px;border-radius:10px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;min-height:144px;aspect-ratio:unset;"><span aria-hidden="true" class="wp-block-cover__background has-base-background-color has-background-dim-100 has-background-dim"></span><div class="wp-block-cover__inner-container has-global-padding is-layout-constrained wp-container-core-cover-is-layout-8604e950 wp-block-cover-is-layout-constrained"> 49 <figure class="wp-block-image aligncenter size-full is-resized is-style-default" style="margin-top:0;margin-bottom:0"><img src="' . esc_url(get_template_directory_uri()) . '/assets/images/brand- honda.jpg" alt="" class="wp-image-1902" style="object-fit:cover;width:190px;height:150px"></figure>49 <figure class="wp-block-image aligncenter size-full is-resized is-style-default" style="margin-top:0;margin-bottom:0"><img src="' . esc_url(get_template_directory_uri()) . '/assets/images/brand-auren.jpg" alt="" class="wp-image-1902" style="object-fit:cover;width:190px;height:150px"></figure> 50 50 </div></div> 51 51 <!-- /wp:cover --> 52 52 53 53 <!-- wp:heading {"textAlign":"center","level":3,"style":{"typography":{"fontSize":"18px"},"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"contrast"} --> 54 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px"> Honda</h3>54 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px">Auren</h3> 55 55 <!-- /wp:heading --> 56 56 </div> … … 63 63 <!-- wp:cover {"overlayColor":"base","isUserOverlayColor":true,"minHeight":144,"minHeightUnit":"px","contentPosition":"center center","isDark":false,"style":{"layout":{"selfStretch":"fixed","flexSize":"190px"},"spacing":{"blockGap":"0"},"border":{"radius":"10px","color":"#adadad","width":"1px"}}} --> 64 64 <div class="wp-block-cover is-light has-border-color wp-container-content-6610010d" style="border-color:#adadad;border-width:1px;border-radius:10px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;min-height:144px;aspect-ratio:unset;"><span aria-hidden="true" class="wp-block-cover__background has-base-background-color has-background-dim-100 has-background-dim"></span><div class="wp-block-cover__inner-container has-global-padding is-layout-constrained wp-container-core-cover-is-layout-8604e950 wp-block-cover-is-layout-constrained"> 65 <figure class="wp-block-image aligncenter size-full is-resized is-style-default" style="margin-top:0;margin-bottom:0"><img src="' . esc_url(get_template_directory_uri()) . '/assets/images/brand- volvo.jpg" alt="" class="wp-image-1902" style="object-fit:cover;width:190px;height:150px"></figure>65 <figure class="wp-block-image aligncenter size-full is-resized is-style-default" style="margin-top:0;margin-bottom:0"><img src="' . esc_url(get_template_directory_uri()) . '/assets/images/brand-revvan.jpg" alt="" class="wp-image-1902" style="object-fit:cover;width:190px;height:150px"></figure> 66 66 </div></div> 67 67 <!-- /wp:cover --> 68 68 69 69 <!-- wp:heading {"textAlign":"center","level":3,"style":{"typography":{"fontSize":"18px"},"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"contrast"} --> 70 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px"> Volvo</h3>70 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px">Revvan</h3> 71 71 <!-- /wp:heading --> 72 72 </div> … … 84 84 85 85 <!-- wp:heading {"textAlign":"center","level":3,"style":{"typography":{"fontSize":"18px"},"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"contrast"} --> 86 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px"> Citroen</h3>86 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px">Elysian</h3> 87 87 <!-- /wp:heading --> 88 88 </div> … … 100 100 101 101 <!-- wp:heading {"textAlign":"center","level":3,"style":{"typography":{"fontSize":"18px"},"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"contrast"} --> 102 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px"> Hyundai</h3>102 <h3 class="wp-block-heading has-text-align-center has-contrast-color has-text-color has-link-color" style="font-size:18px">Zentor</h3> 103 103 <!-- /wp:heading --> 104 104 </div> -
car-dealership-carkit/1.0.2/inc/patterns/car-footer.php
r321344 r325536 81 81 82 82 <!-- wp:paragraph {"style":{"elements":{"link":{"color":{"text":"var:preset|color|base"}}},"typography":{"fontSize":"16px","fontStyle":"normal","fontWeight":"700"}},"textColor":"base"} --> 83 <p class="has-base-color has-text-color has-link-color" style="font-size:16px;font-style:normal;font-weight:700"><a href="tel:101091812347"></a><a href="mailto: username@domain.com">username@domain.com</a></p>83 <p class="has-base-color has-text-color has-link-color" style="font-size:16px;font-style:normal;font-weight:700"><a href="tel:101091812347"></a><a href="mailto:example@example.com">example@example.com</a></p> 84 84 <!-- /wp:paragraph --></div> 85 85 <!-- /wp:group --> -
car-dealership-carkit/1.0.2/includes/init.php
r317746 r325536 2 2 3 3 locate_template( '/includes/theme-setup.php', true, true ); 4 5 if(file_exists(get_stylesheet_directory() .'/addons/configuration.php')) {6 locate_template( '/addons/configuration.php', true, true );7 } else {8 locate_template( '/includes/ocdi/configuration.php', true, true );9 }10 11 locate_template( '/includes/tgm_pa/configuration.php', true, true ); -
car-dealership-carkit/1.0.2/includes/welcome.php
r317746 r325536 51 51 <?php if ( version_compare( PHP_VERSION, '7.0', '>=' ) || ($elementor_version && version_compare( $elementor_version, '3.7', '<') )) :?> 52 52 <?php if ( file_exists(ABSPATH . 'wp-content/plugins/one-click-demo-import/one-click-demo-import.php') && !in_array( 'one-click-demo-import/one-click-demo-import.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ):?> 53 <p><a data-slug="one-click-demo-import " data-filename="one-click-demo-import" href="#" class="button button-primary car-dealership-carkit-activate-plugin"><?php esc_html_e('Activate Demo Importer Plugin', 'car-dealership-carkit'); ?></a></p>53 <p><a data-slug="one-click-demo-import,directorykit-car-dealer-addon" data-filename="one-click-demo-import" href="#" class="button button-primary car-dealership-carkit-install-activate-plugin"><?php esc_html_e('Activate Demo Importer Plugin', 'car-dealership-carkit'); ?></a></p> 54 54 <?php elseif ( file_exists(ABSPATH . 'wp-content/plugins/one-click-demo-import/one-click-demo-import.php') && in_array( 'one-click-demo-import/one-click-demo-import.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) )):?> 55 55 <p><a href="<?php echo esc_url(get_admin_url() . "themes.php?page=one-click-demo-import");?>" class="button button-primary"><?php esc_html_e('Go to Demo Importer Page', 'car-dealership-carkit'); ?></a></p> 56 56 <?php else:?> 57 <p><a data-slug="one-click-demo-import " data-filename="one-click-demo-import" href="<?php echo esc_url(admin_url('themes.php?page=one-click-demo-import'));?>" class="button button-primary car-dealership-carkit-install-plugin"><?php esc_html_e('Install Demo Importer Plugin', 'car-dealership-carkit'); ?></a></p>57 <p><a data-slug="one-click-demo-import,directorykit-car-dealer-addon" data-filename="one-click-demo-import" href="<?php echo esc_url(admin_url('themes.php?page=one-click-demo-import'));?>" class="button button-primary car-dealership-carkit-install-activate-plugin"><?php esc_html_e('Install Demo Importer Plugin', 'car-dealership-carkit'); ?></a></p> 58 58 <?php endif;?> 59 59 <?php else: ?> … … 100 100 101 101 wp_enqueue_style('car-dealership-carkit-welcome', get_stylesheet_directory_uri() . '/assets/css/welcome.css', array(), '1.0'); 102 wp_enqueue_script('car-dealership-carkit-welcome', get_stylesheet_directory_uri() . '/assets/js/welcome.js', ['jquery','updates' ], '1.0', true );102 wp_enqueue_script('car-dealership-carkit-welcome', get_stylesheet_directory_uri() . '/assets/js/welcome.js', ['jquery','updates','wp-api-fetch'], '1.0', true ); 103 103 wp_localize_script('car-dealership-carkit-welcome', 'importer_params', $importer_params); 104 104 } … … 120 120 } 121 121 122 $slug = isset($_POST['slug']) ? $_POST['slug'] : ''; 123 $file = isset($_POST['file']) ? $_POST['file'] : ''; 124 $success = false; 122 $allowed_plugins = [ 123 'elementor/elementor', 124 'wpdirectorykit/wpdirectorykit', 125 'elementinvader-addons-for-elementor/elementinvader-addons-for-elementor', 126 'elementinvader/elementinvader', 127 'one-click-demo-import/one-click-demo-import', 128 'directorykit-car-dealer-addon/directorykit-car-dealer-addon', 129 ]; 125 130 126 if (!empty($slug) && !empty($file)) { 127 $result = activate_plugin($slug . '/' . $file . '.php'); 131 132 $plugin = sanitize_text_field( wp_unslash( $_POST['plugin'] ) ); 133 if ( ! in_array( $plugin, $allowed_plugins, true ) ) { 134 wp_send_json_error( 'Plugin is not allowed.' ); 135 } 136 137 if (!empty($plugin)) { 138 $result = activate_plugin($plugin . '.php'); 128 139 update_option('carkit_hide_notice', true); 129 140 if (!is_wp_error($result)) { -
car-dealership-carkit/1.0.2/readme.txt
r321344 r325536 5 5 Requires at least: 6.0 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 18 Version: 1.0. 17 Stable tag: 1.0.2 8 Version: 1.0.2 9 9 License: GNU General Public License v2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 309 309 License URL: https://pxhere.com/en/license 310 310 Source: https://pxhere.com/en/photo/1166111 311 312 313 https://chatgpt.com/s/m_69ef3caa05b481919f4e3ee88947eab8 -
car-dealership-carkit/1.0.2/style.css
r321344 r325536 5 5 Author: WPDirectoryKit Team 6 6 Author URI: https://wpdirectorykit.com 7 Version: 1.0. 17 Version: 1.0.2 8 8 Requires at least: 6.3 9 9 Tested up to: 6.9
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)