Changeset 2601020
- Timestamp:
- 09/18/2021 09:45:26 AM (5 years ago)
- Location:
- ya-pricing-table
- Files:
-
- 57 added
- 17 edited
-
tags/2.0.0 (added)
-
tags/2.0.0/LICENSE.txt (added)
-
tags/2.0.0/README.txt (added)
-
tags/2.0.0/Type (added)
-
tags/2.0.0/Type/Column.php (added)
-
tags/2.0.0/Type/Feature.php (added)
-
tags/2.0.0/Type/PriceTable.php (added)
-
tags/2.0.0/Type/Type.php (added)
-
tags/2.0.0/admin (added)
-
tags/2.0.0/admin/class-yapt-admin.php (added)
-
tags/2.0.0/admin/css (added)
-
tags/2.0.0/admin/css/yapt-admin.css (added)
-
tags/2.0.0/admin/index.php (added)
-
tags/2.0.0/admin/js (added)
-
tags/2.0.0/admin/js/yapt-admin.js (added)
-
tags/2.0.0/admin/partials (added)
-
tags/2.0.0/admin/partials/yapt-admin-add-page.php (added)
-
tags/2.0.0/admin/partials/yapt-admin-display.php (added)
-
tags/2.0.0/admin/partials/yapt-admin-edit.php (added)
-
tags/2.0.0/includes (added)
-
tags/2.0.0/includes/class-yapt-activator.php (added)
-
tags/2.0.0/includes/class-yapt-deactivator.php (added)
-
tags/2.0.0/includes/class-yapt-i18n.php (added)
-
tags/2.0.0/includes/class-yapt-loader.php (added)
-
tags/2.0.0/includes/class-yapt.php (added)
-
tags/2.0.0/includes/db_data.php (added)
-
tags/2.0.0/includes/index.php (added)
-
tags/2.0.0/includes/yapt_list.php (added)
-
tags/2.0.0/index.php (added)
-
tags/2.0.0/languages (added)
-
tags/2.0.0/languages/yapt.pot (added)
-
tags/2.0.0/public (added)
-
tags/2.0.0/public/class-yapt-public.php (added)
-
tags/2.0.0/public/css (added)
-
tags/2.0.0/public/css/yapt-public.css (added)
-
tags/2.0.0/public/index.php (added)
-
tags/2.0.0/public/js (added)
-
tags/2.0.0/public/js/yapt-public.js (added)
-
tags/2.0.0/public/partials (added)
-
tags/2.0.0/public/partials/yapt-public-display.php (added)
-
tags/2.0.0/templates (added)
-
tags/2.0.0/templates/aanya (added)
-
tags/2.0.0/templates/aanya/aanya-head-highlight.svg (added)
-
tags/2.0.0/templates/aanya/aanya-head.svg (added)
-
tags/2.0.0/templates/aanya/default.css (added)
-
tags/2.0.0/templates/aanya/default.html (added)
-
tags/2.0.0/templates/aanya/default.png (added)
-
tags/2.0.0/templates/default (added)
-
tags/2.0.0/templates/default/default.css (added)
-
tags/2.0.0/templates/default/default.html (added)
-
tags/2.0.0/templates/default/default.jpeg (added)
-
tags/2.0.0/templates/yapt2021 (added)
-
tags/2.0.0/templates/yapt2021/yapt2021.css (added)
-
tags/2.0.0/templates/yapt2021/yapt2021.html (added)
-
tags/2.0.0/templates/yapt2021/yapt2021.png (added)
-
tags/2.0.0/uninstall.php (added)
-
tags/2.0.0/yapt.php (added)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/Type/Column.php (modified) (5 diffs)
-
trunk/Type/PriceTable.php (modified) (1 diff)
-
trunk/admin/class-yapt-admin.php (modified) (1 diff)
-
trunk/admin/css/yapt-admin.css (modified) (1 diff)
-
trunk/admin/partials/yapt-admin-add-page.php (modified) (4 diffs)
-
trunk/admin/partials/yapt-admin-edit.php (modified) (5 diffs)
-
trunk/includes/class-yapt-activator.php (modified) (5 diffs)
-
trunk/includes/db_data.php (modified) (1 diff)
-
trunk/public/class-yapt-public.php (modified) (2 diffs)
-
trunk/templates/aanya/default.css (modified) (2 diffs)
-
trunk/templates/aanya/default.html (modified) (1 diff)
-
trunk/templates/default/default.css (modified) (2 diffs)
-
trunk/templates/default/default.html (modified) (1 diff)
-
trunk/templates/yapt2021/yapt2021.css (modified) (2 diffs)
-
trunk/templates/yapt2021/yapt2021.html (modified) (1 diff)
-
trunk/yapt.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ya-pricing-table/trunk/README.txt
r2587959 r2601020 5 5 Requires at least: 5.0 6 6 Tested up to: 5.8 7 Stable tag: 1.1.0 7 Requires PHP: 7.4 8 Stable tag: 2.0.0 8 9 License: GPLv2 or later 9 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 11 11 Simple WordPress plugin to create pricing tables in post or pages easily with no programming knowledge.12 Easily create and publish beautiful pricing tables with no programming knowledge using Yet Another Pricing Table Plugin by bCripts. 12 13 13 14 == Description == 14 15 15 Simple WordPress plugin to create pricing tables in post or pages easily with no programming knowledge. With this plugin you can also create or update templates located inside **templates** folder of the plugin directory (if you know how to edit html and css). We are continuously planning to improve our plugin and make it one of the best pricing table plugins. 16 Simple WordPress plugin to create pricing tables in post or pages easily with no programming knowledge. Easily create and publish beautiful pricing tables with no programming knowledge using Yet Another Pricing Table Plugin by bCripts. Alter content, select a desired template, and publish on the website. 17 18 = Features = 19 20 * Build beautiful WordPress pricing tables in minutes. 21 * Clean Codes and fast loading. 22 * Works with any WordPress theme. 23 * Responsive pricing tables - responds to fit any device. 24 * Gutenberg / WordPress 5.8 compatible. Not just compatible. 25 * Intuitive User Interface. 26 * Unlimited pricing tables, columns and rows 27 * Preset Templates 28 * Featured Column – draw people to your most popular products by highlighting a featured column. 29 * Shortcode support for use with classic editor and page builders. 16 30 17 31 == Installation == … … 49 63 == Changelog == 50 64 65 = 2.0.0 = 66 * Price is further extended to currency (supporting all countries), price and price suffix. 67 51 68 = 1.1.0 = 52 69 * Added new template named Aanya … … 54 71 = 1.0.0 = 55 72 * First version of YA Pricing Tables 73 74 == Upgrade Notice == 75 76 = 2.0.0 = 77 Price is further extended to currency (supporting all countries), price and price suffix. -
ya-pricing-table/trunk/Type/Column.php
r2586259 r2601020 7 7 public string $highlighted; 8 8 public string $description; 9 public string $column_price_currency; 9 10 public string $column_price; 11 public string $column_price_suffix; 10 12 public string $column_button_url; 11 13 public string $column_button_face_text; … … 22 24 * @param array $features 23 25 */ 24 public function __construct(int $column_id, string $column_title, string $highlighted, string $description, string $column_price , string $column_button_url, string $column_button_face_text, array $features)26 public function __construct(int $column_id, string $column_title, string $highlighted, string $description, string $column_price_currency, string $column_price, string $column_price_suffix, string $column_button_url, string $column_button_face_text, array $features) 25 27 { 26 28 $this->column_id = $column_id; … … 28 30 $this->highlighted = $highlighted; 29 31 $this->description = $description; 32 $this->column_price_currency = $column_price_currency; 30 33 $this->column_price = $column_price; 34 $this->column_price_suffix = $column_price_suffix; 31 35 $this->column_button_url = $column_button_url; 32 36 $this->column_button_face_text = $column_button_face_text; … … 44 48 $column_id = (int)sanitize_text_field($column_data_array['column_id'] ?? 0); 45 49 $description = sanitize_text_field($column_data_array['description']); 50 $column_price_currency = sanitize_text_field($column_data_array['column_price_currency']); 46 51 $column_price = sanitize_text_field($column_data_array['column_price']); 52 $column_price_suffix = sanitize_text_field($column_data_array['column_price_suffix']); 47 53 $column_button_url = sanitize_text_field($column_data_array['column_button_url']); 48 54 $column_button_face_text = sanitize_text_field($column_data_array['column_button_face_text']); … … 66 72 } 67 73 68 return new Column($column_id, $column_title, $highlighted, $description, $column_price , $column_button_url, $column_button_face_text, $feature_array);74 return new Column($column_id, $column_title, $highlighted, $description, $column_price_currency, $column_price, $column_price_suffix, $column_button_url, $column_button_face_text, $feature_array); 69 75 } 70 76 } -
ya-pricing-table/trunk/Type/PriceTable.php
r2586259 r2601020 36 36 $price_table_id = (int)sanitize_text_field($price_table_data['price_table_id'] ?? 0); 37 37 $custom_styles = str_replace("/* styles here */", '', sanitize_textarea_field($price_table_data['custom_styles'])); 38 $highlighted_key = sanitize_text_field($price_table_data['highlighted'] );38 $highlighted_key = sanitize_text_field($price_table_data['highlighted'] ?? ''); 39 39 40 40 if (empty($pricing_table_title) || empty($template_id)) { -
ya-pricing-table/trunk/admin/class-yapt-admin.php
r2586259 r2601020 209 209 if (empty($column->column_id)) { 210 210 // insert into yapt_columns 211 $wpdb->insert($wpdb->prefix . 'yapt_columns', ['column_title' => $column->column_title, 'description' => $column->description, 'highlighted' => $column->highlighted, 'table_id' => $price_table_obj->price_table_id, 'price_ text' => $column->column_price, 'ctoa_btn_text' => $column->column_button_face_text, 'ctoa_btn_link' => $column->column_button_url, 'created_at' => $now, 'updated_at' => $now]);211 $wpdb->insert($wpdb->prefix . 'yapt_columns', ['column_title' => $column->column_title, 'description' => $column->description, 'highlighted' => $column->highlighted, 'table_id' => $price_table_obj->price_table_id, 'price_currency' => $column->column_price_currency, 'price' => $column->column_price, 'price_suffix' => $column->column_price_suffix, 'ctoa_btn_text' => $column->column_button_face_text, 'ctoa_btn_link' => $column->column_button_url, 'created_at' => $now, 'updated_at' => $now]); 212 212 $column->column_id = $wpdb->insert_id; 213 213 } else { 214 214 // update yapt_columns 215 $wpdb->update($wpdb->prefix . 'yapt_columns', ['column_title' => $column->column_title, 'description' => $column->description, 'highlighted' => $column->highlighted, 'table_id' => $price_table_obj->price_table_id, 'price_ text' => $column->column_price, 'ctoa_btn_text' => $column->column_button_face_text, 'ctoa_btn_link' => $column->column_button_url, 'created_at' => $now, 'updated_at' => $now], ['id' => $column->column_id]);215 $wpdb->update($wpdb->prefix . 'yapt_columns', ['column_title' => $column->column_title, 'description' => $column->description, 'highlighted' => $column->highlighted, 'table_id' => $price_table_obj->price_table_id, 'price_currency' => $column->column_price_currency, 'price' => $column->column_price, 'price_suffix' => $column->column_price_suffix, 'ctoa_btn_text' => $column->column_button_face_text, 'ctoa_btn_link' => $column->column_button_url, 'created_at' => $now, 'updated_at' => $now], ['id' => $column->column_id]); 216 216 } 217 217 -
ya-pricing-table/trunk/admin/css/yapt-admin.css
r2586259 r2601020 163 163 164 164 .yapt_table_row input[type="text"] { 165 width: 100%; 166 padding: 3px 8px; 167 border: 1px solid #ddd; 168 margin-top: 3px; 169 border-radius: 0; 170 } 171 172 .yapt_table_row select { 165 173 width: 100%; 166 174 padding: 3px 8px; -
ya-pricing-table/trunk/admin/partials/yapt-admin-add-page.php
r2586259 r2601020 15 15 global $wpdb; 16 16 $results_templates = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}yapt_templates", ARRAY_A); 17 18 $currencies = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}yapt_currency", ARRAY_A); 17 19 ?> 18 20 <div class="wrap"> … … 106 108 <script type="text/javascript"> 107 109 let computed_feature_id; 110 let computed_column_id; 111 let price_suffixs = ['Per hour', 'Per day', 'Per month', 'Per year', 'Per night']; 112 let option = ''; 113 price_suffixs.forEach(function(price_suffix) { 114 option += "<option value='" + price_suffix + "'>" + price_suffix + "</option>"; 115 }); 116 117 <?php 118 $currency_options = ''; 119 $selected_currency = 'United States of America'; 120 foreach($currencies as $currency) { 121 $select = ''; 122 if($selected_currency === $currency['country']) { 123 $select = "selected = 'selected'"; 124 } 125 $currency_options .= "<option value='" . $currency['country'] . "' ".$select.">" . $currency['country'].' ('.$currency['code'] . ")</option>"; 126 } 127 ?> 108 128 109 129 function add_feature(column_id) { … … 135 155 function add_column() { 136 156 //console.log('add column called'); 137 letcomputed_column_id = parseInt(jQuery("#column_count").val());157 computed_column_id = parseInt(jQuery("#column_count").val()); 138 158 //console.log('new column id: ' + computed_column_id); 159 160 let price_suffix = "<select name='fields[" + computed_column_id + "][column_price_suffix]'>" + option + "</select>"; 161 162 let currency_select = "<select name='fields[" + computed_column_id + "][column_price_currency]'><?php echo $currency_options;?></select>"; 139 163 140 164 let new_column_value = "<div class='yapt_table_column' id='tbl_column" + computed_column_id + 141 165 "'><div class='yapt_table_row'><label>Name</label><input type='text' required='required' name='fields[" + computed_column_id + 142 166 "][column_title]'/></div><div class='yapt_table_row'><label>Short description</label><textarea class='short_description' name='fields[" + computed_column_id + 143 "][description]'></textarea></div><div class='yapt_table_row'><label>Pricing</label><input type='text' name='fields[" + 144 computed_column_id + 145 "][column_price]'/></div><div class='yapt_table_row'><label>Button face text</label><input type='text' name='fields[" + 167 "][description]'></textarea></div>" + 168 "<div class='yapt_table_row'><label>Currency</label>" + currency_select + "</div>" + 169 "<div class='yapt_table_row'><label>Price</label><input type='text' name='fields[" + computed_column_id + "][column_price]'/></div>" + 170 "<div class='yapt_table_row'><label>Price suffix</label>"+price_suffix+"</div>" + 171 "<div class='yapt_table_row'><label>Button face text</label><input type='text' name='fields[" + 146 172 computed_column_id + 147 173 "][column_button_face_text]'/></div><div class='yapt_table_row'><label>Button url</label><input type='text' name='fields[" + … … 165 191 // add first column 166 192 add_column(); 193 194 jQuery(document).on('change', 'select[name*="[column_price_currency]"]', function() { 195 jQuery('select[name*="[column_price_currency]"]').val(this.value); 196 }); 167 197 </script> -
ya-pricing-table/trunk/admin/partials/yapt-admin-edit.php
r2586259 r2601020 15 15 global $wpdb; 16 16 $results_templates = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}yapt_templates", ARRAY_A); 17 18 $currencies = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}yapt_currency", ARRAY_A); 17 19 ?> 18 20 <div class="wrap"> … … 115 117 let computed_feature_id; 116 118 let computed_column_id; 119 let price_suffixs = ['Per hour', 'Per day', 'Per month', 'Per year', 'Per night']; 120 let option = ''; 121 price_suffixs.forEach(function(price_suffix) { 122 option += "<option value='" + price_suffix + "'>" + price_suffix + "</option>"; 123 }); 124 125 <?php 126 $currency_options = ''; 127 $selected_currency = 'United States of America'; 128 foreach($currencies as $currency) { 129 $select = ''; 130 if($selected_currency === $currency['country']) { 131 $select = "selected = 'selected'"; 132 } 133 $currency_options .= "<option value='" . $currency['country'] . "' ".$select.">" . $currency['country'].' ('.$currency['code'] . ")</option>"; 134 } 135 ?> 117 136 118 137 function add_feature(column_id) { … … 148 167 //console.log('new column id: ' + computed_column_id); 149 168 169 let price_suffix = "<select name='fields[" + computed_column_id + "][column_price_suffix]'>" + option + "</select>"; 170 171 let currency_select = "<select name='fields[" + computed_column_id + "][column_price_currency]'><?php echo $currency_options;?></select>"; 172 150 173 let new_column_value = "<div class='yapt_table_column' id='tbl_column" + computed_column_id + 151 174 "'><div class='yapt_table_row'><label>Name</label><input type='hidden' name='fields[" + computed_column_id + 152 175 "][column_id]' /><input type='text' required='required' name='fields[" + computed_column_id + 153 176 "][column_title]'/></div><div class='yapt_table_row'><label>Short description</label><textarea class='short_description' name='fields[" + computed_column_id + 154 "][description]'></textarea></div> <div class='yapt_table_row'><label>Pricing</label><input type='text' name='fields[" +155 computed_column_id+156 " ][column_price]'/></div><div class='yapt_table_row'><label>Button face text</label><input type='text' name='fields[" +157 computed_column_id+158 " ][column_button_face_text]'/></div><div class='yapt_table_row'><label>Button url</label><input type='text' name='fields[" +159 computed_column_id+160 " ][column_button_url]'/></div><div class='yapt_table_row yapt_table_row_features_head'><span class='features_title'>Features</span><a href='javascript:;' class='add_feature' onclick='add_feature(" +177 "][description]'></textarea></div>" + 178 "<div class='yapt_table_row'><label>Currency</label>"+currency_select+"</div>" + 179 "<div class='yapt_table_row'><label>Price</label><input type='text' name='fields[" + computed_column_id +"][column_price]'/></div>" + 180 "<div class='yapt_table_row'><label>Price suffix</label>" + price_suffix + "</div>" + 181 "<div class='yapt_table_row'><label>Button face text</label><input type='text' name='fields[" + computed_column_id + "][column_button_face_text]'/></div>" + 182 "<div class='yapt_table_row'><label>Button url</label><input type='text' name='fields[" + computed_column_id + "][column_button_url]'/></div>" + 183 "<div class='yapt_table_row yapt_table_row_features_head'><span class='features_title'>Features</span><a href='javascript:;' class='add_feature' onclick='add_feature(" + 161 184 computed_column_id + 162 185 ")'><span class='dashicons dashicons-plus-alt'></span>add feature</a></div><input type='hidden' name='column" + … … 184 207 jQuery("input[name='fields[" + column_id_value + "][column_title]']").val('<?php echo esc_html($col['column_title']);?>'); 185 208 jQuery("textarea[name='fields[" + column_id_value + "][description]']").val('<?php echo esc_html($col['description']);?>'); 186 jQuery("input[name='fields[" + column_id_value + "][column_price]']").val('<?php echo esc_html($col['price_text']);?>'); 209 jQuery("select[name='fields[" + column_id_value + "][column_price_currency]']").val('<?php echo esc_html($col['price_currency']);?>').change(); 210 jQuery("input[name='fields[" + column_id_value + "][column_price]']").val('<?php echo esc_html($col['price']);?>'); 211 jQuery("select[name='fields[" + column_id_value + "][column_price_suffix]']").val('<?php echo esc_html($col['price_suffix']);?>').change(); 187 212 jQuery("input[name='fields[" + column_id_value + "][column_button_face_text]']").val('<?php echo esc_html($col['ctoa_btn_text']);?>'); 188 213 jQuery("input[name='fields[" + column_id_value + "][column_button_url]']").val('<?php echo esc_url($col['ctoa_btn_link']);?>'); … … 211 236 } 212 237 ?> 238 jQuery(document).on('change', 'select[name*="[column_price_currency]"]', function() { 239 jQuery('select[name*="[column_price_currency]"]').val(this.value); 240 }); 213 241 </script> -
ya-pricing-table/trunk/includes/class-yapt-activator.php
r2587868 r2601020 73 73 `updated_at` DATETIME NOT NULL, 74 74 PRIMARY KEY id (id) 75 )$charset_collate;";76 dbDelta($sql);75 )$charset_collate;"; 76 dbDelta($sql); 77 77 78 78 // insert_query … … 99 99 FOREIGN KEY(template_id) 100 100 REFERENCES " . $wpdb->prefix . "yapt_templates (id) 101 )$charset_collate;";102 dbDelta($sql);101 )$charset_collate;"; 102 dbDelta($sql); 103 103 } 104 104 … … 113 113 `description` TEXT NULL, 114 114 `table_id` INT(11) NOT NULL, 115 `price_text` VARCHAR(255) NOT NULL, 115 `price_currency` VARCHAR(255) NOT NULL, 116 `price` VARCHAR(255) NOT NULL, 117 `price_suffix` VARCHAR(255) NOT NULL, 116 118 `ctoa_btn_text` VARCHAR(255) NOT NULL,/** ctoa => call to action */ 117 119 `ctoa_btn_link` VARCHAR(255) NOT NULL, … … 122 124 REFERENCES " . $wpdb->prefix . "yapt_pricing_tables (id) 123 125 ON DELETE CASCADE 124 )$charset_collate;";126 )$charset_collate;"; 125 127 dbDelta($sql); 126 128 } … … 141 143 REFERENCES " . $wpdb->prefix . "yapt_columns (id) 142 144 ON DELETE CASCADE 143 )$charset_collate;"; 145 )$charset_collate;"; 146 dbDelta($sql); 147 } 148 149 // yapt_features 150 $table_name = $wpdb->prefix . 'yapt_currency'; 151 $charset_collate = $wpdb->get_charset_collate(); 152 if ($wpdb->get_var("show tables like '{$table_name}'") != $table_name) { 153 $sql = "CREATE TABLE IF NOT EXISTS " . $table_name . " ( 154 `country` VARCHAR(100) NOT NULL, 155 `currency` VARCHAR(100), 156 `code` VARCHAR(100), 157 `symbol` VARCHAR(100), 158 PRIMARY KEY (`country`), 159 UNIQUE INDEX `country_UNIQUE` (`country` ASC) 160 )$charset_collate;"; 144 161 dbDelta($sql); 162 163 $sql_insert = <<<CUR 164 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Albania', 'Leke', 'ALL', 'Lek'); 165 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Afghanistan', 'Afghanis', 'AFN', '؋'); 166 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Argentina', 'Pesos', 'ARS', '$'); 167 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Aruba', 'Guilders', 'AWG', 'ƒ'); 168 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Australia', 'Dollars', 'AUD', '$'); 169 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Azerbaijan', 'New Manats', 'AZN', 'ман'); 170 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Bahamas', 'Dollars', 'BSD', '$'); 171 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Barbados', 'Dollars', 'BBD', '$'); 172 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Belarus', 'Rubles', 'BYR', 'p.'); 173 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Belgium', 'Euro', 'EUR', '€'); 174 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Beliz', 'Dollars', 'BZD', 'BZ$'); 175 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Bermuda', 'Dollars', 'BMD', '$'); 176 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Bolivia', 'Bolivianos', 'BOB', '\$b'); 177 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Bosnia and Herzegovina', 'Convertible Marka', 'BAM', 'KM'); 178 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Botswana', 'Pula', 'BWP', 'P'); 179 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Bulgaria', 'Leva', 'BGN', 'лв'); 180 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Brazil', 'Reais', 'BRL', 'R$'); 181 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Britain (United Kingdom)', 'Pounds', 'GBP', '£'); 182 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Brunei Darussalam', 'Dollars', 'BND', '$'); 183 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Cambodia', 'Riels', 'KHR', '៛'); 184 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Canada', 'Dollars', 'CAD', '$'); 185 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Cayman Islands', 'Dollars', 'KYD', '$'); 186 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Chile', 'Pesos', 'CLP', '$'); 187 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('China', 'Yuan Renminbi', 'CNY', '¥'); 188 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Colombia', 'Pesos', 'COP', '$'); 189 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Costa Rica', 'Colón', 'CRC', '₡'); 190 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Croatia', 'Kuna', 'HRK', 'kn'); 191 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Cuba', 'Pesos', 'CUP', '₱'); 192 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Cyprus', 'Euro', 'EUR', '€'); 193 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Czech Republic', 'Koruny', 'CZK', 'Kč'); 194 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Denmark', 'Kroner', 'DKK', 'kr'); 195 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Dominican Republic', 'Pesos', 'DOP ', 'RD$'); 196 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('East Caribbean', 'Dollars', 'XCD', '$'); 197 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Egypt', 'Pounds', 'EGP', '£'); 198 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('El Salvador', 'Colones', 'SVC', '$'); 199 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('England (United Kingdom)', 'Pounds', 'GBP', '£'); 200 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Euro', 'Euro', 'EUR', '€'); 201 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Falkland Islands', 'Pounds', 'FKP', '£'); 202 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Fiji', 'Dollars', 'FJD', '$'); 203 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('France', 'Euro', 'EUR', '€'); 204 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Ghana', 'Cedis', 'GHC', '¢'); 205 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Gibraltar', 'Pounds', 'GIP', '£'); 206 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Greece', 'Euro', 'EUR', '€'); 207 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Guatemala', 'Quetzales', 'GTQ', 'Q'); 208 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Guernsey', 'Pounds', 'GGP', '£'); 209 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Guyana', 'Dollars', 'GYD', '$'); 210 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Holland (Netherlands)', 'Euro', 'EUR', '€'); 211 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Honduras', 'Lempiras', 'HNL', 'L'); 212 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Hong Kong', 'Dollars', 'HKD', '$'); 213 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Hungary', 'Forint', 'HUF', 'Ft'); 214 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Iceland', 'Kronur', 'ISK', 'kr'); 215 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('India', 'Rupees', 'INR', '₹'); 216 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Indonesia', 'Rupiahs', 'IDR', 'Rp'); 217 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Iran', 'Rials', 'IRR', '﷼'); 218 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Ireland', 'Euro', 'EUR', '€'); 219 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Isle of Man', 'Pounds', 'IMP', '£'); 220 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Israel', 'New Shekels', 'ILS', '₪'); 221 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Italy', 'Euro', 'EUR', '€'); 222 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Jamaica', 'Dollars', 'JMD', 'J$'); 223 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Japan', 'Yen', 'JPY', '¥'); 224 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Jersey', 'Pounds', 'JEP', '£'); 225 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Kazakhstan', 'Tenge', 'KZT', 'лв'); 226 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Korea (North)', 'Won', 'KPW', '₩'); 227 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Korea (South)', 'Won', 'KRW', '₩'); 228 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Kyrgyzstan', 'Soms', 'KGS', 'лв'); 229 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Laos', 'Kips', 'LAK', '₭'); 230 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Latvia', 'Lati', 'LVL', 'Ls'); 231 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Lebanon', 'Pounds', 'LBP', '£'); 232 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Liberia', 'Dollars', 'LRD', '$'); 233 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Liechtenstein', 'Switzerland Francs', 'CHF', 'CHF'); 234 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Lithuania', 'Litai', 'LTL', 'Lt'); 235 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Luxembourg', 'Euro', 'EUR', '€'); 236 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Macedonia', 'Denars', 'MKD', 'ден'); 237 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Malaysia', 'Ringgits', 'MYR', 'RM'); 238 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Malta', 'Euro', 'EUR', '€'); 239 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Mauritius', 'Rupees', 'MUR', '₨'); 240 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Mexico', 'Pesos', 'MXN', '$'); 241 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Mongolia', 'Tugriks', 'MNT', '₮'); 242 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Mozambique', 'Meticais', 'MZN', 'MT'); 243 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Namibia', 'Dollars', 'NAD', '$'); 244 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Nepal', 'Rupees', 'NPR', '₨'); 245 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Netherlands Antilles', 'Guilders', 'ANG', 'ƒ'); 246 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Netherlands', 'Euro', 'EUR', '€'); 247 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('New Zealand', 'Dollars', 'NZD', '$'); 248 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Nicaragua', 'Cordobas', 'NIO', 'C$'); 249 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Nigeria', 'Nairas', 'NGN', '₦'); 250 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('North Korea', 'Won', 'KPW', '₩'); 251 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Norway', 'Krone', 'NOK', 'kr'); 252 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Oman', 'Rials', 'OMR', '﷼'); 253 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Pakistan', 'Rupees', 'PKR', '₨'); 254 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Panama', 'Balboa', 'PAB', 'B/.'); 255 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Paraguay', 'Guarani', 'PYG', 'Gs'); 256 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Peru', 'Nuevos Soles', 'PEN', 'S/.'); 257 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Philippines', 'Pesos', 'PHP', 'Php'); 258 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Poland', 'Zlotych', 'PLN', 'zł'); 259 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Qatar', 'Rials', 'QAR', '﷼'); 260 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Romania', 'New Lei', 'RON', 'lei'); 261 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Russia', 'Rubles', 'RUB', 'руб'); 262 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Saint Helena', 'Pounds', 'SHP', '£'); 263 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Saudi Arabia', 'Riyals', 'SAR', '﷼'); 264 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Serbia', 'Dinars', 'RSD', 'Дин.'); 265 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Seychelles', 'Rupees', 'SCR', '₨'); 266 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Singapore', 'Dollars', 'SGD', '$'); 267 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Slovenia', 'Euro', 'EUR', '€'); 268 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Solomon Islands', 'Dollars', 'SBD', '$'); 269 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Somalia', 'Shillings', 'SOS', 'S'); 270 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('South Africa', 'Rand', 'ZAR', 'R'); 271 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('South Korea', 'Won', 'KRW', '₩'); 272 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Spain', 'Euro', 'EUR', '€'); 273 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Sri Lanka', 'Rupees', 'LKR', '₨'); 274 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Sweden', 'Kronor', 'SEK', 'kr'); 275 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Switzerland', 'Francs', 'CHF', 'CHF'); 276 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Suriname', 'Dollars', 'SRD', '$'); 277 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Syria', 'Pounds', 'SYP', '£'); 278 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Taiwan', 'New Dollars', 'TWD', 'NT$'); 279 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Thailand', 'Baht', 'THB', '฿'); 280 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Trinidad and Tobago', 'Dollars', 'TTD', 'TT$'); 281 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Turkey', 'Liras', 'TRL', '£'); 282 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Tuvalu', 'Dollars', 'TVD', '$'); 283 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Ukraine', 'Hryvnia', 'UAH', '₴'); 284 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('United Kingdom', 'Pounds', 'GBP', '£'); 285 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('United States of America', 'Dollars', 'USD', '$'); 286 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Uruguay', 'Pesos', 'UYU', '\$U'); 287 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Uzbekistan', 'Sums', 'UZS', 'лв'); 288 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Vatican City', 'Euro', 'EUR', '€'); 289 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Venezuela', 'Bolivares Fuertes', 'VEF', 'Bs'); 290 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Vietnam', 'Dong', 'VND', '₫'); 291 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Yemen', 'Rials', 'YER', '﷼'); 292 INSERT INTO {$table_name} (country, currency, code, symbol) VALUES ('Zimbabwe', 'Zimbabwe Dollars', 'ZWD', 'Z$') 293 CUR; 294 dbDelta($sql_insert); 145 295 } 146 296 } -
ya-pricing-table/trunk/includes/db_data.php
r2586259 r2601020 23 23 foreach ($columns as $col) { 24 24 $features = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}yapt_features WHERE `column_id` = '" . $col['id'] . "'", ARRAY_A); 25 25 26 $col_temp = $col; 27 $col_temp['currency_symbol'] = '$'; 28 if (!empty($col['price_currency'])) { 29 $currency = $wpdb->get_row("SELECT `symbol` FROM {$wpdb->prefix}yapt_currency WHERE `country` = '" . $col['price_currency'] . "'", ARRAY_A); 30 $col_temp['currency_symbol'] = $currency['symbol']; 31 } 26 32 $col_temp['features'] = $features; 27 33 $formatted_column[] = $col_temp; -
ya-pricing-table/trunk/public/class-yapt-public.php
r2586259 r2601020 156 156 } 157 157 158 $price_suffix = $this->getPriceSuffix(esc_html($col['price_suffix'])); 159 158 160 $temp_col = str_replace('##is_highlighted##', $highlighted, $pt_column_content); 159 161 $temp_col = str_replace('##description##', esc_html($col['description']), $temp_col); 160 162 $temp_col = str_replace('##col_title##', esc_html($col['column_title']), $temp_col); 161 $temp_col = str_replace('##col_price##', esc_html($col['price_text']), $temp_col); 163 $temp_col = str_replace('##col_price_currency##', esc_html($col['currency_symbol']), $temp_col); 164 $temp_col = str_replace('##col_price##', esc_html($col['price']), $temp_col); 165 $temp_col = str_replace('##col_price_suffix##', $price_suffix, $temp_col); 162 166 $temp_col = str_replace('##col_cta_btn_lnk##', esc_url($col['ctoa_btn_link']), $temp_col); 163 167 $temp_col = str_replace('##col_cta_btn_text##', esc_html($col['ctoa_btn_text']), $temp_col); … … 173 177 174 178 return $pt_html; 179 } 180 181 /** 182 * getPriceSuffix returns 'Per day' to '/day' 183 * @param string $price_suffix 184 * @return string 185 */ 186 private function getPriceSuffix(string $price_suffix): string 187 { 188 // ['Per hour', 'Per day', 'Per month', 'Per year', 'Per night']; 189 switch(strtolower($price_suffix)) { 190 case 'per hour': 191 $code = '/hr'; 192 break; 193 case 'per day': 194 $code = '/d'; 195 break; 196 case 'per month': 197 $code = '/mo'; 198 break; 199 case 'per night': 200 $code = '/nt'; 201 break; 202 case 'per year': 203 default: 204 $code = '/yr'; 205 } 206 return $code; 175 207 } 176 208 -
ya-pricing-table/trunk/templates/aanya/default.css
r2587868 r2601020 92 92 height: 70px; 93 93 } 94 95 .yapt_table_col .col_price sup { 96 font-size: 0.4em; 97 position: relative; 98 left: 5px; 99 } 100 .aanya_price{ 94 .aanya_price_frame{ 101 95 width: 100px; 102 96 height: 100px; … … 108 102 position: relative; 109 103 top: -47px; 110 } 111 .highlighted .aanya_price{ 104 overflow: hidden; 105 } 106 .highlighted .aanya_price_frame{ 112 107 top: -52px; 113 108 border-color: #b63ac3; 114 109 } 115 110 .yapt_table_col .col_price .yapt-price-currency{ 111 font-size: 0.7em; 112 opacity: 0.7; 113 } 114 .yapt-price-suffix{ 115 font-size: 0.7em; 116 } 116 117 /* ======================== 117 118 * Features -
ya-pricing-table/trunk/templates/aanya/default.html
r2587868 r2601020 2 2 <div class="aanya_heading"> 3 3 <div class="yapt_table_row col_price"> 4 <div class="aanya_price ">5 ##col_price##4 <div class="aanya_price_frame"> 5 <sup class="yapt-price-currency">##col_price_currency##</sup><span class="yapt-price-value">##col_price##</span><span class="yapt-price-suffix"> ##col_price_suffix##</span> 6 6 </div> 7 7 8 8 </div> 9 9 <div class="yapt_table_row col_title"> -
ya-pricing-table/trunk/templates/default/default.css
r2586259 r2601020 27 27 padding: 12px; 28 28 } 29 29 .yapt_table_col .col_price .yapt-price-currency{ 30 font-size: 0.7em; 31 opacity: 0.7; 32 font-weight: normal; 33 } 34 .yapt-price-suffix{ 35 font-size: 0.7em; 36 opacity: 0.7; 37 font-weight: normal; 38 39 } 30 40 /** ======================== 31 41 * Contenedor … … 78 88 } 79 89 80 .yapt_table_col .col_price sup {81 font-size: 0.4em;82 position: relative;83 left: 5px;84 }85 90 86 91 .col_features ul { -
ya-pricing-table/trunk/templates/default/default.html
r2586259 r2601020 4 4 </div> 5 5 <div class="yapt_table_row col_price"> 6 ##col_price##6 <sup class="yapt-price-currency">##col_price_currency##</sup><span class="yapt-price-value">##col_price##</span><span class="yapt-price-suffix"> ##col_price_suffix##</span> 7 7 </div> 8 8 <div class="yapt_table_row col_features"> -
ya-pricing-table/trunk/templates/yapt2021/yapt2021.css
r2586259 r2601020 27 27 padding: 12px; 28 28 } 29 29 .yapt_table_col .col_price .yapt-price-currency{ 30 font-size: 0.7em; 31 opacity: 0.7; 32 } 33 .yapt-price-suffix{ 34 font-size: 0.7em; 35 opacity: 0.7; 36 } 30 37 /** ======================== 31 38 * Contenedor … … 86 93 font-weight: normal; 87 94 padding: 20px 0; 88 }89 90 .yapt_table_col .col_price sup {91 font-size: 0.4em;92 position: relative;93 left: 5px;94 95 } 95 96 -
ya-pricing-table/trunk/templates/yapt2021/yapt2021.html
r2586259 r2601020 4 4 </div> 5 5 <div class="yapt_table_row col_price"> 6 ##col_price##6 <sup class="yapt-price-currency">##col_price_currency##</sup><span class="yapt-price-value">##col_price##</span><span class="yapt-price-suffix"> ##col_price_suffix##</span> 7 7 </div> 8 8 <div class="yapt_table_row col_subtitle"> -
ya-pricing-table/trunk/yapt.php
r2587878 r2601020 10 10 * 11 11 * @link https://github.com/8ivek/yapt 12 * @since 1.1.012 * @since 2.0.0 13 13 * @package Yapt 14 14 * … … 16 16 * Plugin Name: YA Pricing Table 17 17 * Plugin URI: https://github.com/8ivek/yapt 18 * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area.19 * Version: 1.1.018 * Description: Easily create and publish beautiful pricing tables with no programming knowledge. 19 * Version: 2.0.0 20 20 * Author: bCripts 21 21 * Author URI: https://github.com/8ivek/ya-pricing-table … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define('YAPT_VERSION', ' 1.1.0');38 define('YAPT_VERSION', '2.0.0'); 39 39 40 40 $url = plugin_dir_url(__FILE__);
Note: See TracChangeset
for help on using the changeset viewer.