Changeset 2086671
- Timestamp:
- 05/13/2019 10:09:45 AM (7 years ago)
- Location:
- wp-directory-listing/trunk
- Files:
-
- 16 edited
-
assets/front/css/single-directory.css (modified) (7 diffs)
-
assets/front/css/style.css (modified) (2 diffs)
-
assets/front/js/scripts.js (modified) (2 diffs)
-
includes/classes/class-column-directory.php (modified) (1 diff)
-
includes/classes/class-directory.php (modified) (1 diff)
-
includes/classes/class-functions.php (modified) (1 diff)
-
includes/classes/class-post-meta.php (modified) (1 diff)
-
includes/classes/class-post-types.php (modified) (1 diff)
-
includes/functions-settings.php (modified) (4 diffs)
-
includes/functions.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
templates/loop/thumbnail.php (modified) (1 diff)
-
templates/single-directory/head-meta.php (modified) (1 diff)
-
templates/single-directory/review-form.php (modified) (3 diffs)
-
templates/single-directory/tabs/reviews.php (modified) (2 diffs)
-
wp-directory-listing.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-directory-listing/trunk/assets/front/css/single-directory.css
r2065758 r2086671 9 9 width: 60%; 10 10 display: inline-block; 11 border: 1px solid #d6d6d6; 11 12 } 12 13 … … 18 19 position: absolute; 19 20 background: #d6d6d6; 20 top: 4 0%;21 top: 45%; 21 22 color: #252525; 22 23 font-size: 20px; 23 padding: 3px; 24 line-height: 36px; 25 width: 36px; 26 height: 36px; 27 text-align: center; 24 28 display: inline-block !important; 25 29 z-index: 9999; … … 27 31 } 28 32 29 .wpdl-directory-gallery-images . slick-arrow.icofont-rounded-left {33 .wpdl-directory-gallery-images .arrow-left { 30 34 left: 0; 31 35 } 32 36 33 .wpdl-directory-gallery-images . slick-arrow.icofont-rounded-right {37 .wpdl-directory-gallery-images .arrow-right { 34 38 right: 0; 35 39 } 36 40 37 41 .wpdl-directory-gallery-navs { 38 margin-top: 0px; 42 margin-top: 0; 43 border-top: 1px solid #d6d6d6; 44 padding: 10px; 39 45 } 40 46 … … 92 98 93 99 .wpdl-tabs { 94 margin-top: 50px; 95 } 96 97 .entry-content ul.wpdl-tabs-head, 100 margin-top: 25px; 101 } 102 98 103 ul.wpdl-tabs-head { 99 104 list-style: none; 100 padding -left: 0;101 margin: 0 0 40px;105 padding: 0 0 0 1em; 106 margin: 0 0 1.618em; 102 107 overflow: hidden; 103 108 position: relative; 104 109 } 105 110 106 ul.wpdl-tabs-head > li a { 107 border-radius: 3px; 108 } 109 110 ul.wpdl-tabs-head > li > span { 111 text-decoration: none; 112 padding: 10px 18px; 113 display: inherit; 114 cursor: pointer; 115 background-color: rgba(0,0,0,0.1); 116 transition: 0.3s; 117 border-radius: 3px; 118 } 119 120 ul.wpdl-tabs-head > li.active span, 121 ul.wpdl-tabs-head > li span:hover { 122 color: #ffffff; 123 } 111 ul.wpdl-tabs-head::before { 112 position: absolute; 113 content: ' '; 114 width: 100%; 115 bottom: 0; 116 left: 0; 117 border-bottom: 1px solid #d3ced2; 118 z-index: 1; 119 } 120 121 ul.wpdl-tabs-head > li { 122 margin: 0; 123 display: inline-block; 124 background: #fff; 125 z-index: 2; 126 border-bottom-color: #fff; 127 border: 1px solid #d3ced2; 128 background-color: #ebe9eb; 129 display: inline-block; 130 position: relative; 131 z-index: 0; 132 border-radius: 4px 4px 0 0; 133 margin: 0 -5px; 134 } 135 136 ul.wpdl-tabs-head > li::after, 137 ul.wpdl-tabs-head > li::before { 138 border: 1px solid #d3ced2; 139 position: absolute; 140 bottom: -1px; 141 width: 5px; 142 height: 5px; 143 content: ' '; 144 box-sizing: border-box; 145 } 146 147 ul.wpdl-tabs-head > li::before { 148 left: -5px; 149 border-bottom-right-radius: 4px; 150 border-width: 0 1px 1px 0; 151 box-shadow: 2px 2px 0 #ebe9eb; 152 } 153 154 155 ul.wpdl-tabs-head > li::after { 156 right: -5px; 157 border-bottom-left-radius: 4px; 158 border-width: 0 0 1px 1px; 159 box-shadow: -2px 2px 0 #ebe9eb; 160 } 161 162 163 ul.wpdl-tabs-head > li.active { 164 background: #fff; 165 z-index: 2; 166 border-bottom-color: #fff; 167 } 168 124 169 125 170 ul.wpdl-tabs-head > li.active::before { … … 131 176 } 132 177 133 ul.wpdl-tabs-head li { 134 display: inline-block; 135 margin-right: 15px; 136 } 178 179 ul.wpdl-tabs-head > li > a { 180 text-decoration: none; 181 padding: 5px 15px; 182 display: inherit; 183 cursor: pointer; 184 } 185 137 186 138 187 .wpdl-tabs-panel { … … 147 196 /* Directory Review Section */ 148 197 149 .wpdl- directory-reviews{150 198 .wpdl-tabs .wpdl-directory-review-form h4 { 199 margin: 15px 0; 151 200 } 152 201 153 202 .wpdl-directory-reviews .review-single { 154 margin -bottom: 30px;203 margin: 35px 0; 155 204 } 156 205 … … 198 247 199 248 200 201 249 /*Directory Rating Section*/ 202 250 -
wp-directory-listing/trunk/assets/front/css/style.css
r2086656 r2086671 35 35 } 36 36 37 38 .wpdl-form .wpdl-form-group {39 margin-top: 10px;40 margin-bottom: 20px;41 }42 43 37 .wpdl-form .wpdl-form-group label { 44 38 display: inline-block; … … 68 62 -moz-user-select: none; 69 63 -webkit-user-select: none; 64 margin: 0 0 0 15px; 65 padding: 0; 66 display: inline-block; 67 vertical-align: middle; 70 68 } 71 69 -
wp-directory-listing/trunk/assets/front/js/scripts.js
r2065758 r2086671 74 74 */ 75 75 76 $(document).on('click', 'ul.wpdl-tabs-head > li > span', function () {76 $(document).on('click', 'ul.wpdl-tabs-head > li > a', function () { 77 77 78 78 if ($(this).parent().hasClass('active')) return; … … 94 94 slidesToScroll: 1, 95 95 arrows: true, 96 prevArrow: '<i class=" icofont-rounded-left"></i>',97 nextArrow: '<i class=" icofont-rounded-right"></i>',96 prevArrow: '<i class="fa fa-angle-right arrow-right" aria-hidden="true"></i>', 97 nextArrow: '<i class="fa fa-angle-left arrow-left" aria-hidden="true"></i>', 98 98 fade: true, 99 99 adaptiveHeight: true, -
wp-directory-listing/trunk/includes/classes/class-column-directory.php
r2073079 r2086671 50 50 $new = array( 51 51 'cb' => $columns['cb'], 52 'title' => esc_html__( ' DirectoryTitle', TTDD ),53 'wpdl_type' => esc_html__( ' ListingType', TTDD ),52 'title' => esc_html__( 'Item Title', TTDD ), 53 'wpdl_type' => esc_html__( 'Item Type', TTDD ), 54 54 'wpdl_location' => esc_html__( 'Location', TTDD ), 55 55 'wpdl_author' => esc_html__( 'Author', TTDD ), -
wp-directory-listing/trunk/includes/classes/class-directory.php
r2073079 r2086671 374 374 375 375 376 /** 377 * Get Directory Full Price with Interval 378 * 379 * @filter wpdl_filters_directory_full_price 380 * @return string 381 */ 382 function get_full_price() { 383 384 global $wpdl; 385 386 $price = ""; 387 $item_price = $this->get_price(); 388 $_dir_interval = $this->get_meta( '_dir_interval' ); 389 $_dir_interval = empty( $_dir_interval ) ? '' : $_dir_interval; 390 391 if ( ! empty( $_dir_interval ) ) { 392 $price = sprintf( __( '%s %s / %s' ), $wpdl->get_currency_symbol(), $item_price, $_dir_interval ); 393 } else { 394 $price = sprintf( __( '%s %s' ), $wpdl->get_currency_symbol(), $item_price ); 395 } 396 397 return apply_filters( 'wpdl_filters_directory_full_price', $price, $this->ID, $this ); 398 } 399 400 401 /** 402 * Get Directory item flat Price 403 * 404 * @filter wpdl_filters_directory_price 405 * @return string 406 */ 407 function get_price() { 408 409 $_dir_price = $this->get_meta( '_dir_price' ); 410 $_dir_price = empty( $_dir_price ) ? 0 : (int) $_dir_price; 411 412 return apply_filters( 'wpdl_filters_directory_price', $_dir_price, $this->ID, $this ); 413 } 414 415 416 /** 376 /** 377 * Get Directory Full Price with Interval 378 * 379 * @filter wpdl_filters_directory_full_price 380 * @return string 381 */ 382 function get_full_price() { 383 global $wpdl; 384 $price = wpdl_price( $this->get_price(), array( 385 'currency' => $wpdl->get_currency(), 386 'billing_cycle' => $this->get_meta( '_dir_interval' ) 387 ) ); 388 return apply_filters( 'wpdl_filters_directory_full_price', $price, $this->ID, $this ); 389 } 390 391 392 /** 393 * Get Directory item flat Price 394 * 395 * @filter wpdl_filters_directory_price 396 * @return float 397 */ 398 function get_price() { 399 400 $_dir_price = $this->get_meta( '_dir_price' ); 401 $_dir_price = empty( $_dir_price ) ? 0 : (float) $_dir_price; 402 403 return apply_filters( 'wpdl_filters_directory_price', $_dir_price, $this->ID, $this ); 404 } 405 406 407 /** 417 408 * Return boolean whether a Directory Item has Price or Not 418 409 * 419 * @return bool 420 */ 421 function has_price() { 422 423 if ( $this->get_price() == 0 ) { 424 return false; 425 } 426 427 return true; 428 } 410 * @return bool 411 */ 412 function has_price() { 413 return $this->get_price() != 0; 414 } 429 415 430 416 -
wp-directory-listing/trunk/includes/classes/class-functions.php
r2073079 r2086671 244 244 245 245 246 /** 247 * Return Currency Symbol 248 * 249 * @return mixed|void 250 */ 251 function get_currency_symbol() { 252 253 $currency = $this->get_currency(); 254 $currency_sybmol = ''; 255 256 if ( $currency == 'USD' ) { 257 $currency_sybmol = '$'; 258 } 259 260 return apply_filters( 'wpdl_filters_currency_symbol', $currency_sybmol ); 261 } 262 263 264 /** 265 * Return Currency default 266 * 267 * @return mixed|void 268 */ 269 function get_currency() { 270 271 $currency_default = get_option( 'wpdl_currency_default' ); 272 273 if ( empty( $currency_default ) ) { 274 $currency_default = 'USD'; 275 } 276 277 return apply_filters( 'wpdl_filters_default_currency', $currency_default ); 278 } 246 /** 247 * Return Currency Symbol 248 * 249 * @return string 250 */ 251 function get_currency_symbol() { 252 $currency_sybmol = wpdl_get_currency_symbols( $this->get_currency() ); 253 return apply_filters( 'wpdl_filters_currency_symbol', $currency_sybmol ); 254 } 255 256 257 /** 258 * Return Currency default 259 * 260 * @return string 261 */ 262 function get_currency() { 263 $currency = get_option( 'wpdl_currency' ); 264 if( empty( $currency ) ) $currency = apply_filters( 'wpdl_filters_default_currency', 'USD' ); 265 return $currency; 266 } 279 267 280 268 -
wp-directory-listing/trunk/includes/classes/class-post-meta.php
r2073079 r2086671 172 172 array( 173 173 'id' => '_dir_interval', 174 'details' => __( 'Set interval period for the above price. Leave empty to ignore this and keep the flat price as Final price.', TTDD ), 174 'title' => __( 'Billing Cycle', TTDD ), 175 'details' => __( 'Set interval period for the above price (for subscription based item). Leave empty to ignore this and keep the flat price as Final price.', TTDD ), 175 176 'type' => 'select', 176 'args' => apply_filters( 'wpdl_filters_interval', array( 177 'daily' => __( 'Daily', TTDD ), 178 'weekly' => __( 'Weekly', TTDD ), 179 'bi_weekly' => __( 'Bi-Weekly', TTDD ), 180 'monthly' => __( 'Monthly', TTDD ), 181 'quarter' => __( 'Per 3 Month', TTDD ), 182 'half_yearly' => __( 'Half Yearly', TTDD ), 183 'yearly' => __( 'Yearly', TTDD ), 184 ) ), 177 'args' => wpdl_billing_cycle( 'all' ), 185 178 ), 186 179 -
wp-directory-listing/trunk/includes/classes/class-post-types.php
r2073079 r2086671 54 54 return; 55 55 } 56 57 $args = apply_filters( 'wpdl_filters_register_post_type_' . $post_type, $args ); 56 58 57 59 $singular = isset( $args['singular'] ) ? $args['singular'] : ''; -
wp-directory-listing/trunk/includes/functions-settings.php
r2065758 r2086671 9 9 if( ! function_exists( 'wpdl_add_plugin_menu_page' ) ) { 10 10 function wpdl_add_plugin_menu_page(){ 11 11 // dynamic meta configuration page 12 12 $meta_generator = array( 13 13 'page_nav' => __( 'Configure Meta', TTDD ), 14 14 'show_submit' => true, 15 15 ); 16 16 // Page Settings 17 17 $options = array( 18 'page_nav' => __( ' Options', TTDD ),18 'page_nav' => __( 'Page Options', TTDD ), 19 19 'page_settings' => array( 20 20 … … 41 41 ), 42 42 ); 43 43 // Core Query & Loop Settings 44 44 $settings = array( 45 45 'page_nav' => __( 'Settings', TTDD ), … … 62 62 'type' => 'select', 63 63 'args' => array( 64 '2' => __( '2 DirectoryItems', TTDD ),65 '3' => __( '3 DirectoryItems', TTDD ),66 '4' => __( '4 DirectoryItems', TTDD ),64 '2' => __( '2 Items', TTDD ), 65 '3' => __( '3 Items', TTDD ), 66 '4' => __( '4 Items', TTDD ), 67 67 ), 68 68 ), … … 72 72 ), 73 73 ); 74 // Currency Settings 75 $currency = array( 76 'page_nav' => __( 'Currency', TTDD ), 77 'page_settings' => array( 78 'section_pages' => array( 79 'title' => __('Currency Settings', TTDD), 80 'options' => array( 81 array( 82 'id' => 'wpdl_currency', 83 'title' => __('Currency', TTDD ), 84 'details' => __('This controls what currency prices are listed at in the catalog and which currency gateways will take payments in.', TTDD ), 85 'type' => 'select2', 86 'args' => wpdl_currencies(), 87 'value' => empty( get_option( 'wpdl_currency' ) ) ? apply_filters( 'wpdl_filters_default_currency', 'USD' ) : get_option( 'wpdl_currency' ), 88 ), 89 array( 90 'id' => 'wpdl_currency_pos', 91 'title' => __('Currency Position', TTDD ), 92 'details' => __('This controls the position of the currency symbol.', TTDD ), 93 'type' => 'select', 94 'args' => array( 95 'left' => __( 'Left', TTDD ), 96 'right' => __( 'Right', TTDD ), 97 'left_space' => __( 'Left with space', TTDD ), 98 'right_space' => __( 'Right with space', TTDD ), 99 ), 100 'value' => empty( get_option( 'wpdl_currency_pos' ) ) ? 'left' : get_option( 'wpdl_currency_pos' ), 101 ), 102 array( 103 'id' => 'wpdl_price_thousand_sep', 104 'title' => __('Thousand separator', TTDD ), 105 'details' => __('This sets the thousand separator of displayed prices.', TTDD ), 106 'type' => 'text', 107 'value' => empty( get_option( 'wpdl_price_thousand_sep' ) ) ? '' : get_option( 'wpdl_price_thousand_sep' ), 108 ), 109 array( 110 'id' => 'wpdl_price_decimal_sep', 111 'title' => __('Decimal separator', TTDD ), 112 'details' => __('This sets the decimal separator of displayed prices.', TTDD ), 113 'type' => 'text', 114 'value' => empty( get_option( 'wpdl_price_decimal_sep' ) ) ? '.' : get_option( 'wpdl_price_decimal_sep' ), 115 ), 116 array( 117 'id' => 'wpdl_price_num_decimals', 118 'title' => __('Number of decimals', TTDD ), 119 'details' => __('This sets the number of decimal points shown in displayed prices.', TTDD ), 120 'type' => 'number', 121 'value' => false === get_option( 'wpdl_price_num_decimals' ) || get_option( 'wpdl_price_num_decimals' ) === '' ? 2 : abs( (int) get_option( 'wpdl_price_num_decimals' ) ), 122 ), 123 ), 124 ), 74 125 75 $pages = array( 76 'wpdl_meta' => apply_filters( 'wpdl_filters_settings_wpdl_meta', $meta_generator ), 77 'wpdl_options' => apply_filters( 'wpdl_filters_settings_wpdl_options', $options ), 78 'wpdl_settings' => apply_filters( 'wpdl_filters_settings_wpdl_settings', $settings ), 79 ); 126 ), 127 ); 128 129 $pages = array( 130 'wpdl_meta' => apply_filters( 'wpdl_filters_settings_wpdl_meta', $meta_generator ), 131 'wpdl_options' => apply_filters( 'wpdl_filters_settings_wpdl_options', $options ), 132 'wpdl_settings' => apply_filters( 'wpdl_filters_settings_wpdl_settings', $settings ), 133 'wpdl_currency' => apply_filters( 'wpdl_settings_currency', $currency ), 134 ); 80 135 81 136 new WP_Settings( array( -
wp-directory-listing/trunk/includes/functions.php
r2065758 r2086671 543 543 } 544 544 545 546 /**547 * Get Single Directory Object548 * @global WPDL_Directory $directory549 *550 * @param int|WPDL_Directory|null $directory_id551 *552 * @return WPDL_Directory553 */554 555 545 if ( ! function_exists( 'wpdl_get_directory' ) ) { 546 /** 547 * Get Single Directory Object 548 * @global WPDL_Directory $directory 549 * 550 * @param int|WPDL_Directory|null $directory_id 551 * 552 * @return WPDL_Directory 553 */ 556 554 function wpdl_get_directory( $directory_id = '' ) { 557 555 … … 566 564 } 567 565 } 566 567 /** 568 * Get full list of currency codes. 569 * @since 1.0.5 570 * @return array 571 */ 572 function wpdl_currencies() { 573 static $currencies; 574 if ( ! isset( $currencies ) ) { 575 $currencies = array_unique( apply_filters( 'wpdl_currencies', array( 576 'AED' => __( 'United Arab Emirates dirham', TTDD ), 577 'AFN' => __( 'Afghan afghani', TTDD ), 578 'ALL' => __( 'Albanian lek', TTDD ), 579 'AMD' => __( 'Armenian dram', TTDD ), 580 'ANG' => __( 'Netherlands Antillean guilder', TTDD ), 581 'AOA' => __( 'Angolan kwanza', TTDD ), 582 'ARS' => __( 'Argentine peso', TTDD ), 583 'AUD' => __( 'Australian dollar', TTDD ), 584 'AWG' => __( 'Aruban florin', TTDD ), 585 'AZN' => __( 'Azerbaijani manat', TTDD ), 586 'BAM' => __( 'Bosnia and Herzegovina convertible mark', TTDD ), 587 'BBD' => __( 'Barbadian dollar', TTDD ), 588 'BDT' => __( 'Bangladeshi taka', TTDD ), 589 'BGN' => __( 'Bulgarian lev', TTDD ), 590 'BHD' => __( 'Bahraini dinar', TTDD ), 591 'BIF' => __( 'Burundian franc', TTDD ), 592 'BMD' => __( 'Bermudian dollar', TTDD ), 593 'BND' => __( 'Brunei dollar', TTDD ), 594 'BOB' => __( 'Bolivian boliviano', TTDD ), 595 'BRL' => __( 'Brazilian real', TTDD ), 596 'BSD' => __( 'Bahamian dollar', TTDD ), 597 'BTC' => __( 'Bitcoin', TTDD ), 598 'BTN' => __( 'Bhutanese ngultrum', TTDD ), 599 'BWP' => __( 'Botswana pula', TTDD ), 600 'BYR' => __( 'Belarusian ruble (old)', TTDD ), 601 'BYN' => __( 'Belarusian ruble', TTDD ), 602 'BZD' => __( 'Belize dollar', TTDD ), 603 'CAD' => __( 'Canadian dollar', TTDD ), 604 'CDF' => __( 'Congolese franc', TTDD ), 605 'CHF' => __( 'Swiss franc', TTDD ), 606 'CLP' => __( 'Chilean peso', TTDD ), 607 'CNY' => __( 'Chinese yuan', TTDD ), 608 'COP' => __( 'Colombian peso', TTDD ), 609 'CRC' => __( 'Costa Rican colón', TTDD ), 610 'CUC' => __( 'Cuban convertible peso', TTDD ), 611 'CUP' => __( 'Cuban peso', TTDD ), 612 'CVE' => __( 'Cape Verdean escudo', TTDD ), 613 'CZK' => __( 'Czech koruna', TTDD ), 614 'DJF' => __( 'Djiboutian franc', TTDD ), 615 'DKK' => __( 'Danish krone', TTDD ), 616 'DOP' => __( 'Dominican peso', TTDD ), 617 'DZD' => __( 'Algerian dinar', TTDD ), 618 'EGP' => __( 'Egyptian pound', TTDD ), 619 'ERN' => __( 'Eritrean nakfa', TTDD ), 620 'ETB' => __( 'Ethiopian birr', TTDD ), 621 'EUR' => __( 'Euro', TTDD ), 622 'FJD' => __( 'Fijian dollar', TTDD ), 623 'FKP' => __( 'Falkland Islands pound', TTDD ), 624 'GBP' => __( 'Pound sterling', TTDD ), 625 'GEL' => __( 'Georgian lari', TTDD ), 626 'GGP' => __( 'Guernsey pound', TTDD ), 627 'GHS' => __( 'Ghana cedi', TTDD ), 628 'GIP' => __( 'Gibraltar pound', TTDD ), 629 'GMD' => __( 'Gambian dalasi', TTDD ), 630 'GNF' => __( 'Guinean franc', TTDD ), 631 'GTQ' => __( 'Guatemalan quetzal', TTDD ), 632 'GYD' => __( 'Guyanese dollar', TTDD ), 633 'HKD' => __( 'Hong Kong dollar', TTDD ), 634 'HNL' => __( 'Honduran lempira', TTDD ), 635 'HRK' => __( 'Croatian kuna', TTDD ), 636 'HTG' => __( 'Haitian gourde', TTDD ), 637 'HUF' => __( 'Hungarian forint', TTDD ), 638 'IDR' => __( 'Indonesian rupiah', TTDD ), 639 'ILS' => __( 'Israeli new shekel', TTDD ), 640 'IMP' => __( 'Manx pound', TTDD ), 641 'INR' => __( 'Indian rupee', TTDD ), 642 'IQD' => __( 'Iraqi dinar', TTDD ), 643 'IRR' => __( 'Iranian rial', TTDD ), 644 'IRT' => __( 'Iranian toman', TTDD ), 645 'ISK' => __( 'Icelandic króna', TTDD ), 646 'JEP' => __( 'Jersey pound', TTDD ), 647 'JMD' => __( 'Jamaican dollar', TTDD ), 648 'JOD' => __( 'Jordanian dinar', TTDD ), 649 'JPY' => __( 'Japanese yen', TTDD ), 650 'KES' => __( 'Kenyan shilling', TTDD ), 651 'KGS' => __( 'Kyrgyzstani som', TTDD ), 652 'KHR' => __( 'Cambodian riel', TTDD ), 653 'KMF' => __( 'Comorian franc', TTDD ), 654 'KPW' => __( 'North Korean won', TTDD ), 655 'KRW' => __( 'South Korean won', TTDD ), 656 'KWD' => __( 'Kuwaiti dinar', TTDD ), 657 'KYD' => __( 'Cayman Islands dollar', TTDD ), 658 'KZT' => __( 'Kazakhstani tenge', TTDD ), 659 'LAK' => __( 'Lao kip', TTDD ), 660 'LBP' => __( 'Lebanese pound', TTDD ), 661 'LKR' => __( 'Sri Lankan rupee', TTDD ), 662 'LRD' => __( 'Liberian dollar', TTDD ), 663 'LSL' => __( 'Lesotho loti', TTDD ), 664 'LYD' => __( 'Libyan dinar', TTDD ), 665 'MAD' => __( 'Moroccan dirham', TTDD ), 666 'MDL' => __( 'Moldovan leu', TTDD ), 667 'MGA' => __( 'Malagasy ariary', TTDD ), 668 'MKD' => __( 'Macedonian denar', TTDD ), 669 'MMK' => __( 'Burmese kyat', TTDD ), 670 'MNT' => __( 'Mongolian tögrög', TTDD ), 671 'MOP' => __( 'Macanese pataca', TTDD ), 672 'MRO' => __( 'Mauritanian ouguiya', TTDD ), 673 'MUR' => __( 'Mauritian rupee', TTDD ), 674 'MVR' => __( 'Maldivian rufiyaa', TTDD ), 675 'MWK' => __( 'Malawian kwacha', TTDD ), 676 'MXN' => __( 'Mexican peso', TTDD ), 677 'MYR' => __( 'Malaysian ringgit', TTDD ), 678 'MZN' => __( 'Mozambican metical', TTDD ), 679 'NAD' => __( 'Namibian dollar', TTDD ), 680 'NGN' => __( 'Nigerian naira', TTDD ), 681 'NIO' => __( 'Nicaraguan córdoba', TTDD ), 682 'NOK' => __( 'Norwegian krone', TTDD ), 683 'NPR' => __( 'Nepalese rupee', TTDD ), 684 'NZD' => __( 'New Zealand dollar', TTDD ), 685 'OMR' => __( 'Omani rial', TTDD ), 686 'PAB' => __( 'Panamanian balboa', TTDD ), 687 'PEN' => __( 'Peruvian nuevo sol', TTDD ), 688 'PGK' => __( 'Papua New Guinean kina', TTDD ), 689 'PHP' => __( 'Philippine peso', TTDD ), 690 'PKR' => __( 'Pakistani rupee', TTDD ), 691 'PLN' => __( 'Polish złoty', TTDD ), 692 'PRB' => __( 'Transnistrian ruble', TTDD ), 693 'PYG' => __( 'Paraguayan guaraní', TTDD ), 694 'QAR' => __( 'Qatari riyal', TTDD ), 695 'RON' => __( 'Romanian leu', TTDD ), 696 'RSD' => __( 'Serbian dinar', TTDD ), 697 'RUB' => __( 'Russian ruble', TTDD ), 698 'RWF' => __( 'Rwandan franc', TTDD ), 699 'SAR' => __( 'Saudi riyal', TTDD ), 700 'SBD' => __( 'Solomon Islands dollar', TTDD ), 701 'SCR' => __( 'Seychellois rupee', TTDD ), 702 'SDG' => __( 'Sudanese pound', TTDD ), 703 'SEK' => __( 'Swedish krona', TTDD ), 704 'SGD' => __( 'Singapore dollar', TTDD ), 705 'SHP' => __( 'Saint Helena pound', TTDD ), 706 'SLL' => __( 'Sierra Leonean leone', TTDD ), 707 'SOS' => __( 'Somali shilling', TTDD ), 708 'SRD' => __( 'Surinamese dollar', TTDD ), 709 'SSP' => __( 'South Sudanese pound', TTDD ), 710 'STD' => __( 'São Tomé and Príncipe dobra', TTDD ), 711 'SYP' => __( 'Syrian pound', TTDD ), 712 'SZL' => __( 'Swazi lilangeni', TTDD ), 713 'THB' => __( 'Thai baht', TTDD ), 714 'TJS' => __( 'Tajikistani somoni', TTDD ), 715 'TMT' => __( 'Turkmenistan manat', TTDD ), 716 'TND' => __( 'Tunisian dinar', TTDD ), 717 'TOP' => __( 'Tongan paʻanga', TTDD ), 718 'TRY' => __( 'Turkish lira', TTDD ), 719 'TTD' => __( 'Trinidad and Tobago dollar', TTDD ), 720 'TWD' => __( 'New Taiwan dollar', TTDD ), 721 'TZS' => __( 'Tanzanian shilling', TTDD ), 722 'UAH' => __( 'Ukrainian hryvnia', TTDD ), 723 'UGX' => __( 'Ugandan shilling', TTDD ), 724 'USD' => __( 'United States (US) dollar', TTDD ), 725 'UYU' => __( 'Uruguayan peso', TTDD ), 726 'UZS' => __( 'Uzbekistani som', TTDD ), 727 'VEF' => __( 'Venezuelan bolívar', TTDD ), 728 'VND' => __( 'Vietnamese đồng', TTDD ), 729 'VUV' => __( 'Vanuatu vatu', TTDD ), 730 'WST' => __( 'Samoan tālā', TTDD ), 731 'XAF' => __( 'Central African CFA franc', TTDD ), 732 'XCD' => __( 'East Caribbean dollar', TTDD ), 733 'XOF' => __( 'West African CFA franc', TTDD ), 734 'XPF' => __( 'CFP franc', TTDD ), 735 'YER' => __( 'Yemeni rial', TTDD ), 736 'ZAR' => __( 'South African rand', TTDD ), 737 'ZMW' => __( 'Zambian kwacha', TTDD ), 738 ) ) ); 739 } 740 return $currencies; 741 } 742 743 /** 744 * Get Base Currency Code. 745 * @since 1.0.5 746 * @return string 747 */ 748 function wpdl_get_currency() { 749 return apply_filters( 'wpdl_currency', get_option( 'wpdl_currency' ) ); 750 } 751 /** 752 * Get Currency symbol. 753 * @since 1.0.5 754 * @param string $currency Currency. (default: ''). 755 * @return string 756 */ 757 function wpdl_get_currency_symbols( $currency = '' ) { 758 if ( ! $currency ) $currency = wpdl_get_currency(); 759 $symbols = apply_filters( 'wpdl_currency_symbols', array( 760 'AED' => 'د.إ', 761 'AFN' => '؋', 762 'ALL' => 'L', 763 'AMD' => 'AMD', 764 'ANG' => 'ƒ', 765 'AOA' => 'Kz', 766 'ARS' => '$', 767 'AUD' => '$', 768 'AWG' => 'Afl.', 769 'AZN' => 'AZN', 770 'BAM' => 'KM', 771 'BBD' => '$', 772 'BDT' => '৳ ', 773 'BGN' => 'лв.', 774 'BHD' => '.د.ب', 775 'BIF' => 'Fr', 776 'BMD' => '$', 777 'BND' => '$', 778 'BOB' => 'Bs.', 779 'BRL' => 'R$', 780 'BSD' => '$', 781 'BTC' => '฿', 782 'BTN' => 'Nu.', 783 'BWP' => 'P', 784 'BYR' => 'Br', 785 'BYN' => 'Br', 786 'BZD' => '$', 787 'CAD' => '$', 788 'CDF' => 'Fr', 789 'CHF' => 'CHF', 790 'CLP' => '$', 791 'CNY' => '¥', 792 'COP' => '$', 793 'CRC' => '₡', 794 'CUC' => '$', 795 'CUP' => '$', 796 'CVE' => '$', 797 'CZK' => 'Kč', 798 'DJF' => 'Fr', 799 'DKK' => 'DKK', 800 'DOP' => 'RD$', 801 'DZD' => 'د.ج', 802 'EGP' => 'EGP', 803 'ERN' => 'Nfk', 804 'ETB' => 'Br', 805 'EUR' => '€', 806 'FJD' => '$', 807 'FKP' => '£', 808 'GBP' => '£', 809 'GEL' => '₾', 810 'GGP' => '£', 811 'GHS' => '₵', 812 'GIP' => '£', 813 'GMD' => 'D', 814 'GNF' => 'Fr', 815 'GTQ' => 'Q', 816 'GYD' => '$', 817 'HKD' => '$', 818 'HNL' => 'L', 819 'HRK' => 'kn', 820 'HTG' => 'G', 821 'HUF' => 'Ft', 822 'IDR' => 'Rp', 823 'ILS' => '₪', 824 'IMP' => '£', 825 'INR' => '₹', 826 'IQD' => 'ع.د', 827 'IRR' => '﷼', 828 'IRT' => 'تومان', 829 'ISK' => 'kr.', 830 'JEP' => '£', 831 'JMD' => '$', 832 'JOD' => 'د.ا', 833 'JPY' => '¥', 834 'KES' => 'KSh', 835 'KGS' => 'сом', 836 'KHR' => '៛', 837 'KMF' => 'Fr', 838 'KPW' => '₩', 839 'KRW' => '₩', 840 'KWD' => 'د.ك', 841 'KYD' => '$', 842 'KZT' => 'KZT', 843 'LAK' => '₭', 844 'LBP' => 'ل.ل', 845 'LKR' => 'රු', 846 'LRD' => '$', 847 'LSL' => 'L', 848 'LYD' => 'ل.د', 849 'MAD' => 'د.م.', 850 'MDL' => 'MDL', 851 'MGA' => 'Ar', 852 'MKD' => 'ден', 853 'MMK' => 'Ks', 854 'MNT' => '₮', 855 'MOP' => 'P', 856 'MRO' => 'UM', 857 'MUR' => '₨', 858 'MVR' => '.ރ', 859 'MWK' => 'MK', 860 'MXN' => '$', 861 'MYR' => 'RM', 862 'MZN' => 'MT', 863 'NAD' => '$', 864 'NGN' => '₦', 865 'NIO' => 'C$', 866 'NOK' => 'kr', 867 'NPR' => '₨', 868 'NZD' => '$', 869 'OMR' => 'ر.ع.', 870 'PAB' => 'B/.', 871 'PEN' => 'S/.', 872 'PGK' => 'K', 873 'PHP' => '₱', 874 'PKR' => '₨', 875 'PLN' => 'zł', 876 'PRB' => 'р.', 877 'PYG' => '₲', 878 'QAR' => 'ر.ق', 879 'RMB' => '¥', 880 'RON' => 'lei', 881 'RSD' => 'дин.', 882 'RUB' => '₽', 883 'RWF' => 'Fr', 884 'SAR' => 'ر.س', 885 'SBD' => '$', 886 'SCR' => '₨', 887 'SDG' => 'ج.س.', 888 'SEK' => 'kr', 889 'SGD' => '$', 890 'SHP' => '£', 891 'SLL' => 'Le', 892 'SOS' => 'Sh', 893 'SRD' => '$', 894 'SSP' => '£', 895 'STD' => 'Db', 896 'SYP' => 'ل.س', 897 'SZL' => 'L', 898 'THB' => '฿', 899 'TJS' => 'ЅМ', 900 'TMT' => 'm', 901 'TND' => 'د.ت', 902 'TOP' => 'T$', 903 'TRY' => '₺', 904 'TTD' => '$', 905 'TWD' => 'NT$', 906 'TZS' => 'Sh', 907 'UAH' => '₴', 908 'UGX' => 'UGX', 909 'USD' => '$', 910 'UYU' => '$', 911 'UZS' => 'UZS', 912 'VEF' => 'Bs F', 913 'VND' => '₫', 914 'VUV' => 'Vt', 915 'WST' => 'T', 916 'XAF' => 'CFA', 917 'XCD' => '$', 918 'XOF' => 'CFA', 919 'XPF' => 'Fr', 920 'YER' => '﷼', 921 'ZAR' => 'R', 922 'ZMW' => 'ZK', 923 ) ); 924 $currency_symbol = isset( $symbols[ $currency ] ) ? $symbols[ $currency ] : ''; 925 return apply_filters( 'wpdl_currency_symbol', $currency_symbol, $currency ); 926 } 927 928 /** 929 * Get the price format depending on the currency position. 930 * @since 1.0.5 931 * @return string 932 */ 933 function wpdl_get_price_format() { 934 $currency_pos = get_option( 'wpdl_currency_pos' ); 935 // default is left 936 $format = '%1$s%2$s'; 937 switch ( $currency_pos ) { 938 case 'left': 939 $format = '%1$s%2$s'; 940 break; 941 case 'right': 942 $format = '%2$s%1$s'; 943 break; 944 case 'left_space': 945 $format = '%1$s %2$s'; 946 break; 947 case 'right_space': 948 $format = '%2$s %1$s'; 949 break; 950 } 951 return apply_filters( 'wpdl_price_format', $format, $currency_pos ); 952 } 953 954 /** 955 * Return the thousand separator for prices. 956 * 957 * @since 1.0.5 958 * @return string 959 */ 960 function wpdl_get_price_thousand_separator() { 961 return stripslashes( apply_filters( 'wpdl_get_price_thousand_separator', get_option( 'wpdl_price_thousand_sep' ) ) ); 962 } 963 964 /** 965 * Return the decimal separator for prices. 966 * 967 * @since 1.0.5 968 * @return string 969 */ 970 function wpdl_get_price_decimal_separator() { 971 $separator = apply_filters( 'wpdl_get_price_decimal_separator', get_option( 'wpdl_price_decimal_sep' ) ); 972 return $separator ? stripslashes( $separator ) : '.'; 973 } 974 975 /** 976 * Return the number of decimals after the decimal point. 977 * 978 * @since 1.0.5 979 * @return int 980 */ 981 function wpdl_get_price_decimals() { 982 $num_decim = apply_filters( 'wpdl_get_price_decimals', get_option( 'wpdl_price_num_decimals' ) ); 983 return $num_decim === '' ? 2 : absint( $num_decim ); 984 } 985 986 /** 987 * Trim trailing zeros off prices. 988 * @since 1.0.5 989 * @param string|float|int $price Price. 990 * @return string 991 */ 992 function wpdl_trim_zeros( $price ) { 993 return preg_replace( '/' . preg_quote( wpdl_get_price_decimal_separator(), '/' ) . '0++$/', '', $price ); 994 } 995 996 /** 997 * Format the price with a currency symbol. 998 * @since 1.0.5 999 * @param float $price Raw price. 1000 * @param array $args Arguments to format a price { 1001 * Array of arguments. 1002 * Defaults to empty array. 1003 * 1004 * @type string $currency Currency code. 1005 * Defaults to empty string (Use the result from get_wpdl_currency()). 1006 * @type string $decimal_separator Decimal separator. 1007 * Defaults the result of wpdl_get_price_decimal_separator(). 1008 * @type string $thousand_separator Thousand separator. 1009 * Defaults the result of wpdl_get_price_thousand_separator(). 1010 * @type string $decimals Number of decimals. 1011 * Defaults the result of wpdl_get_price_decimals(). 1012 * @type string $price_format Price format depending on the currency position. 1013 * Defaults the result of get_wpdl_price_format(). 1014 * @type string $plan_seperator Pricing plan separator. 1015 * Defaults / (slash). 1016 * @type string $plan Pricing plan for current price. 1017 * Defaults empty. 1018 * } 1019 * @return string 1020 */ 1021 function wpdl_price( $price, $args = array() ) { 1022 $args = apply_filters( 'wpdl_price_args', wp_parse_args( $args, array( 1023 'currency' => '', 1024 'decimal_separator' => wpdl_get_price_decimal_separator(), 1025 'thousand_separator' => wpdl_get_price_thousand_separator(), 1026 'decimals' => wpdl_get_price_decimals(), 1027 'price_format' => wpdl_get_price_format(), 1028 'billing_cycle_separator' => '/', 1029 'billing_cycle' => '', 1030 ) ) ); 1031 1032 $unformatted_price = $price; 1033 $negative = $price < 0; 1034 $price = apply_filters( 'wpdl_raw_price', floatval( $negative ? $price * -1 : $price ) ); 1035 $price = apply_filters( 'wpdl_formatted_price', number_format( $price, $args['decimals'], $args['decimal_separator'], $args['thousand_separator'] ), $price, $args['decimals'], $args['decimal_separator'], $args['thousand_separator'] ); 1036 1037 if ( apply_filters( 'wpdl_price_trim_zeros', false ) && $args['decimals'] > 0 ) { 1038 $price = wpdl_trim_zeros( $price ); 1039 } 1040 1041 $formatted_price = ( $negative ? '-' : '' ) . sprintf( $args['price_format'], '<span class="wpdl-currency-symbol">' . wpdl_get_currency_symbols( $args['currency'] ) . '</span>', $price ); 1042 $output = '<span class="wpdl-price">' . $formatted_price . '</span>'; 1043 $billing_cycle = wpdl_billing_cycle( $args['billing_cycle'] ); 1044 if( ! empty( $billing_cycle ) ) { 1045 if( ! empty( $args['billing_cycle_separator'] ) ) $output .= sprintf( '<span class="wpdl-billing-cycle-separator">%s</span>', esc_html( $args['billing_cycle_separator'] ) ); 1046 $output .= sprintf( '<span class="wpdl-billing-cycle">%s</span>', $billing_cycle ); 1047 } 1048 1049 /** 1050 * Filters the string of price markup. 1051 * 1052 * @param string $output Price HTML markup. 1053 * @param string $price Formatted price. 1054 * @param array $args Pass on the args. 1055 * @param float $unformatted_price Price as float to allow plugins custom formatting. Since 3.2.0. 1056 */ 1057 return apply_filters( 'wpdl_price', $output, $price, $args, $unformatted_price ); 1058 } 1059 1060 /** 1061 * Get Billing Cycle/s 1062 * @since 1.0.5 1063 * @param string $cycle 1064 * @return string[]|string 1065 */ 1066 function wpdl_billing_cycle( $cycle = 'all' ) { 1067 $cycles = apply_filters( 'wpdl_billing_cycles', array( 1068 'daily' => __( 'Daily', TTDD ), 1069 'weekly' => __( 'Weekly', TTDD ), 1070 'bi_weekly' => __( 'Bi-Weekly', TTDD ), 1071 'monthly' => __( 'Monthly', TTDD ), 1072 'quarter' => __( 'Per 3 Month', TTDD ), 1073 'half_yearly' => __( 'Half Yearly', TTDD ), 1074 'yearly' => __( 'Yearly', TTDD ), 1075 ) ); 1076 if( $cycle === 'all' ) return $cycles; 1077 $cycle = ( isset( $cycles[$cycle] ) ) ? $cycles[$cycle] : ''; 1078 return apply_filters( 'wpdl_billing_cycle', $cycle ); 1079 } -
wp-directory-listing/trunk/readme.txt
r2073079 r2086671 4 4 Tags: Directory, directory listing, listify 5 5 Requires at least: 3.8 6 Tested up to: 5. 1.16 Tested up to: 5.2 7 7 Requires PHP: 5.6 8 Stable tag: 1.0. 48 Stable tag: 1.0.5 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 57 57 58 58 = 1.0.0 = 59 * 08/02/2019 Initial release.59 * 08/02/2019 Initial Release. 60 60 61 61 = 1.0.2 = 62 62 * 16/02/2019 Bug Fixed 63 64 = 1.0.5 = 65 * 13/05/2019 Currency Options Added 63 66 64 67 -
wp-directory-listing/trunk/templates/loop/thumbnail.php
r2065758 r2086671 23 23 <?php if( $directory->is_featured() ) : ?> 24 24 <div class="directory-item-featured"> 25 <span aria-label="<?php esc_html_e( 'Featured Listing', ' kutir' ); ?>" class="tt--hint tt--top">25 <span aria-label="<?php esc_html_e( 'Featured Listing', 'softly' ); ?>" class="tt--hint tt--top"> 26 26 <i class="fa fa-heart" aria-hidden="true"></i> 27 27 </span> -
wp-directory-listing/trunk/templates/single-directory/head-meta.php
r2086656 r2086671 23 23 24 24 25 <span class="listing-for"><?php echo $directory->get_ listing_for(); ?></span>25 <span class="listing-for"><?php echo $directory->get_acquisition_type(); ?></span> 26 26 27 27 <span class="listing-author"> -
wp-directory-listing/trunk/templates/single-directory/review-form.php
r2065758 r2086671 14 14 ?> 15 15 16 <h 3><?php esc_html_e('Create a new review', TTDD); ?></h3>16 <h4><?php esc_html_e('Create a new review', TTDD); ?></h4> 17 17 18 18 <?php do_action( 'wpdl_before_directory_review_form' ); ?> … … 30 30 31 31 <div class='wpdl-form-group'> 32 <label for="review"><?php esc_html_e( 'Your Rating', TTDD); ?></label> 32 33 <input required type="hidden" value="" name="wpdl_directory_review_rating"> 33 34 <ul class='wpdl-rating-field'> … … 43 44 44 45 <div class="wpdl-form-group"> 45 <label for="review"><?php esc_html_e( 'Review ', TTDD); ?></label>46 <label for="review"><?php esc_html_e( 'Review content', TTDD); ?></label> 46 47 <textarea required name="wpdl_directory_review_details" rows="5" id="review" class="wpdl-form-field" placeholder="<?php esc_html_e('Your Review', TTDD); ?>"></textarea> 47 48 </div> -
wp-directory-listing/trunk/templates/single-directory/tabs/reviews.php
r2065758 r2086671 15 15 ?> 16 16 17 <?php do_action( 'wpdl_before_reviews' ); ?> 18 17 19 <div class="wpdl-directory-reviews"> 18 20 … … 25 27 </div> 26 28 29 <?php do_action( 'wpdl_after_reviews' ); ?> 30 27 31 <?php do_action( 'wpdl_before_directory_review_form_wrapper' ); ?> 28 32 -
wp-directory-listing/trunk/wp-directory-listing.php
r2073079 r2086671 4 4 Plugin URI: https://pluginrox.com/plugin/wp-directory-listing/ 5 5 Description: Directory Listing Plugin for WordPress 6 Version: 1.0. 46 Version: 1.0.5 7 7 Author: PluginRox 8 8 Author URI: https://pluginrox.com/ … … 23 23 $this->load_defines(); 24 24 $this->load_scripts(); 25 $this->load_functions(); 25 26 $this->load_classes(); 26 $this->load_functions();27 27 } 28 28
Note: See TracChangeset
for help on using the changeset viewer.