Changeset 3092528
- Timestamp:
- 05/25/2024 04:58:25 PM (21 months ago)
- Location:
- persian-woocommerce
- Files:
-
- 2 deleted
- 24 edited
-
tags/7.1.5/include/class-address.php (modified) (1 diff)
-
tags/7.1.5/include/class-core.php (modified) (2 diffs)
-
tags/7.1.5/include/class-gateways.php (modified) (1 diff)
-
tags/7.1.5/include/class-notice.php (modified) (2 diffs)
-
tags/7.1.5/include/class-tools.php (modified) (2 diffs)
-
tags/7.1.5/include/class-translate.php (modified) (2 diffs)
-
tags/7.1.5/include/gateways/class-zibal.php (modified) (1 diff)
-
tags/7.1.5/include/lib (deleted)
-
tags/7.1.5/include/tools/class-date.php (modified) (2 diffs)
-
tags/7.1.5/include/tools/class-general.php (modified) (1 diff)
-
tags/7.1.5/include/tools/class-price.php (modified) (1 diff)
-
tags/7.1.5/include/view/html-admin-page-about.php (modified) (2 diffs)
-
tags/7.1.5/include/view/html-admin-page-melipayamak.php (modified) (2 diffs)
-
trunk/include/class-address.php (modified) (1 diff)
-
trunk/include/class-core.php (modified) (2 diffs)
-
trunk/include/class-gateways.php (modified) (1 diff)
-
trunk/include/class-notice.php (modified) (2 diffs)
-
trunk/include/class-tools.php (modified) (2 diffs)
-
trunk/include/class-translate.php (modified) (2 diffs)
-
trunk/include/gateways/class-zibal.php (modified) (1 diff)
-
trunk/include/lib (deleted)
-
trunk/include/tools/class-date.php (modified) (2 diffs)
-
trunk/include/tools/class-general.php (modified) (1 diff)
-
trunk/include/tools/class-price.php (modified) (1 diff)
-
trunk/include/view/html-admin-page-about.php (modified) (2 diffs)
-
trunk/include/view/html-admin-page-melipayamak.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
persian-woocommerce/tags/7.1.5/include/class-address.php
r3089342 r3092528 352 352 353 353 $(document.body).on('change', '#<?php echo esc_attr( $type ); ?>_country', function () { 354 var is_iran = $('#<?php echo esc_attr( $type ); ?>_country').val() == '<?php echo $this->country?>' ? 'yes' : 'no';354 var is_iran = $('#<?php echo esc_attr( $type ); ?>_country').val() == '<?php echo esc_attr($this->country); ?>' ? 'yes' : 'no'; 355 355 set_iran_cities_field('<?php echo esc_attr( $type ); ?>', is_iran); 356 356 }); -
persian-woocommerce/tags/7.1.5/include/class-core.php
r3089342 r3092528 66 66 'title' => 'تاریخ شمسی', 67 67 'capability' => 'manage_options', 68 'slug' => admin_url( 'admin.php?page=persian-wc-tools&tab=date'),68 'slug' => esc_url( admin_url( 'admin.php?page=persian-wc-tools&tab=date' )), 69 69 'callback' => '', 70 70 ], … … 78 78 'title' => 'سوپر ادمین', 79 79 'capability' => 'manage_options', 80 'slug' => admin_url( 'admin.php?page=persian-wc-tools&tab=super_admin'),80 'slug' => esc_url(admin_url( 'admin.php?page=persian-wc-tools&tab=super_admin' )), 81 81 'callback' => '', 82 82 ], -
persian-woocommerce/tags/7.1.5/include/class-gateways.php
r3091092 r3092528 713 713 } 714 714 715 protected function nusoap() {716 if ( ! class_exists( 'nusoap_client' ) ) {717 include_once( 'lib/nusoap.php' );718 }719 }720 715 721 716 /* -
persian-woocommerce/tags/7.1.5/include/class-notice.php
r3089342 r3092528 51 51 52 52 $.ajax({ 53 url: "<?php echo admin_url( 'admin-ajax.php') ?>",53 url: "<?php echo esc_url(admin_url( 'admin-ajax.php' )) ?>", 54 54 type: 'post', 55 55 data: { … … 64 64 65 65 $.ajax({ 66 url: "<?php echo admin_url( 'admin-ajax.php') ?>",66 url: "<?php echo esc_url(admin_url( 'admin-ajax.php' )) ?>", 67 67 type: 'post', 68 68 data: { -
persian-woocommerce/tags/7.1.5/include/class-tools.php
r3089342 r3092528 62 62 63 63 if ( count( $html_sections ) ) { 64 printf( '<ul class="subsubsub">%s</ul><br>', implode( " | ", $html_sections ));64 printf( '<ul class="subsubsub">%s</ul><br>', esc_html(implode( " | ", $html_sections ) )); 65 65 } 66 66 … … 444 444 } 445 445 ?> 446 </select> <br/><a class="select_all button" href="#"> <?php _e( 'Select all', 'woocommerce' ); ?></a> <a447 class="select_none button" href="#"> <?php _e( 'Select none', 'woocommerce' ); ?></a>446 </select> <br/><a class="select_all button" href="#">انتخاب همه</a> <a 447 class="select_none button" href="#">هیچکدام</a> 448 448 </td> 449 449 </tr><?php -
persian-woocommerce/tags/7.1.5/include/class-translate.php
r3089342 r3092528 136 136 ?> 137 137 <form action="" method="post" id="woocommerce_persian_translate"> 138 <input type="hidden" name="s" value="<?php echo esc_attr( $_GET['s'] ?? null); ?>"/>138 <input type="hidden" name="s" value="<?php echo esc_attr( sanitize_text_field( $_GET['s'] ?? null ) ); ?>"/> 139 139 <input type="hidden" name="action" value="pw_save_translates"/> 140 140 <input type="hidden" name="security" … … 269 269 270 270 public function __construct() { 271 272 271 global $wpdb; 273 272 274 $ search = '';273 $table = $wpdb->prefix . 'woocommerce_ir'; 275 274 $perPage = 20; 276 275 $db_page = ( $this->get_pagenum() - 1 ) * $perPage; 277 276 278 if ( isset( $_GET['s'] ) && ! empty( $_GET['s'] ) ) { 279 $s = sanitize_text_field( $_GET['s'] ); 280 $search = " WHERE text1 LIKE '%{$s}%' OR text2 LIKE '%{$s}%'"; 281 } 282 283 $this->data = $wpdb->get_results( "SELECT * FROM `{$wpdb->prefix}woocommerce_ir`{$search} ORDER BY id DESC LIMIT $db_page, $perPage;", ARRAY_A ); 277 $s = sanitize_text_field( trim( $_GET['s'] ?? '' ) ); 278 279 $query = $wpdb->prepare( "SELECT * FROM %i 280 WHERE `text1` LIKE '%%%s%' OR `text2` LIKE '%%%s%' 281 ORDER BY `id` DESC LIMIT %d, %d;", $table, $s, $s, $db_page, $perPage ); 282 $total_query = $wpdb->prepare( "SELECT COUNT(*) FROM %i WHERE `text1` LIKE '%%%s%' OR `text2` LIKE '%%%s%';", $table, $s, $s ); 283 284 $this->data = $wpdb->get_results( $query, ARRAY_A ); 284 285 285 286 $this->set_pagination_args( [ 286 'total_items' => $wpdb->get_var( "SELECT COUNT(*) FROM `{$wpdb->prefix}woocommerce_ir`{$search};"),287 'per_page' => $perPage,287 'total_items' => $wpdb->get_var( $total_query ), 288 'per_page' => $perPage, 288 289 ] ); 289 290 -
persian-woocommerce/tags/7.1.5/include/gateways/class-zibal.php
r3091092 r3092528 12 12 add_action( 'after_plugin_row_zibal-payment-gateway-for-woocommerce/index.php', function ( $plugin_file, $plugin_data, $status ) { 13 13 echo '<tr class="inactive"><td> </td><td colspan="2"> 14 <div class="notice inline notice-warning notice-alt"><p>افزونه «<strong>درگاه پرداخت زیبال برای فروشگاه ساز ووکامرس</strong>» درون بسته ووکامرس فارسی وجود دارد و نیاز به فعال سازی نیست. به صفحه <a href="' . admin_url( 'admin.php?page=wc-settings&tab=checkout') . '">ووکامرس > پیکربندی > تسویه حساب</a> مراجعه کنید.</p></div>14 <div class="notice inline notice-warning notice-alt"><p>افزونه «<strong>درگاه پرداخت زیبال برای فروشگاه ساز ووکامرس</strong>» درون بسته ووکامرس فارسی وجود دارد و نیاز به فعال سازی نیست. به صفحه <a href="' . esc_url(admin_url( 'admin.php?page=wc-settings&tab=checkout' )) . '">ووکامرس > پیکربندی > تسویه حساب</a> مراجعه کنید.</p></div> 15 15 </td> 16 16 </tr>'; -
persian-woocommerce/tags/7.1.5/include/tools/class-date.php
r3089342 r3092528 304 304 foreach ( $dates as $year => $months ) { 305 305 306 printf( '<optgroup label="سال %s">', CalendarUtils::convertNumbers( $year ));306 printf( '<optgroup label="سال %s">', esc_attr(CalendarUtils::convertNumbers( $year) )); 307 307 308 308 foreach ( $months as $month => $count ) { … … 417 417 foreach ( $dates as $year => $months ) { 418 418 419 printf( '<optgroup label="سال %s">', CalendarUtils::convertNumbers( $year ));419 printf( '<optgroup label="سال %s">', esc_attr(CalendarUtils::convertNumbers( $year ) )); 420 420 421 421 foreach ( $months as $month => $count ) { -
persian-woocommerce/tags/7.1.5/include/tools/class-general.php
r3089342 r3092528 1 1 <?php 2 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } 3 5 class PW_Tools_General { 4 6 -
persian-woocommerce/tags/7.1.5/include/tools/class-price.php
r3089342 r3092528 76 76 if ( WC()->cart->get_total( null ) < $minimum ) { 77 77 78 $message = sprintf( __( 'مبلغ سفارش شما %s می باشد، حداقل مبلغ جهت ثبت سفارش %s است.' ), wc_price( WC()->cart->get_total( null ) ), wc_price( $minimum ) );78 $message = sprintf('مبلغ سفارش شما %s می باشد، حداقل مبلغ جهت ثبت سفارش %s است.', wc_price( WC()->cart->get_total( null ) ), wc_price( $minimum ) ); 79 79 80 80 if ( is_cart() ) { -
persian-woocommerce/tags/7.1.5/include/view/html-admin-page-about.php
r3089342 r3092528 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 3 ?> 1 4 <div class="wrap about-wrap persian-woocommerce"> 2 5 <h2>به دنیای ووکامرس فارسی خوش آمدید!</h2> … … 5 8 6 9 <div class="wp-badge" 7 style="background-color:#d8bfd8 !important;background-image:url('<?php echo PW()->plugin_url( 'assets/images/about.png'); ?>') !important;background-position: center center;background-size: 167px auto !important;"></div>10 style="background-color:#d8bfd8 !important;background-image:url('<?php echo esc_url(PW()->plugin_url( 'assets/images/about.png' )); ?>') !important;background-position: center center;background-size: 167px auto !important;"></div> 8 11 9 12 -
persian-woocommerce/tags/7.1.5/include/view/html-admin-page-melipayamak.php
r3089342 r3092528 83 83 84 84 <div class="text-center mb-2"> 85 <a href="<?php echo admin_url( 'plugin-install.php?tab=plugin-information&plugin=persian-woocommerce-sms'); ?>"85 <a href="<?php echo esc_url(admin_url( 'plugin-install.php?tab=plugin-information&plugin=persian-woocommerce-sms' )); ?>" 86 86 class="flex w-full items-center justify-center gap-2 bg-gray-button rounded-[3px] py-3 sm:px-5 px-3 hover:shadow-xl hover:-translate-y-0.5 a2:hover" 87 87 target="_blank"> … … 256 256 257 257 <div class="text-center mb-2"> 258 <a href="<?php echo admin_url( 'plugin-install.php?tab=plugin-information&plugin=persian-woocommerce-sms'); ?>"258 <a href="<?php echo esc_url(admin_url( 'plugin-install.php?tab=plugin-information&plugin=persian-woocommerce-sms' )); ?>" 259 259 class="flex w-full items-center justify-center gap-2 bg-gray-button rounded-[3px] py-3 sm:px-5 px-3 hover:shadow-xl hover:-translate-y-0.5 a2:hover" 260 260 target="_blank"> -
persian-woocommerce/trunk/include/class-address.php
r2861939 r3092528 352 352 353 353 $(document.body).on('change', '#<?php echo esc_attr( $type ); ?>_country', function () { 354 var is_iran = $('#<?php echo esc_attr( $type ); ?>_country').val() == '<?php echo $this->country?>' ? 'yes' : 'no';354 var is_iran = $('#<?php echo esc_attr( $type ); ?>_country').val() == '<?php echo esc_attr($this->country); ?>' ? 'yes' : 'no'; 355 355 set_iran_cities_field('<?php echo esc_attr( $type ); ?>', is_iran); 356 356 }); -
persian-woocommerce/trunk/include/class-core.php
r3013709 r3092528 66 66 'title' => 'تاریخ شمسی', 67 67 'capability' => 'manage_options', 68 'slug' => admin_url( 'admin.php?page=persian-wc-tools&tab=date'),68 'slug' => esc_url( admin_url( 'admin.php?page=persian-wc-tools&tab=date' )), 69 69 'callback' => '', 70 70 ], … … 78 78 'title' => 'سوپر ادمین', 79 79 'capability' => 'manage_options', 80 'slug' => admin_url( 'admin.php?page=persian-wc-tools&tab=super_admin'),80 'slug' => esc_url(admin_url( 'admin.php?page=persian-wc-tools&tab=super_admin' )), 81 81 'callback' => '', 82 82 ], -
persian-woocommerce/trunk/include/class-gateways.php
r3091092 r3092528 713 713 } 714 714 715 protected function nusoap() {716 if ( ! class_exists( 'nusoap_client' ) ) {717 include_once( 'lib/nusoap.php' );718 }719 }720 715 721 716 /* -
persian-woocommerce/trunk/include/class-notice.php
r2988022 r3092528 51 51 52 52 $.ajax({ 53 url: "<?php echo admin_url( 'admin-ajax.php') ?>",53 url: "<?php echo esc_url(admin_url( 'admin-ajax.php' )) ?>", 54 54 type: 'post', 55 55 data: { … … 64 64 65 65 $.ajax({ 66 url: "<?php echo admin_url( 'admin-ajax.php') ?>",66 url: "<?php echo esc_url(admin_url( 'admin-ajax.php' )) ?>", 67 67 type: 'post', 68 68 data: { -
persian-woocommerce/trunk/include/class-tools.php
r2988022 r3092528 62 62 63 63 if ( count( $html_sections ) ) { 64 printf( '<ul class="subsubsub">%s</ul><br>', implode( " | ", $html_sections ));64 printf( '<ul class="subsubsub">%s</ul><br>', esc_html(implode( " | ", $html_sections ) )); 65 65 } 66 66 … … 444 444 } 445 445 ?> 446 </select> <br/><a class="select_all button" href="#"> <?php _e( 'Select all', 'woocommerce' ); ?></a> <a447 class="select_none button" href="#"> <?php _e( 'Select none', 'woocommerce' ); ?></a>446 </select> <br/><a class="select_all button" href="#">انتخاب همه</a> <a 447 class="select_none button" href="#">هیچکدام</a> 448 448 </td> 449 449 </tr><?php -
persian-woocommerce/trunk/include/class-translate.php
r3014213 r3092528 136 136 ?> 137 137 <form action="" method="post" id="woocommerce_persian_translate"> 138 <input type="hidden" name="s" value="<?php echo esc_attr( $_GET['s'] ?? null); ?>"/>138 <input type="hidden" name="s" value="<?php echo esc_attr( sanitize_text_field( $_GET['s'] ?? null ) ); ?>"/> 139 139 <input type="hidden" name="action" value="pw_save_translates"/> 140 140 <input type="hidden" name="security" … … 269 269 270 270 public function __construct() { 271 272 271 global $wpdb; 273 272 274 $ search = '';273 $table = $wpdb->prefix . 'woocommerce_ir'; 275 274 $perPage = 20; 276 275 $db_page = ( $this->get_pagenum() - 1 ) * $perPage; 277 276 278 if ( isset( $_GET['s'] ) && ! empty( $_GET['s'] ) ) { 279 $s = sanitize_text_field( $_GET['s'] ); 280 $search = " WHERE text1 LIKE '%{$s}%' OR text2 LIKE '%{$s}%'"; 281 } 282 283 $this->data = $wpdb->get_results( "SELECT * FROM `{$wpdb->prefix}woocommerce_ir`{$search} ORDER BY id DESC LIMIT $db_page, $perPage;", ARRAY_A ); 277 $s = sanitize_text_field( trim( $_GET['s'] ?? '' ) ); 278 279 $query = $wpdb->prepare( "SELECT * FROM %i 280 WHERE `text1` LIKE '%%%s%' OR `text2` LIKE '%%%s%' 281 ORDER BY `id` DESC LIMIT %d, %d;", $table, $s, $s, $db_page, $perPage ); 282 $total_query = $wpdb->prepare( "SELECT COUNT(*) FROM %i WHERE `text1` LIKE '%%%s%' OR `text2` LIKE '%%%s%';", $table, $s, $s ); 283 284 $this->data = $wpdb->get_results( $query, ARRAY_A ); 284 285 285 286 $this->set_pagination_args( [ 286 'total_items' => $wpdb->get_var( "SELECT COUNT(*) FROM `{$wpdb->prefix}woocommerce_ir`{$search};"),287 'per_page' => $perPage,287 'total_items' => $wpdb->get_var( $total_query ), 288 'per_page' => $perPage, 288 289 ] ); 289 290 -
persian-woocommerce/trunk/include/gateways/class-zibal.php
r3091092 r3092528 12 12 add_action( 'after_plugin_row_zibal-payment-gateway-for-woocommerce/index.php', function ( $plugin_file, $plugin_data, $status ) { 13 13 echo '<tr class="inactive"><td> </td><td colspan="2"> 14 <div class="notice inline notice-warning notice-alt"><p>افزونه «<strong>درگاه پرداخت زیبال برای فروشگاه ساز ووکامرس</strong>» درون بسته ووکامرس فارسی وجود دارد و نیاز به فعال سازی نیست. به صفحه <a href="' . admin_url( 'admin.php?page=wc-settings&tab=checkout') . '">ووکامرس > پیکربندی > تسویه حساب</a> مراجعه کنید.</p></div>14 <div class="notice inline notice-warning notice-alt"><p>افزونه «<strong>درگاه پرداخت زیبال برای فروشگاه ساز ووکامرس</strong>» درون بسته ووکامرس فارسی وجود دارد و نیاز به فعال سازی نیست. به صفحه <a href="' . esc_url(admin_url( 'admin.php?page=wc-settings&tab=checkout' )) . '">ووکامرس > پیکربندی > تسویه حساب</a> مراجعه کنید.</p></div> 15 15 </td> 16 16 </tr>'; -
persian-woocommerce/trunk/include/tools/class-date.php
r2988022 r3092528 304 304 foreach ( $dates as $year => $months ) { 305 305 306 printf( '<optgroup label="سال %s">', CalendarUtils::convertNumbers( $year ));306 printf( '<optgroup label="سال %s">', esc_attr(CalendarUtils::convertNumbers( $year) )); 307 307 308 308 foreach ( $months as $month => $count ) { … … 417 417 foreach ( $dates as $year => $months ) { 418 418 419 printf( '<optgroup label="سال %s">', CalendarUtils::convertNumbers( $year ));419 printf( '<optgroup label="سال %s">', esc_attr(CalendarUtils::convertNumbers( $year ) )); 420 420 421 421 foreach ( $months as $month => $count ) { -
persian-woocommerce/trunk/include/tools/class-general.php
r2863440 r3092528 1 1 <?php 2 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } 3 5 class PW_Tools_General { 4 6 -
persian-woocommerce/trunk/include/tools/class-price.php
r2861939 r3092528 76 76 if ( WC()->cart->get_total( null ) < $minimum ) { 77 77 78 $message = sprintf( __( 'مبلغ سفارش شما %s می باشد، حداقل مبلغ جهت ثبت سفارش %s است.' ), wc_price( WC()->cart->get_total( null ) ), wc_price( $minimum ) );78 $message = sprintf('مبلغ سفارش شما %s می باشد، حداقل مبلغ جهت ثبت سفارش %s است.', wc_price( WC()->cart->get_total( null ) ), wc_price( $minimum ) ); 79 79 80 80 if ( is_cart() ) { -
persian-woocommerce/trunk/include/view/html-admin-page-about.php
r2861939 r3092528 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 3 ?> 1 4 <div class="wrap about-wrap persian-woocommerce"> 2 5 <h2>به دنیای ووکامرس فارسی خوش آمدید!</h2> … … 5 8 6 9 <div class="wp-badge" 7 style="background-color:#d8bfd8 !important;background-image:url('<?php echo PW()->plugin_url( 'assets/images/about.png'); ?>') !important;background-position: center center;background-size: 167px auto !important;"></div>10 style="background-color:#d8bfd8 !important;background-image:url('<?php echo esc_url(PW()->plugin_url( 'assets/images/about.png' )); ?>') !important;background-position: center center;background-size: 167px auto !important;"></div> 8 11 9 12 -
persian-woocommerce/trunk/include/view/html-admin-page-melipayamak.php
r2988022 r3092528 83 83 84 84 <div class="text-center mb-2"> 85 <a href="<?php echo admin_url( 'plugin-install.php?tab=plugin-information&plugin=persian-woocommerce-sms'); ?>"85 <a href="<?php echo esc_url(admin_url( 'plugin-install.php?tab=plugin-information&plugin=persian-woocommerce-sms' )); ?>" 86 86 class="flex w-full items-center justify-center gap-2 bg-gray-button rounded-[3px] py-3 sm:px-5 px-3 hover:shadow-xl hover:-translate-y-0.5 a2:hover" 87 87 target="_blank"> … … 256 256 257 257 <div class="text-center mb-2"> 258 <a href="<?php echo admin_url( 'plugin-install.php?tab=plugin-information&plugin=persian-woocommerce-sms'); ?>"258 <a href="<?php echo esc_url(admin_url( 'plugin-install.php?tab=plugin-information&plugin=persian-woocommerce-sms' )); ?>" 259 259 class="flex w-full items-center justify-center gap-2 bg-gray-button rounded-[3px] py-3 sm:px-5 px-3 hover:shadow-xl hover:-translate-y-0.5 a2:hover" 260 260 target="_blank">
Note: See TracChangeset
for help on using the changeset viewer.