@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
@@ -23,17 +23,17 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @return void |
25 | 25 | */ |
26 | -function give_trigger_donation_receipt( $payment_id ) { |
|
26 | +function give_trigger_donation_receipt($payment_id) { |
|
27 | 27 | // Make sure we don't send a receipt while editing a donation. |
28 | - if ( isset( $_POST['give-action'] ) && 'edit_payment' == $_POST['give-action'] ) { |
|
28 | + if (isset($_POST['give-action']) && 'edit_payment' == $_POST['give-action']) { |
|
29 | 29 | return; |
30 | 30 | } |
31 | 31 | |
32 | 32 | // Send email. |
33 | - give_email_donation_receipt( $payment_id ); |
|
33 | + give_email_donation_receipt($payment_id); |
|
34 | 34 | } |
35 | 35 | |
36 | -add_action( 'give_complete_donation', 'give_trigger_donation_receipt', 999, 1 ); |
|
36 | +add_action('give_complete_donation', 'give_trigger_donation_receipt', 999, 1); |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * Resend the Email Donation Receipt. (This can be done from the Donation History Page) |
@@ -44,29 +44,29 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @return void |
46 | 46 | */ |
47 | -function give_resend_donation_receipt( $data ) { |
|
47 | +function give_resend_donation_receipt($data) { |
|
48 | 48 | |
49 | - $purchase_id = absint( $data['purchase_id'] ); |
|
49 | + $purchase_id = absint($data['purchase_id']); |
|
50 | 50 | |
51 | - if ( empty( $purchase_id ) ) { |
|
51 | + if (empty($purchase_id)) { |
|
52 | 52 | return; |
53 | 53 | } |
54 | 54 | |
55 | - if ( ! current_user_can( 'edit_give_payments', $purchase_id ) ) { |
|
56 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
55 | + if ( ! current_user_can('edit_give_payments', $purchase_id)) { |
|
56 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
57 | 57 | } |
58 | 58 | |
59 | - give_email_donation_receipt( $purchase_id, false ); |
|
59 | + give_email_donation_receipt($purchase_id, false); |
|
60 | 60 | |
61 | - wp_redirect( add_query_arg( array( |
|
61 | + wp_redirect(add_query_arg(array( |
|
62 | 62 | 'give-message' => 'email_sent', |
63 | 63 | 'give-action' => false, |
64 | 64 | 'purchase_id' => false |
65 | - ) ) ); |
|
65 | + ))); |
|
66 | 66 | exit; |
67 | 67 | } |
68 | 68 | |
69 | -add_action( 'give_email_links', 'give_resend_donation_receipt' ); |
|
69 | +add_action('give_email_links', 'give_resend_donation_receipt'); |
|
70 | 70 | |
71 | 71 | /** |
72 | 72 | * Trigger the sending of a Test Email |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @return void |
79 | 79 | */ |
80 | -function give_send_test_email( $data ) { |
|
81 | - if ( ! wp_verify_nonce( $data['_wpnonce'], 'give-test-email' ) ) { |
|
80 | +function give_send_test_email($data) { |
|
81 | + if ( ! wp_verify_nonce($data['_wpnonce'], 'give-test-email')) { |
|
82 | 82 | return; |
83 | 83 | } |
84 | 84 | |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | give_email_test_donation_receipt(); |
87 | 87 | |
88 | 88 | // Remove the test email query arg. |
89 | - wp_redirect( remove_query_arg( 'give_action' ) ); |
|
89 | + wp_redirect(remove_query_arg('give_action')); |
|
90 | 90 | exit; |
91 | 91 | } |
92 | 92 | |
93 | -add_action( 'give_send_test_email', 'give_send_test_email' ); |
|
93 | +add_action('give_send_test_email', 'give_send_test_email'); |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
@@ -36,29 +36,29 @@ discard block |
||
36 | 36 | /** |
37 | 37 | * Templates |
38 | 38 | */ |
39 | - add_filter( 'template_include', array( __CLASS__, 'template_loader' ) ); |
|
39 | + add_filter('template_include', array(__CLASS__, 'template_loader')); |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Content Wrappers |
43 | 43 | */ |
44 | - add_action( 'give_before_main_content', 'give_output_content_wrapper', 10 ); |
|
45 | - add_action( 'give_after_main_content', 'give_output_content_wrapper_end', 10 ); |
|
44 | + add_action('give_before_main_content', 'give_output_content_wrapper', 10); |
|
45 | + add_action('give_after_main_content', 'give_output_content_wrapper_end', 10); |
|
46 | 46 | |
47 | 47 | /** |
48 | 48 | * Entry Summary Classes |
49 | 49 | */ |
50 | - add_filter( 'give_forms_single_summary_classes', array( $this, 'give_set_single_summary_classes' ) ); |
|
50 | + add_filter('give_forms_single_summary_classes', array($this, 'give_set_single_summary_classes')); |
|
51 | 51 | |
52 | 52 | /** |
53 | 53 | * Sidebar |
54 | 54 | */ |
55 | - add_action( 'give_before_single_form_summary', array( $this, 'give_output_sidebar_option' ), 1 ); |
|
55 | + add_action('give_before_single_form_summary', array($this, 'give_output_sidebar_option'), 1); |
|
56 | 56 | |
57 | 57 | /** |
58 | 58 | * Single Forms Summary Box |
59 | 59 | */ |
60 | - add_action( 'give_single_form_summary', 'give_template_single_title', 5 ); |
|
61 | - add_action( 'give_single_form_summary', 'give_get_donation_form', 10 ); |
|
60 | + add_action('give_single_form_summary', 'give_template_single_title', 5); |
|
61 | + add_action('give_single_form_summary', 'give_get_donation_form', 10); |
|
62 | 62 | |
63 | 63 | } |
64 | 64 | |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | * |
74 | 74 | * @return string $classes List of space separated class names. |
75 | 75 | */ |
76 | - public function give_set_single_summary_classes( $classes ) { |
|
76 | + public function give_set_single_summary_classes($classes) { |
|
77 | 77 | |
78 | 78 | //Add full width class when feature image is disabled AND no widgets are present |
79 | - if ( ! give_is_setting_enabled( give_get_option( 'form_sidebar' ) ) ) { |
|
79 | + if ( ! give_is_setting_enabled(give_get_option('form_sidebar'))) { |
|
80 | 80 | $classes .= ' give-full-width'; |
81 | 81 | } |
82 | 82 | |
@@ -97,11 +97,11 @@ discard block |
||
97 | 97 | public function give_output_sidebar_option() { |
98 | 98 | |
99 | 99 | //Add full width class when feature image is disabled AND no widgets are present |
100 | - if ( give_is_setting_enabled( give_get_option( 'form_sidebar' ) ) ) { |
|
101 | - add_action( 'give_before_single_form_summary', 'give_left_sidebar_pre_wrap', 5 ); |
|
102 | - add_action( 'give_before_single_form_summary', 'give_show_form_images', 10 ); |
|
103 | - add_action( 'give_before_single_form_summary', 'give_get_forms_sidebar', 20 ); |
|
104 | - add_action( 'give_before_single_form_summary', 'give_left_sidebar_post_wrap', 30 ); |
|
100 | + if (give_is_setting_enabled(give_get_option('form_sidebar'))) { |
|
101 | + add_action('give_before_single_form_summary', 'give_left_sidebar_pre_wrap', 5); |
|
102 | + add_action('give_before_single_form_summary', 'give_show_form_images', 10); |
|
103 | + add_action('give_before_single_form_summary', 'give_get_forms_sidebar', 20); |
|
104 | + add_action('give_before_single_form_summary', 'give_left_sidebar_post_wrap', 30); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | } |
@@ -123,20 +123,20 @@ discard block |
||
123 | 123 | * |
124 | 124 | * @return string $template |
125 | 125 | */ |
126 | - public static function template_loader( $template ) { |
|
127 | - $find = array( 'give.php' ); |
|
126 | + public static function template_loader($template) { |
|
127 | + $find = array('give.php'); |
|
128 | 128 | $file = ''; |
129 | 129 | |
130 | - if ( is_single() && get_post_type() == 'give_forms' ) { |
|
130 | + if (is_single() && get_post_type() == 'give_forms') { |
|
131 | 131 | $file = 'single-give-form.php'; |
132 | 132 | $find[] = $file; |
133 | - $find[] = apply_filters( 'give_template_path', 'give/' ) . $file; |
|
133 | + $find[] = apply_filters('give_template_path', 'give/').$file; |
|
134 | 134 | } |
135 | 135 | |
136 | - if ( $file ) { |
|
137 | - $template = locate_template( array_unique( $find ) ); |
|
138 | - if ( ! $template ) { |
|
139 | - $template = GIVE_PLUGIN_DIR . '/templates/' . $file; |
|
136 | + if ($file) { |
|
137 | + $template = locate_template(array_unique($find)); |
|
138 | + if ( ! $template) { |
|
139 | + $template = GIVE_PLUGIN_DIR.'/templates/'.$file; |
|
140 | 140 | } |
141 | 141 | } |
142 | 142 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @since 1.0 |
21 | 21 | * @return void |
22 | 22 | */ |
23 | -add_action( 'give_manual_cc_form', '__return_false' ); |
|
23 | +add_action('give_manual_cc_form', '__return_false'); |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Processes the donation data and uses the Manual Payment gateway to record |
@@ -32,17 +32,17 @@ discard block |
||
32 | 32 | * |
33 | 33 | * @return void |
34 | 34 | */ |
35 | -function give_manual_payment( $purchase_data ) { |
|
35 | +function give_manual_payment($purchase_data) { |
|
36 | 36 | |
37 | - if ( ! wp_verify_nonce( $purchase_data['gateway_nonce'], 'give-gateway' ) ) { |
|
38 | - wp_die( esc_html__( 'Nonce verification failed.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
37 | + if ( ! wp_verify_nonce($purchase_data['gateway_nonce'], 'give-gateway')) { |
|
38 | + wp_die(esc_html__('Nonce verification failed.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | //Create payment_data array |
42 | 42 | $payment_data = array( |
43 | 43 | 'price' => $purchase_data['price'], |
44 | 44 | 'give_form_title' => $purchase_data['post_data']['give-form-title'], |
45 | - 'give_form_id' => intval( $purchase_data['post_data']['give-form-id'] ), |
|
45 | + 'give_form_id' => intval($purchase_data['post_data']['give-form-id']), |
|
46 | 46 | 'give_price_id' => isset($purchase_data['post_data']['give-price-id']) ? $purchase_data['post_data']['give-price-id'] : '', |
47 | 47 | 'date' => $purchase_data['date'], |
48 | 48 | 'user_email' => $purchase_data['user_email'], |
@@ -52,24 +52,24 @@ discard block |
||
52 | 52 | 'status' => 'pending' |
53 | 53 | ); |
54 | 54 | // Record the pending payment |
55 | - $payment = give_insert_payment( $payment_data ); |
|
55 | + $payment = give_insert_payment($payment_data); |
|
56 | 56 | |
57 | - if ( $payment ) { |
|
58 | - give_update_payment_status( $payment, 'publish' ); |
|
57 | + if ($payment) { |
|
58 | + give_update_payment_status($payment, 'publish'); |
|
59 | 59 | give_send_to_success_page(); |
60 | 60 | } else { |
61 | 61 | give_record_gateway_error( |
62 | - esc_html__( 'Payment Error', 'give' ), |
|
62 | + esc_html__('Payment Error', 'give'), |
|
63 | 63 | sprintf( |
64 | 64 | /* translators: %s: payment data */ |
65 | - esc_html__( 'The payment creation failed while processing a manual (free or test) donation. Payment data: %s', 'give' ), |
|
66 | - json_encode( $payment_data ) |
|
65 | + esc_html__('The payment creation failed while processing a manual (free or test) donation. Payment data: %s', 'give'), |
|
66 | + json_encode($payment_data) |
|
67 | 67 | ), |
68 | 68 | $payment |
69 | 69 | ); |
70 | 70 | // If errors are present, send the user back to the donation page so they can be corrected |
71 | - give_send_back_to_checkout( '?payment-mode=' . $purchase_data['post_data']['give-gateway'] ); |
|
71 | + give_send_back_to_checkout('?payment-mode='.$purchase_data['post_data']['give-gateway']); |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | |
75 | -add_action( 'give_gateway_manual', 'give_manual_payment' ); |
|
75 | +add_action('give_gateway_manual', 'give_manual_payment'); |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | * @since 1.8 |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; // Exit if accessed directly |
14 | 14 | } |
15 | 15 | |
16 | -if ( ! class_exists( 'Give_Settings_License' ) ) : |
|
16 | +if ( ! class_exists('Give_Settings_License')) : |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Give_Settings_License. |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function __construct() { |
45 | 45 | $this->id = 'licenses'; |
46 | - $this->label = esc_html__( 'Licenses', 'give' ); |
|
46 | + $this->label = esc_html__('Licenses', 'give'); |
|
47 | 47 | |
48 | - add_filter( 'give-settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); |
|
49 | - add_action( "give-settings_settings_{$this->id}_page", array( $this, 'output' ) ); |
|
48 | + add_filter('give-settings_tabs_array', array($this, 'add_settings_page'), 20); |
|
49 | + add_action("give-settings_settings_{$this->id}_page", array($this, 'output')); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | * @param array $pages Lst of pages. |
57 | 57 | * @return array |
58 | 58 | */ |
59 | - public function add_settings_page( $pages ) { |
|
59 | + public function add_settings_page($pages) { |
|
60 | 60 | $setting = $this->get_settings(); |
61 | 61 | // Bailout: Do not add licenses setting tab if it does not contain any setting fields. |
62 | - if( ! empty( $setting ) ) { |
|
63 | - $pages[ $this->id ] = $this->label; |
|
62 | + if ( ! empty($setting)) { |
|
63 | + $pages[$this->id] = $this->label; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | return $pages; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * Filter the licenses settings. |
80 | 80 | * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8 |
81 | 81 | */ |
82 | - $settings = apply_filters( 'give_settings_licenses', $settings ); |
|
82 | + $settings = apply_filters('give_settings_licenses', $settings); |
|
83 | 83 | |
84 | 84 | /** |
85 | 85 | * Filter the settings. |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @since 1.8 |
88 | 88 | * @param array $settings |
89 | 89 | */ |
90 | - $settings = apply_filters( 'give_get_settings_' . $this->id, $settings ); |
|
90 | + $settings = apply_filters('give_get_settings_'.$this->id, $settings); |
|
91 | 91 | |
92 | 92 | // Output. |
93 | 93 | return $settings; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | public function output() { |
103 | 103 | $settings = $this->get_settings(); |
104 | 104 | |
105 | - Give_Admin_Settings::output_fields( $settings, 'give_settings' ); |
|
105 | + Give_Admin_Settings::output_fields($settings, 'give_settings'); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | * @since 1.8 |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; // Exit if accessed directly |
14 | 14 | } |
15 | 15 | |
16 | -if ( ! class_exists( 'Give_Settings_Addon' ) ) : |
|
16 | +if ( ! class_exists('Give_Settings_Addon')) : |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Give_Settings_Addon. |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function __construct() { |
28 | 28 | $this->id = 'addons'; |
29 | - $this->label = esc_html__( 'Add-ons', 'give' ); |
|
29 | + $this->label = esc_html__('Add-ons', 'give'); |
|
30 | 30 | |
31 | 31 | parent::__construct(); |
32 | 32 | } |
@@ -38,12 +38,12 @@ discard block |
||
38 | 38 | * @param $setting_tab |
39 | 39 | * @return string |
40 | 40 | */ |
41 | - function set_default_setting_tab( $setting_tab ) { |
|
41 | + function set_default_setting_tab($setting_tab) { |
|
42 | 42 | $default_tab = ''; |
43 | 43 | |
44 | 44 | // Set default tab to first setting tab. |
45 | - if( $sections = array_keys( $this->get_sections() ) ) { |
|
46 | - $default_tab = current( $sections ); |
|
45 | + if ($sections = array_keys($this->get_sections())) { |
|
46 | + $default_tab = current($sections); |
|
47 | 47 | } |
48 | 48 | return $default_tab; |
49 | 49 | } |
@@ -55,11 +55,11 @@ discard block |
||
55 | 55 | * @param array $pages Lst of pages. |
56 | 56 | * @return array |
57 | 57 | */ |
58 | - public function add_settings_page( $pages ) { |
|
58 | + public function add_settings_page($pages) { |
|
59 | 59 | $setting = $this->get_settings(); |
60 | 60 | // Bailout: Do not add addons setting tab if it does not contain any setting fields. |
61 | - if( ! empty( $setting ) ) { |
|
62 | - $pages[ $this->id ] = $this->label; |
|
61 | + if ( ! empty($setting)) { |
|
62 | + $pages[$this->id] = $this->label; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | return $pages; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * Filter the addons settings. |
79 | 79 | * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8 |
80 | 80 | */ |
81 | - $settings = apply_filters( 'give_settings_addons', $settings ); |
|
81 | + $settings = apply_filters('give_settings_addons', $settings); |
|
82 | 82 | |
83 | 83 | /** |
84 | 84 | * Filter the settings. |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * @since 1.8 |
87 | 87 | * @param array $settings |
88 | 88 | */ |
89 | - $settings = apply_filters( 'give_get_settings_' . $this->id, $settings ); |
|
89 | + $settings = apply_filters('give_get_settings_'.$this->id, $settings); |
|
90 | 90 | |
91 | 91 | // Output. |
92 | 92 | return $settings; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
@@ -22,19 +22,19 @@ discard block |
||
22 | 22 | */ |
23 | 23 | function give_add_shortcode_to_publish_metabox() { |
24 | 24 | |
25 | - if ( 'give_forms' !== get_post_type() ) { |
|
25 | + if ('give_forms' !== get_post_type()) { |
|
26 | 26 | return false; |
27 | 27 | } |
28 | 28 | global $post; |
29 | 29 | |
30 | 30 | //Only enqueue scripts for CPT on post type screen |
31 | - if ( 'give_forms' === $post->post_type ) { |
|
31 | + if ('give_forms' === $post->post_type) { |
|
32 | 32 | //Shortcode column with select all input |
33 | - $shortcode = htmlentities( '[give_form id="' . $post->ID . '"]' ); |
|
34 | - echo '<div class="shortcode-wrap box-sizing"><label for="shortcode-input">' . esc_html__( 'Give Form Shortcode:', 'give' ) . '</label><input onClick="this.setSelectionRange(0, this.value.length)" type="text" name="shortcode-input" id="shortcode-input" class="shortcode-input" readonly value="' . $shortcode . '"></div>'; |
|
33 | + $shortcode = htmlentities('[give_form id="'.$post->ID.'"]'); |
|
34 | + echo '<div class="shortcode-wrap box-sizing"><label for="shortcode-input">'.esc_html__('Give Form Shortcode:', 'give').'</label><input onClick="this.setSelectionRange(0, this.value.length)" type="text" name="shortcode-input" id="shortcode-input" class="shortcode-input" readonly value="'.$shortcode.'"></div>'; |
|
35 | 35 | |
36 | 36 | } |
37 | 37 | |
38 | 38 | } |
39 | 39 | |
40 | -add_action( 'post_submitbox_misc_actions', 'give_add_shortcode_to_publish_metabox' ); |
|
40 | +add_action('post_submitbox_misc_actions', 'give_add_shortcode_to_publish_metabox'); |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
@@ -24,14 +24,14 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @return string |
26 | 26 | */ |
27 | -function give_admin_rate_us( $footer_text ) { |
|
27 | +function give_admin_rate_us($footer_text) { |
|
28 | 28 | global $typenow; |
29 | 29 | |
30 | - if ( $typenow == 'give_forms' ) { |
|
30 | + if ($typenow == 'give_forms') { |
|
31 | 31 | $rate_text = sprintf( |
32 | 32 | /* translators: %s: Link to 5 star rating */ |
33 | - __( 'If you like <strong>Give</strong> please leave us a %s rating. It takes a minute and helps a lot. Thanks in advance!', 'give' ), |
|
34 | - '<a href="https://wordpress.org/support/view/plugin-reviews/give?filter=5#postform" target="_blank" class="give-rating-link" style="text-decoration:none;" data-rated="' . esc_attr__( 'Thanks :)', 'give' ) . '">★★★★★</a>' |
|
33 | + __('If you like <strong>Give</strong> please leave us a %s rating. It takes a minute and helps a lot. Thanks in advance!', 'give'), |
|
34 | + '<a href="https://wordpress.org/support/view/plugin-reviews/give?filter=5#postform" target="_blank" class="give-rating-link" style="text-decoration:none;" data-rated="'.esc_attr__('Thanks :)', 'give').'">★★★★★</a>' |
|
35 | 35 | ); |
36 | 36 | |
37 | 37 | return $rate_text; |
@@ -40,4 +40,4 @@ discard block |
||
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | -add_filter( 'admin_footer_text', 'give_admin_rate_us' ); |
|
43 | +add_filter('admin_footer_text', 'give_admin_rate_us'); |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
@@ -21,10 +21,10 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function __construct() { |
23 | 23 | |
24 | - $this->shortcode['title'] = esc_html__( 'Login', 'give' ); |
|
25 | - $this->shortcode['label'] = esc_html__( 'Login', 'give' ); |
|
24 | + $this->shortcode['title'] = esc_html__('Login', 'give'); |
|
25 | + $this->shortcode['label'] = esc_html__('Login', 'give'); |
|
26 | 26 | |
27 | - parent::__construct( 'give_login' ); |
|
27 | + parent::__construct('give_login'); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -37,23 +37,23 @@ discard block |
||
37 | 37 | return array( |
38 | 38 | array( |
39 | 39 | 'type' => 'container', |
40 | - 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Login Redirect URL (optional):', 'give' ) ), |
|
40 | + 'html' => sprintf('<p class="no-margin">%s</p>', esc_html__('Login Redirect URL (optional):', 'give')), |
|
41 | 41 | ), |
42 | 42 | array( |
43 | 43 | 'type' => 'textbox', |
44 | 44 | 'name' => 'login-redirect', |
45 | 45 | 'minWidth' => 320, |
46 | - 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after login.', 'give' ), |
|
46 | + 'tooltip' => esc_attr__('Enter an URL here to redirect to after login.', 'give'), |
|
47 | 47 | ), |
48 | 48 | array( |
49 | 49 | 'type' => 'container', |
50 | - 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ), |
|
50 | + 'html' => sprintf('<p class="no-margin">%s</p>', esc_html__('Logout Redirect URL (optional):', 'give')), |
|
51 | 51 | ), |
52 | 52 | array( |
53 | 53 | 'type' => 'textbox', |
54 | 54 | 'name' => 'logout-redirect', |
55 | 55 | 'minWidth' => 320, |
56 | - 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ), |
|
56 | + 'tooltip' => esc_attr__('Enter an URL here to redirect to after logout.', 'give'), |
|
57 | 57 | ), |
58 | 58 | ); |
59 | 59 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function __construct() { |
23 | 23 | |
24 | - $this->shortcode['label'] = esc_html__( 'Profile Editor', 'give' ); |
|
24 | + $this->shortcode['label'] = esc_html__('Profile Editor', 'give'); |
|
25 | 25 | |
26 | - parent::__construct( 'give_profile_editor' ); |
|
26 | + parent::__construct('give_profile_editor'); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 |