Changeset 3366255
- Timestamp:
- 09/23/2025 07:13:55 AM (6 months ago)
- Location:
- window-blinds-solution/trunk
- Files:
-
- 4 edited
-
includes/frontend/class-bmfm-frontend.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
vendor/class-plugin-functions.php (modified) (1 diff)
-
window-blinds-solution.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
window-blinds-solution/trunk/includes/frontend/class-bmfm-frontend.php
r3365869 r3366255 149 149 */ 150 150 public static function blindmatrix_shortcode( $attrs, $content = null) { 151 $attrs = shortcode_atts( 152 array( 153 'title' => 'true', 154 'desc' => 'true', 155 'price' => 'true', 156 'products' => '', 157 'style' => 'layout1', 158 'source' => '', 159 ), 160 $attrs, 161 'BlindMatrix' 162 ); 163 $buffer = ''; // default output 164 if ( ! empty( $attrs['source'] ) ) { 165 // Allow only safe characters (letters, numbers, dashes, underscores) 166 $source = sanitize_key( $attrs['source'] ); // prevents ../ and special chars 167 // Build the default plugin template path 168 $default_file = BMFM_TEMPLATE_PATH . '/shortcodes/' . $source . '.php'; 169 // Optional theme override (still sanitized) 170 $theme_file = get_stylesheet_directory() . '/' . basename( plugin_dir_path( __FILE__ ) ) . '/' . $source . '.php'; 171 // Pick theme override if it exists 172 $file = file_exists( $theme_file ) ? $theme_file : $default_file; 173 // Safety checks 174 $real_file = realpath( $file ); 175 // Ensure the file exists and is inside the WordPress installation 176 if ( $real_file && file_exists( $real_file ) && 0 === strpos( $real_file, ABSPATH )) { 177 // Allow developers to filter the final safe path if needed 178 $file = apply_filters( 'blindmatrix_shortcode_path', $real_file, $attrs ); 179 ob_start(); 180 include $file; 181 $buffer = ob_get_clean(); 182 $buffer = do_shortcode( $buffer ); 183 } 184 } 185 return $buffer; 151 return bmfm_get_shortcode_contents($attrs); 186 152 } 187 153 -
window-blinds-solution/trunk/readme.txt
r3365869 r3366255 4 4 Tested up to: 6.8.2 5 5 Requires PHP: 7.4 6 Stable tag: 3. 06 Stable tag: 3.1 7 7 License: GPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 34 34 35 35 == Changelog == 36 37 = 3.1 = 38 39 * Security Vulnerability Fix 36 40 37 41 = 3.0 = -
window-blinds-solution/trunk/vendor/class-plugin-functions.php
r3068307 r3366255 194 194 wp_enqueue_style('select_country_css', 'https://cdnjs.cloudflare.com/ajax/libs/country-select-js/2.1.1/css/countrySelect.min.css', array(), BMFM_VERSION); 195 195 } 196 197 /** 198 * Get shortcode contents. 199 * 200 * @return HTML 201 */ 202 function bmfm_get_shortcode_contents($attrs){ 203 $attrs = shortcode_atts( 204 array( 205 'title' => 'true', 206 'desc' => 'true', 207 'price' => 'true', 208 'products' => '', 209 'style' => 'layout1', 210 'source' => '', 211 ), 212 $attrs, 213 'BlindMatrix' 214 ); 215 $buffer = ''; // default output 216 if ( ! empty( $attrs['source'] ) ) { 217 // Allow only safe characters (letters, numbers, dashes, underscores) 218 $source = $attrs['source']; // prevents ../ and special chars 219 // Build the default plugin template path 220 $default_file = BMFM_TEMPLATE_PATH . 'shortcodes/' . $source . '.php'; 221 // Optional theme override (still sanitized) 222 $theme_file = get_stylesheet_directory() . '/' . basename( plugin_dir_path( __FILE__ ) ) . '/' . $source . '.php'; 223 // Pick theme override if it exists 224 $file = file_exists( $theme_file ) ? $theme_file : $default_file; 225 // Safety checks 226 $real_file = realpath( $file ); 227 // Ensure the file exists and is inside the WordPress installation 228 if ( $real_file && file_exists( $real_file ) && 0 === strpos( $real_file, ABSPATH )) { 229 // Allow developers to filter the final safe path if needed 230 $file = apply_filters( 'blindmatrix_shortcode_path', $real_file, $attrs ); 231 ob_start(); 232 include $file; 233 $buffer = ob_get_clean(); 234 $buffer = do_shortcode( $buffer ); 235 } 236 } 237 238 return $buffer; 239 } -
window-blinds-solution/trunk/window-blinds-solution.php
r3365869 r3366255 4 4 * Plugin Name: BlindMatrix e-Commerce 5 5 * Description: Sell window blinds, curtains and shutters online with the BlindMatrix e-commerce plugin, which converts your entire website into an e-commerce store, allowing you to sell products online 24/7. It features a product visualizer that lets your customers see and virtually feel the products on the window frame. 6 * Version: 3. 06 * Version: 3.1 7 7 * Author: Blindmatrix 8 8 * Requires Plugins: woocommerce … … 46 46 * Plugin version. 47 47 */ 48 public $version = '3. 0';48 public $version = '3.1'; 49 49 50 50 /**
Note: See TracChangeset
for help on using the changeset viewer.