From af6ce18c1c1c1c7c8b06445a10cd87dcb1239678 Mon Sep 17 00:00:00 2001 From: MahdiSarani Date: Sun, 10 Dec 2023 13:47:17 +0330 Subject: [PATCH] fixed wp errors --- README.txt | 5 +++-- class-wp-payping-donation.php | 10 +++++----- donation-payping-plugin.php | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 donation-payping-plugin.php diff --git a/README.txt b/README.txt index c01ac97..00a2dff 100644 --- a/README.txt +++ b/README.txt @@ -1,9 +1,10 @@ -=== WP PayPing Donation === +=== PayPing Donation === Contributors: payping, mahdisarani, hadihosseini Tags: payping, donation, iran, wp donation, افزونه دونیت, حمایت مالی, پی پینگ Requires at least: 4.0.0 -Tested up to: 6.2.2 +Tested up to: 6.4.2 Stable tag: 1.0.0 +Requires PHP: 7.3 License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/class-wp-payping-donation.php b/class-wp-payping-donation.php index e35c555..3e642ae 100644 --- a/class-wp-payping-donation.php +++ b/class-wp-payping-donation.php @@ -12,9 +12,9 @@ public function __construct() { add_shortcode('PayPingDonate', [$this, 'Donate_PayPing_Script_shortcode']); } public function callback_for_setting_up_scripts(){ - wp_register_style( 'index-donate', DPPDU . 'assets/css/index.css' ); + wp_register_style( 'index-donate', DonationPPDU . 'assets/css/index.css' ); wp_enqueue_style( 'index-donate' ); - wp_enqueue_script( 'donate-ajax', DPPDU . 'assets/js/donate-ajax.js', array('jquery'), null, true ); + wp_enqueue_script( 'donate-ajax', DonationPPDU . 'assets/js/donate-ajax.js', array('jquery'), null, true ); wp_localize_script( 'donate-ajax', 'donate_ajax_obj', @@ -416,16 +416,16 @@ public function Donate_PayPing_Script(){ $Pages = array_intersect( $wordpress_pages, $select_pages ); $ppScript = get_option( 'Script' ); if( in_array( "all" , $select_pages ) ){ - echo sanitize_option( 'pp_option', $ppScript ); + echo esc_html(sanitize_option( 'pp_option', $ppScript )); }elseif( ! empty( $Pages ) || ! empty( $Pages_Ids_array ) ){ foreach( $Pages as $Page ){ if( $Page() ){ - echo sanitize_option( 'pp_option', $ppScript ); + echo esc_html(sanitize_option( 'pp_option', $ppScript )); exit; }else{ foreach( $Pages_Ids_array as $page ){ if( is_page( $page ) ){ - echo sanitize_option( 'pp_option', $ppScript ); + echo esc_html(sanitize_option( 'pp_option', $ppScript )); } } } diff --git a/donation-payping-plugin.php b/donation-payping-plugin.php new file mode 100644 index 0000000..7709602 --- /dev/null +++ b/donation-payping-plugin.php @@ -0,0 +1,18 @@ +