@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | // Exit if accessed directly |
| 15 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 15 | +if ( ! defined('ABSPATH')) { |
|
| 16 | 16 | exit; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -78,15 +78,15 @@ discard block |
||
| 78 | 78 | * |
| 79 | 79 | * @since 1.0 |
| 80 | 80 | */ |
| 81 | - public function __construct( $_data ) { |
|
| 81 | + public function __construct($_data) { |
|
| 82 | 82 | |
| 83 | 83 | $this->data = $_data; |
| 84 | 84 | |
| 85 | 85 | // Generate unique ID |
| 86 | - $this->id = md5( rand() ); |
|
| 86 | + $this->id = md5(rand()); |
|
| 87 | 87 | |
| 88 | 88 | // Setup default options; |
| 89 | - $this->options = apply_filters( 'give_graph_args', array( |
|
| 89 | + $this->options = apply_filters('give_graph_args', array( |
|
| 90 | 90 | 'y_mode' => null, |
| 91 | 91 | 'x_mode' => null, |
| 92 | 92 | 'y_decimals' => 0, |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | 'bars' => true, |
| 104 | 104 | 'lines' => false, |
| 105 | 105 | 'points' => true |
| 106 | - ) ); |
|
| 106 | + )); |
|
| 107 | 107 | |
| 108 | 108 | } |
| 109 | 109 | |
@@ -115,8 +115,8 @@ discard block |
||
| 115 | 115 | * |
| 116 | 116 | * @since 1.0 |
| 117 | 117 | */ |
| 118 | - public function set( $key, $value ) { |
|
| 119 | - $this->options[ $key ] = $value; |
|
| 118 | + public function set($key, $value) { |
|
| 119 | + $this->options[$key] = $value; |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | * |
| 127 | 127 | * @since 1.0 |
| 128 | 128 | */ |
| 129 | - public function get( $key ) { |
|
| 130 | - return isset( $this->options[ $key ] ) ? $this->options[ $key ] : false; |
|
| 129 | + public function get($key) { |
|
| 130 | + return isset($this->options[$key]) ? $this->options[$key] : false; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | * @since 1.0 |
| 137 | 137 | */ |
| 138 | 138 | public function get_data() { |
| 139 | - return apply_filters( 'give_get_graph_data', $this->data, $this ); |
|
| 139 | + return apply_filters('give_get_graph_data', $this->data, $this); |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
@@ -146,19 +146,19 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | public function load_scripts() { |
| 148 | 148 | // Use minified libraries if SCRIPT_DEBUG is turned off |
| 149 | - $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; |
|
| 149 | + $suffix = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min'; |
|
| 150 | 150 | |
| 151 | - wp_register_script( 'jquery-flot-orderbars', GIVE_PLUGIN_URL . 'assets/js/plugins/jquery.flot.orderBars' . $suffix . '.js', array('jquery-flot'), GIVE_VERSION ); |
|
| 152 | - wp_enqueue_script( 'jquery-flot-orderbars' ); |
|
| 151 | + wp_register_script('jquery-flot-orderbars', GIVE_PLUGIN_URL.'assets/js/plugins/jquery.flot.orderBars'.$suffix.'.js', array('jquery-flot'), GIVE_VERSION); |
|
| 152 | + wp_enqueue_script('jquery-flot-orderbars'); |
|
| 153 | 153 | |
| 154 | - wp_register_script( 'jquery-flot-time', GIVE_PLUGIN_URL . 'assets/js/plugins/jquery.flot.time' . $suffix . '.js', array('jquery-flot'), GIVE_VERSION ); |
|
| 155 | - wp_enqueue_script( 'jquery-flot-time' ); |
|
| 154 | + wp_register_script('jquery-flot-time', GIVE_PLUGIN_URL.'assets/js/plugins/jquery.flot.time'.$suffix.'.js', array('jquery-flot'), GIVE_VERSION); |
|
| 155 | + wp_enqueue_script('jquery-flot-time'); |
|
| 156 | 156 | |
| 157 | - wp_register_script( 'jquery-flot-resize', GIVE_PLUGIN_URL . 'assets/js/plugins/jquery.flot.resize' . $suffix . '.js', array('jquery-flot'), GIVE_VERSION ); |
|
| 158 | - wp_enqueue_script( 'jquery-flot-resize' ); |
|
| 157 | + wp_register_script('jquery-flot-resize', GIVE_PLUGIN_URL.'assets/js/plugins/jquery.flot.resize'.$suffix.'.js', array('jquery-flot'), GIVE_VERSION); |
|
| 158 | + wp_enqueue_script('jquery-flot-resize'); |
|
| 159 | 159 | |
| 160 | - wp_register_script( 'jquery-flot', GIVE_PLUGIN_URL . 'assets/js/plugins/jquery.flot' . $suffix . '.js', false, GIVE_VERSION ); |
|
| 161 | - wp_enqueue_script( 'jquery-flot' ); |
|
| 160 | + wp_register_script('jquery-flot', GIVE_PLUGIN_URL.'assets/js/plugins/jquery.flot'.$suffix.'.js', false, GIVE_VERSION); |
|
| 161 | + wp_enqueue_script('jquery-flot'); |
|
| 162 | 162 | |
| 163 | 163 | } |
| 164 | 164 | |
@@ -185,13 +185,13 @@ discard block |
||
| 185 | 185 | [ |
| 186 | 186 | <?php |
| 187 | 187 | $order = 0; |
| 188 | - foreach( $this->get_data() as $label => $data ) : |
|
| 188 | + foreach ($this->get_data() as $label => $data) : |
|
| 189 | 189 | ?> |
| 190 | 190 | { |
| 191 | - label : "<?php echo esc_attr( $label ); ?>", |
|
| 192 | - id : "<?php echo sanitize_key( $label ); ?>", |
|
| 191 | + label : "<?php echo esc_attr($label); ?>", |
|
| 192 | + id : "<?php echo sanitize_key($label); ?>", |
|
| 193 | 193 | // data format is: [ point on x, value on y ] |
| 194 | - data : [<?php foreach( $data as $point ) { echo '[' . implode( ',', $point ) . '],'; } ?>], |
|
| 194 | + data : [<?php foreach ($data as $point) { echo '['.implode(',', $point).'],'; } ?>], |
|
| 195 | 195 | points: { |
| 196 | 196 | show: <?php echo $this->options['points'] ? 'true' : 'false'; ?>, |
| 197 | 197 | }, |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | fill : true, |
| 207 | 207 | fillColor: {colors: [{opacity: 0.4}, {opacity: 0.1}]} |
| 208 | 208 | }, |
| 209 | - <?php if( $this->options[ 'multiple_y_axes' ] ) : ?> |
|
| 209 | + <?php if ($this->options['multiple_y_axes']) : ?> |
|
| 210 | 210 | yaxis : <?php echo $yaxis_count; ?> |
| 211 | 211 | <?php endif; ?> |
| 212 | 212 | |
@@ -220,10 +220,10 @@ discard block |
||
| 220 | 220 | grid: { |
| 221 | 221 | show : true, |
| 222 | 222 | aboveData : false, |
| 223 | - color : "<?php echo $this->options[ 'color' ]; ?>", |
|
| 224 | - backgroundColor: "<?php echo $this->options[ 'bgcolor' ]; ?>", |
|
| 225 | - borderColor : "<?php echo $this->options[ 'bordercolor' ]; ?>", |
|
| 226 | - borderWidth : <?php echo absint( $this->options[ 'borderwidth' ] ); ?>, |
|
| 223 | + color : "<?php echo $this->options['color']; ?>", |
|
| 224 | + backgroundColor: "<?php echo $this->options['bgcolor']; ?>", |
|
| 225 | + borderColor : "<?php echo $this->options['bordercolor']; ?>", |
|
| 226 | + borderWidth : <?php echo absint($this->options['borderwidth']); ?>, |
|
| 227 | 227 | clickable : false, |
| 228 | 228 | hoverable : true |
| 229 | 229 | }, |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | mode : "<?php echo $this->options['x_mode']; ?>", |
| 235 | 235 | timeFormat : "<?php echo $this->options['x_mode'] == 'time' ? $this->options['time_format'] : ''; ?>", |
| 236 | 236 | tickSize : "<?php echo $this->options['x_mode'] == 'time' ? '' : 1; ?>", |
| 237 | - <?php if( $this->options['x_mode'] != 'time' ) : ?> |
|
| 237 | + <?php if ($this->options['x_mode'] != 'time') : ?> |
|
| 238 | 238 | tickDecimals: <?php echo $this->options['x_decimals']; ?> |
| 239 | 239 | <?php endif; ?> |
| 240 | 240 | }, |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | min : 0, |
| 244 | 244 | mode : "<?php echo $this->options['y_mode']; ?>", |
| 245 | 245 | timeFormat : "<?php echo $this->options['y_mode'] == 'time' ? $this->options['time_format'] : ''; ?>", |
| 246 | - <?php if( $this->options['y_mode'] != 'time' ) : ?> |
|
| 246 | + <?php if ($this->options['y_mode'] != 'time') : ?> |
|
| 247 | 247 | tickDecimals: <?php echo $this->options['y_decimals']; ?> |
| 248 | 248 | <?php endif; ?> |
| 249 | 249 | } |
@@ -303,9 +303,9 @@ discard block |
||
| 303 | 303 | * @since 1.0 |
| 304 | 304 | */ |
| 305 | 305 | public function display() { |
| 306 | - do_action( 'give_before_graph', $this ); |
|
| 306 | + do_action('give_before_graph', $this); |
|
| 307 | 307 | echo $this->build_graph(); |
| 308 | - do_action( 'give_after_graph', $this ); |
|
| 308 | + do_action('give_after_graph', $this); |
|
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | } |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | * @return void |
| 20 | 20 | */ |
| 21 | 21 | function give_disable_mandrill_nl2br() { |
| 22 | - add_filter( 'mandrill_nl2br', '__return_false' ); |
|
| 22 | + add_filter('mandrill_nl2br', '__return_false'); |
|
| 23 | 23 | } |
| 24 | -add_action( 'give_email_send_before', 'give_disable_mandrill_nl2br'); |
|
| 24 | +add_action('give_email_send_before', 'give_disable_mandrill_nl2br'); |
|
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | |
| 13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 13 | +if ( ! defined('ABSPATH')) { |
|
| 14 | 14 | exit; |
| 15 | 15 | } |
| 16 | 16 | |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | * @since 1.5 |
| 20 | 20 | */ |
| 21 | 21 | function give_register_batch_recount_store_earnings_tool() { |
| 22 | - add_action( 'give_batch_export_class_include', 'give_include_recount_income_tool_batch_processor', 10, 1 ); |
|
| 22 | + add_action('give_batch_export_class_include', 'give_include_recount_income_tool_batch_processor', 10, 1); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | -add_action( 'give_register_batch_exporter', 'give_register_batch_recount_store_earnings_tool', 10 ); |
|
| 25 | +add_action('give_register_batch_exporter', 'give_register_batch_recount_store_earnings_tool', 10); |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Loads the tools batch processing class for recounting store earnings |
@@ -33,11 +33,11 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @return void |
| 35 | 35 | */ |
| 36 | -function give_include_recount_income_tool_batch_processor( $class ) { |
|
| 36 | +function give_include_recount_income_tool_batch_processor($class) { |
|
| 37 | 37 | |
| 38 | - $file_path = GIVE_PLUGIN_DIR . 'includes/admin/reporting/tools/class-give-tools-recount-income.php'; |
|
| 38 | + $file_path = GIVE_PLUGIN_DIR.'includes/admin/reporting/tools/class-give-tools-recount-income.php'; |
|
| 39 | 39 | |
| 40 | - if ( 'Give_Tools_Recount_Income' === $class && file_exists( $file_path ) ) { |
|
| 40 | + if ('Give_Tools_Recount_Income' === $class && file_exists($file_path)) { |
|
| 41 | 41 | require_once $file_path; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -49,10 +49,10 @@ discard block |
||
| 49 | 49 | * @since 1.5 |
| 50 | 50 | */ |
| 51 | 51 | function give_register_batch_recount_form_tool() { |
| 52 | - add_action( 'give_batch_export_class_include', 'give_include_recount_form_tool_batch_processor', 10, 1 ); |
|
| 52 | + add_action('give_batch_export_class_include', 'give_include_recount_form_tool_batch_processor', 10, 1); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | -add_action( 'give_register_batch_exporter', 'give_register_batch_recount_form_tool', 10 ); |
|
| 55 | +add_action('give_register_batch_exporter', 'give_register_batch_recount_form_tool', 10); |
|
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * Loads the tools batch processing class for recounting download stats |
@@ -63,11 +63,11 @@ discard block |
||
| 63 | 63 | * |
| 64 | 64 | * @return void |
| 65 | 65 | */ |
| 66 | -function give_include_recount_form_tool_batch_processor( $class ) { |
|
| 66 | +function give_include_recount_form_tool_batch_processor($class) { |
|
| 67 | 67 | |
| 68 | - $file_path = GIVE_PLUGIN_DIR . 'includes/admin/reporting/tools/class-give-tools-recount-form-stats.php'; |
|
| 68 | + $file_path = GIVE_PLUGIN_DIR.'includes/admin/reporting/tools/class-give-tools-recount-form-stats.php'; |
|
| 69 | 69 | |
| 70 | - if ( 'Give_Tools_Recount_Form_Stats' === $class && file_exists( $file_path ) ) { |
|
| 70 | + if ('Give_Tools_Recount_Form_Stats' === $class && file_exists($file_path)) { |
|
| 71 | 71 | require_once $file_path; |
| 72 | 72 | } |
| 73 | 73 | |
@@ -78,10 +78,10 @@ discard block |
||
| 78 | 78 | * @since 1.5 |
| 79 | 79 | */ |
| 80 | 80 | function give_register_batch_recount_all_tool() { |
| 81 | - add_action( 'give_batch_export_class_include', 'give_include_recount_all_tool_batch_processor', 10, 1 ); |
|
| 81 | + add_action('give_batch_export_class_include', 'give_include_recount_all_tool_batch_processor', 10, 1); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | -add_action( 'give_register_batch_exporter', 'give_register_batch_recount_all_tool', 10 ); |
|
| 84 | +add_action('give_register_batch_exporter', 'give_register_batch_recount_all_tool', 10); |
|
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Loads the tools batch processing class for recounting all stats |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | * |
| 93 | 93 | * @return void |
| 94 | 94 | */ |
| 95 | -function give_include_recount_all_tool_batch_processor( $class ) { |
|
| 96 | - $file_path = GIVE_PLUGIN_DIR . 'includes/admin/reporting/tools/class-give-tools-recount-all-stats.php'; |
|
| 97 | - if ( 'Give_Tools_Recount_All_Stats' === $class && file_exists( $file_path ) ) { |
|
| 95 | +function give_include_recount_all_tool_batch_processor($class) { |
|
| 96 | + $file_path = GIVE_PLUGIN_DIR.'includes/admin/reporting/tools/class-give-tools-recount-all-stats.php'; |
|
| 97 | + if ('Give_Tools_Recount_All_Stats' === $class && file_exists($file_path)) { |
|
| 98 | 98 | require_once $file_path; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -106,10 +106,10 @@ discard block |
||
| 106 | 106 | * @since 1.5 |
| 107 | 107 | */ |
| 108 | 108 | function give_register_batch_reset_tool() { |
| 109 | - add_action( 'give_batch_export_class_include', 'give_include_reset_tool_batch_processor', 10, 1 ); |
|
| 109 | + add_action('give_batch_export_class_include', 'give_include_reset_tool_batch_processor', 10, 1); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | -add_action( 'give_register_batch_exporter', 'give_register_batch_reset_tool', 10 ); |
|
| 112 | +add_action('give_register_batch_exporter', 'give_register_batch_reset_tool', 10); |
|
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Loads the tools batch processing class for resetting store and product earnings |
@@ -120,11 +120,11 @@ discard block |
||
| 120 | 120 | * |
| 121 | 121 | * @return void |
| 122 | 122 | */ |
| 123 | -function give_include_reset_tool_batch_processor( $class ) { |
|
| 123 | +function give_include_reset_tool_batch_processor($class) { |
|
| 124 | 124 | |
| 125 | - $file_path = GIVE_PLUGIN_DIR . 'includes/admin/reporting/tools/class-give-tools-reset-stats.php'; |
|
| 125 | + $file_path = GIVE_PLUGIN_DIR.'includes/admin/reporting/tools/class-give-tools-reset-stats.php'; |
|
| 126 | 126 | |
| 127 | - if ( 'Give_Tools_Reset_Stats' === $class && file_exists( $file_path ) ) { |
|
| 127 | + if ('Give_Tools_Reset_Stats' === $class && file_exists($file_path)) { |
|
| 128 | 128 | require_once $file_path; |
| 129 | 129 | } |
| 130 | 130 | |
@@ -135,10 +135,10 @@ discard block |
||
| 135 | 135 | * @since 1.5 |
| 136 | 136 | */ |
| 137 | 137 | function give_register_batch_customer_recount_tool() { |
| 138 | - add_action( 'give_batch_export_class_include', 'give_include_customer_recount_tool_batch_processor', 10, 1 ); |
|
| 138 | + add_action('give_batch_export_class_include', 'give_include_customer_recount_tool_batch_processor', 10, 1); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | -add_action( 'give_register_batch_exporter', 'give_register_batch_customer_recount_tool', 10 ); |
|
| 141 | +add_action('give_register_batch_exporter', 'give_register_batch_customer_recount_tool', 10); |
|
| 142 | 142 | |
| 143 | 143 | /** |
| 144 | 144 | * Loads the tools batch processing class for resetting all customer stats |
@@ -149,11 +149,11 @@ discard block |
||
| 149 | 149 | * |
| 150 | 150 | * @return void |
| 151 | 151 | */ |
| 152 | -function give_include_customer_recount_tool_batch_processor( $class ) { |
|
| 152 | +function give_include_customer_recount_tool_batch_processor($class) { |
|
| 153 | 153 | |
| 154 | - $file_path = GIVE_PLUGIN_DIR . 'includes/admin/reporting/tools/class-give-tools-recount-customer-stats.php'; |
|
| 154 | + $file_path = GIVE_PLUGIN_DIR.'includes/admin/reporting/tools/class-give-tools-recount-customer-stats.php'; |
|
| 155 | 155 | |
| 156 | - if ( 'Give_Tools_Recount_Customer_Stats' === $class && file_exists( $file_path ) ) { |
|
| 156 | + if ('Give_Tools_Recount_Customer_Stats' === $class && file_exists($file_path)) { |
|
| 157 | 157 | require_once $file_path; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -164,10 +164,10 @@ discard block |
||
| 164 | 164 | * @since 1.5 |
| 165 | 165 | */ |
| 166 | 166 | function give_register_batch_delete_test_transactions_tool() { |
| 167 | - add_action( 'give_batch_export_class_include', 'give_include_delete_test_transactions_batch_processor', 10, 1 ); |
|
| 167 | + add_action('give_batch_export_class_include', 'give_include_delete_test_transactions_batch_processor', 10, 1); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | -add_action( 'give_register_batch_exporter', 'give_register_batch_delete_test_transactions_tool', 10 ); |
|
| 170 | +add_action('give_register_batch_exporter', 'give_register_batch_delete_test_transactions_tool', 10); |
|
| 171 | 171 | |
| 172 | 172 | /** |
| 173 | 173 | * Loads the tools batch processing class for resetting all customer stats |
@@ -178,11 +178,11 @@ discard block |
||
| 178 | 178 | * |
| 179 | 179 | * @return void |
| 180 | 180 | */ |
| 181 | -function give_include_delete_test_transactions_batch_processor( $class ) { |
|
| 181 | +function give_include_delete_test_transactions_batch_processor($class) { |
|
| 182 | 182 | |
| 183 | - $file_path = GIVE_PLUGIN_DIR . 'includes/admin/reporting/tools/class-give-tools-delete-test-transactions.php'; |
|
| 183 | + $file_path = GIVE_PLUGIN_DIR.'includes/admin/reporting/tools/class-give-tools-delete-test-transactions.php'; |
|
| 184 | 184 | |
| 185 | - if ( 'Give_Tools_Delete_Test_Transactions' === $class && file_exists( $file_path ) ) { |
|
| 185 | + if ('Give_Tools_Delete_Test_Transactions' === $class && file_exists($file_path)) { |
|
| 186 | 186 | require_once $file_path; |
| 187 | 187 | } |
| 188 | 188 | |
@@ -11,12 +11,12 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | // Exit if accessed directly |
| 14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 14 | +if ( ! defined('ABSPATH')) { |
|
| 15 | 15 | exit; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -require_once GIVE_PLUGIN_DIR . 'includes/admin/reporting/class-export.php'; |
|
| 19 | -require_once GIVE_PLUGIN_DIR . 'includes/admin/reporting/export/export-actions.php'; |
|
| 18 | +require_once GIVE_PLUGIN_DIR.'includes/admin/reporting/class-export.php'; |
|
| 19 | +require_once GIVE_PLUGIN_DIR.'includes/admin/reporting/export/export-actions.php'; |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * Process batch exports via ajax |
@@ -26,79 +26,79 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | function give_do_ajax_export() { |
| 28 | 28 | |
| 29 | - require_once GIVE_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export.php'; |
|
| 29 | + require_once GIVE_PLUGIN_DIR.'includes/admin/reporting/export/class-batch-export.php'; |
|
| 30 | 30 | |
| 31 | - parse_str( $_POST['form'], $form ); |
|
| 31 | + parse_str($_POST['form'], $form); |
|
| 32 | 32 | |
| 33 | 33 | $_REQUEST = $form = (array) $form; |
| 34 | 34 | |
| 35 | - if ( ! wp_verify_nonce( $_REQUEST['give_ajax_export'], 'give_ajax_export' ) ) { |
|
| 36 | - die( '-2' ); |
|
| 35 | + if ( ! wp_verify_nonce($_REQUEST['give_ajax_export'], 'give_ajax_export')) { |
|
| 36 | + die('-2'); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - do_action( 'give_batch_export_class_include', $form['give-export-class'] ); |
|
| 39 | + do_action('give_batch_export_class_include', $form['give-export-class']); |
|
| 40 | 40 | |
| 41 | - $step = absint( $_POST['step'] ); |
|
| 42 | - $class = sanitize_text_field( $form['give-export-class'] ); |
|
| 41 | + $step = absint($_POST['step']); |
|
| 42 | + $class = sanitize_text_field($form['give-export-class']); |
|
| 43 | 43 | |
| 44 | - $export = new $class( $step ); |
|
| 44 | + $export = new $class($step); |
|
| 45 | 45 | |
| 46 | - if ( ! $export->can_export() ) { |
|
| 47 | - die( '-1' ); |
|
| 46 | + if ( ! $export->can_export()) { |
|
| 47 | + die('-1'); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - if ( ! $export->is_writable ) { |
|
| 50 | + if ( ! $export->is_writable) { |
|
| 51 | 51 | $json_args = array( |
| 52 | 52 | 'error' => true, |
| 53 | - 'message' => esc_html__( 'Export location or file not writable.', 'give' ) |
|
| 53 | + 'message' => esc_html__('Export location or file not writable.', 'give') |
|
| 54 | 54 | ); |
| 55 | 55 | echo json_encode($json_args); |
| 56 | 56 | exit; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - $export->set_properties( $_REQUEST ); |
|
| 59 | + $export->set_properties($_REQUEST); |
|
| 60 | 60 | |
| 61 | 61 | $export->pre_fetch(); |
| 62 | 62 | |
| 63 | - $ret = $export->process_step( $step ); |
|
| 63 | + $ret = $export->process_step($step); |
|
| 64 | 64 | |
| 65 | 65 | $percentage = $export->get_percentage_complete(); |
| 66 | 66 | |
| 67 | - if ( $ret ) { |
|
| 67 | + if ($ret) { |
|
| 68 | 68 | |
| 69 | 69 | $step += 1; |
| 70 | - echo json_encode( array( 'step' => $step, 'percentage' => $percentage ) ); |
|
| 70 | + echo json_encode(array('step' => $step, 'percentage' => $percentage)); |
|
| 71 | 71 | exit; |
| 72 | 72 | |
| 73 | - } elseif ( true === $export->is_empty ) { |
|
| 73 | + } elseif (true === $export->is_empty) { |
|
| 74 | 74 | |
| 75 | - echo json_encode( array( |
|
| 75 | + echo json_encode(array( |
|
| 76 | 76 | 'error' => true, |
| 77 | - 'message' => esc_html__( 'No data found for export parameters.', 'give' ) |
|
| 78 | - ) ); |
|
| 77 | + 'message' => esc_html__('No data found for export parameters.', 'give') |
|
| 78 | + )); |
|
| 79 | 79 | exit; |
| 80 | 80 | |
| 81 | - } elseif ( true === $export->done && true === $export->is_void ) { |
|
| 81 | + } elseif (true === $export->done && true === $export->is_void) { |
|
| 82 | 82 | |
| 83 | - $message = ! empty( $export->message ) ? $export->message : esc_html__( 'Batch Processing Complete', 'give' ); |
|
| 84 | - echo json_encode( array( 'success' => true, 'message' => $message ) ); |
|
| 83 | + $message = ! empty($export->message) ? $export->message : esc_html__('Batch Processing Complete', 'give'); |
|
| 84 | + echo json_encode(array('success' => true, 'message' => $message)); |
|
| 85 | 85 | exit; |
| 86 | 86 | |
| 87 | 87 | } else { |
| 88 | 88 | |
| 89 | - $args = array_merge( $_REQUEST, array( |
|
| 89 | + $args = array_merge($_REQUEST, array( |
|
| 90 | 90 | 'step' => $step, |
| 91 | 91 | 'class' => $class, |
| 92 | - 'nonce' => wp_create_nonce( 'give-batch-export' ), |
|
| 92 | + 'nonce' => wp_create_nonce('give-batch-export'), |
|
| 93 | 93 | 'give_action' => 'form_batch_export', |
| 94 | - ) ); |
|
| 94 | + )); |
|
| 95 | 95 | |
| 96 | - $download_url = add_query_arg( $args, admin_url() ); |
|
| 96 | + $download_url = add_query_arg($args, admin_url()); |
|
| 97 | 97 | |
| 98 | - echo json_encode( array( 'step' => 'done', 'url' => $download_url ) ); |
|
| 98 | + echo json_encode(array('step' => 'done', 'url' => $download_url)); |
|
| 99 | 99 | exit; |
| 100 | 100 | |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | -add_action( 'wp_ajax_give_do_ajax_export', 'give_do_ajax_export' ); |
|
| 104 | +add_action('wp_ajax_give_do_ajax_export', 'give_do_ajax_export'); |
|
@@ -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,7 +23,7 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return array The altered list of views |
| 25 | 25 | */ |
| 26 | -function give_register_default_customer_views( $views ) { |
|
| 26 | +function give_register_default_customer_views($views) { |
|
| 27 | 27 | |
| 28 | 28 | $default_views = array( |
| 29 | 29 | 'overview' => 'give_customers_view', |
@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | 'notes' => 'give_customer_notes_view' |
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | - return array_merge( $views, $default_views ); |
|
| 34 | + return array_merge($views, $default_views); |
|
| 35 | 35 | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | -add_filter( 'give_customer_views', 'give_register_default_customer_views', 1, 1 ); |
|
| 38 | +add_filter('give_customer_views', 'give_register_default_customer_views', 1, 1); |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * Register a tab for the single customer view |
@@ -46,17 +46,17 @@ discard block |
||
| 46 | 46 | * |
| 47 | 47 | * @return array The altered list of tabs |
| 48 | 48 | */ |
| 49 | -function give_register_default_customer_tabs( $tabs ) { |
|
| 49 | +function give_register_default_customer_tabs($tabs) { |
|
| 50 | 50 | |
| 51 | 51 | $default_tabs = array( |
| 52 | - 'overview' => array( 'dashicon' => 'dashicons-admin-users', 'title' => esc_html__( 'Donor Profile', 'give' ) ), |
|
| 53 | - 'notes' => array( 'dashicon' => 'dashicons-admin-comments', 'title' => esc_html__( 'Donor Notes', 'give' ) ) |
|
| 52 | + 'overview' => array('dashicon' => 'dashicons-admin-users', 'title' => esc_html__('Donor Profile', 'give')), |
|
| 53 | + 'notes' => array('dashicon' => 'dashicons-admin-comments', 'title' => esc_html__('Donor Notes', 'give')) |
|
| 54 | 54 | ); |
| 55 | 55 | |
| 56 | - return array_merge( $tabs, $default_tabs ); |
|
| 56 | + return array_merge($tabs, $default_tabs); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -add_filter( 'give_customer_tabs', 'give_register_default_customer_tabs', 1, 1 ); |
|
| 59 | +add_filter('give_customer_tabs', 'give_register_default_customer_tabs', 1, 1); |
|
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * Register the Delete icon as late as possible so it's at the bottom |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @return array The altered list of tabs, with 'delete' at the bottom |
| 69 | 69 | */ |
| 70 | -function give_register_delete_customer_tab( $tabs ) { |
|
| 70 | +function give_register_delete_customer_tab($tabs) { |
|
| 71 | 71 | |
| 72 | - $tabs['delete'] = array( 'dashicon' => 'dashicons-trash', 'title' => esc_html__( 'Delete Donor', 'give' ) ); |
|
| 72 | + $tabs['delete'] = array('dashicon' => 'dashicons-trash', 'title' => esc_html__('Delete Donor', 'give')); |
|
| 73 | 73 | |
| 74 | 74 | return $tabs; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -add_filter( 'give_customer_tabs', 'give_register_delete_customer_tab', PHP_INT_MAX, 1 ); |
|
| 77 | +add_filter('give_customer_tabs', 'give_register_delete_customer_tab', PHP_INT_MAX, 1); |
|
@@ -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 | |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | * @see Give_Cron::weekly_events() |
| 30 | 30 | */ |
| 31 | 31 | public function __construct() { |
| 32 | - add_filter( 'cron_schedules', array( $this, 'add_schedules' ) ); |
|
| 33 | - add_action( 'wp', array( $this, 'schedule_Events' ) ); |
|
| 32 | + add_filter('cron_schedules', array($this, 'add_schedules')); |
|
| 33 | + add_action('wp', array($this, 'schedule_Events')); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -42,11 +42,11 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @return array |
| 44 | 44 | */ |
| 45 | - public function add_schedules( $schedules = array() ) { |
|
| 45 | + public function add_schedules($schedules = array()) { |
|
| 46 | 46 | // Adds once weekly to the existing schedules. |
| 47 | 47 | $schedules['weekly'] = array( |
| 48 | 48 | 'interval' => 604800, |
| 49 | - 'display' => esc_html__( 'Once Weekly', 'give' ) |
|
| 49 | + 'display' => esc_html__('Once Weekly', 'give') |
|
| 50 | 50 | ); |
| 51 | 51 | |
| 52 | 52 | return $schedules; |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | * @return void |
| 73 | 73 | */ |
| 74 | 74 | private function weekly_events() { |
| 75 | - if ( ! wp_next_scheduled( 'give_weekly_scheduled_events' ) ) { |
|
| 76 | - wp_schedule_event( current_time( 'timestamp' ), 'weekly', 'give_weekly_scheduled_events' ); |
|
| 75 | + if ( ! wp_next_scheduled('give_weekly_scheduled_events')) { |
|
| 76 | + wp_schedule_event(current_time('timestamp'), 'weekly', 'give_weekly_scheduled_events'); |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | * @return void |
| 86 | 86 | */ |
| 87 | 87 | private function daily_events() { |
| 88 | - if ( ! wp_next_scheduled( 'give_daily_scheduled_events' ) ) { |
|
| 89 | - wp_schedule_event( current_time( 'timestamp' ), 'daily', 'give_daily_scheduled_events' ); |
|
| 88 | + if ( ! wp_next_scheduled('give_daily_scheduled_events')) { |
|
| 89 | + wp_schedule_event(current_time('timestamp'), 'daily', 'give_daily_scheduled_events'); |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | // Exit if accessed directly |
| 15 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 15 | +if ( ! defined('ABSPATH')) { |
|
| 16 | 16 | exit; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | /* @var WPDB $wpdb */ |
| 32 | 32 | global $wpdb; |
| 33 | 33 | |
| 34 | - $this->table_name = $wpdb->prefix . 'give_customermeta'; |
|
| 34 | + $this->table_name = $wpdb->prefix.'give_customermeta'; |
|
| 35 | 35 | $this->primary_key = 'meta_id'; |
| 36 | 36 | $this->version = '1.0'; |
| 37 | 37 | |
| 38 | - add_action( 'plugins_loaded', array( $this, 'register_table' ), 11 ); |
|
| 38 | + add_action('plugins_loaded', array($this, 'register_table'), 11); |
|
| 39 | 39 | |
| 40 | 40 | } |
| 41 | 41 | |
@@ -79,13 +79,13 @@ discard block |
||
| 79 | 79 | * @access private |
| 80 | 80 | * @since 1.6 |
| 81 | 81 | */ |
| 82 | - public function get_meta( $customer_id = 0, $meta_key = '', $single = false ) { |
|
| 83 | - $customer_id = $this->sanitize_customer_id( $customer_id ); |
|
| 84 | - if ( false === $customer_id ) { |
|
| 82 | + public function get_meta($customer_id = 0, $meta_key = '', $single = false) { |
|
| 83 | + $customer_id = $this->sanitize_customer_id($customer_id); |
|
| 84 | + if (false === $customer_id) { |
|
| 85 | 85 | return false; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - return get_metadata( 'customer', $customer_id, $meta_key, $single ); |
|
| 88 | + return get_metadata('customer', $customer_id, $meta_key, $single); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -103,13 +103,13 @@ discard block |
||
| 103 | 103 | * @access private |
| 104 | 104 | * @since 1.6 |
| 105 | 105 | */ |
| 106 | - public function add_meta( $customer_id = 0, $meta_key = '', $meta_value, $unique = false ) { |
|
| 107 | - $customer_id = $this->sanitize_customer_id( $customer_id ); |
|
| 108 | - if ( false === $customer_id ) { |
|
| 106 | + public function add_meta($customer_id = 0, $meta_key = '', $meta_value, $unique = false) { |
|
| 107 | + $customer_id = $this->sanitize_customer_id($customer_id); |
|
| 108 | + if (false === $customer_id) { |
|
| 109 | 109 | return false; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - return add_metadata( 'customer', $customer_id, $meta_key, $meta_value, $unique ); |
|
| 112 | + return add_metadata('customer', $customer_id, $meta_key, $meta_value, $unique); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
@@ -132,13 +132,13 @@ discard block |
||
| 132 | 132 | * @access private |
| 133 | 133 | * @since 1.6 |
| 134 | 134 | */ |
| 135 | - public function update_meta( $customer_id = 0, $meta_key = '', $meta_value, $prev_value = '' ) { |
|
| 136 | - $customer_id = $this->sanitize_customer_id( $customer_id ); |
|
| 137 | - if ( false === $customer_id ) { |
|
| 135 | + public function update_meta($customer_id = 0, $meta_key = '', $meta_value, $prev_value = '') { |
|
| 136 | + $customer_id = $this->sanitize_customer_id($customer_id); |
|
| 137 | + if (false === $customer_id) { |
|
| 138 | 138 | return false; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - return update_metadata( 'customer', $customer_id, $meta_key, $meta_value, $prev_value ); |
|
| 141 | + return update_metadata('customer', $customer_id, $meta_key, $meta_value, $prev_value); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | * @access private |
| 160 | 160 | * @since 1.6 |
| 161 | 161 | */ |
| 162 | - public function delete_meta( $customer_id = 0, $meta_key = '', $meta_value = '' ) { |
|
| 163 | - return delete_metadata( 'customer', $customer_id, $meta_key, $meta_value ); |
|
| 162 | + public function delete_meta($customer_id = 0, $meta_key = '', $meta_value = '') { |
|
| 163 | + return delete_metadata('customer', $customer_id, $meta_key, $meta_value); |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | /** |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | public function create_table() { |
| 173 | 173 | |
| 174 | - require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
|
| 174 | + require_once(ABSPATH.'wp-admin/includes/upgrade.php'); |
|
| 175 | 175 | |
| 176 | 176 | $sql = "CREATE TABLE {$this->table_name} ( |
| 177 | 177 | meta_id bigint(20) NOT NULL AUTO_INCREMENT, |
@@ -183,9 +183,9 @@ discard block |
||
| 183 | 183 | KEY meta_key (meta_key) |
| 184 | 184 | ) CHARACTER SET utf8 COLLATE utf8_general_ci;"; |
| 185 | 185 | |
| 186 | - dbDelta( $sql ); |
|
| 186 | + dbDelta($sql); |
|
| 187 | 187 | |
| 188 | - update_option( $this->table_name . '_db_version', $this->version ); |
|
| 188 | + update_option($this->table_name.'_db_version', $this->version); |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | /** |
@@ -197,23 +197,23 @@ discard block |
||
| 197 | 197 | * |
| 198 | 198 | * @return int|bool The normalized customer ID or false if it's found to not be valid. |
| 199 | 199 | */ |
| 200 | - private function sanitize_customer_id( $customer_id ) { |
|
| 201 | - if ( ! is_numeric( $customer_id ) ) { |
|
| 200 | + private function sanitize_customer_id($customer_id) { |
|
| 201 | + if ( ! is_numeric($customer_id)) { |
|
| 202 | 202 | return false; |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | $customer_id = (int) $customer_id; |
| 206 | 206 | |
| 207 | 207 | // We were given a non positive number |
| 208 | - if ( absint( $customer_id ) !== $customer_id ) { |
|
| 208 | + if (absint($customer_id) !== $customer_id) { |
|
| 209 | 209 | return false; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - if ( empty( $customer_id ) ) { |
|
| 212 | + if (empty($customer_id)) { |
|
| 213 | 213 | return false; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - return absint( $customer_id ); |
|
| 216 | + return absint($customer_id); |
|
| 217 | 217 | |
| 218 | 218 | } |
| 219 | 219 | |
@@ -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" 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" 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,12 +21,12 @@ discard block |
||
| 21 | 21 | * @return void |
| 22 | 22 | */ |
| 23 | 23 | function give_upgrades_screen() { |
| 24 | - $action = isset( $_GET['give-upgrade'] ) ? sanitize_text_field( $_GET['give-upgrade'] ) : ''; |
|
| 25 | - $step = isset( $_GET['step'] ) ? absint( $_GET['step'] ) : 1; |
|
| 26 | - $total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false; |
|
| 27 | - $custom = isset( $_GET['custom'] ) ? absint( $_GET['custom'] ) : 0; |
|
| 28 | - $number = isset( $_GET['number'] ) ? absint( $_GET['number'] ) : 100; |
|
| 29 | - $steps = round( ( $total / $number ), 0 ); |
|
| 24 | + $action = isset($_GET['give-upgrade']) ? sanitize_text_field($_GET['give-upgrade']) : ''; |
|
| 25 | + $step = isset($_GET['step']) ? absint($_GET['step']) : 1; |
|
| 26 | + $total = isset($_GET['total']) ? absint($_GET['total']) : false; |
|
| 27 | + $custom = isset($_GET['custom']) ? absint($_GET['custom']) : 0; |
|
| 28 | + $number = isset($_GET['number']) ? absint($_GET['number']) : 100; |
|
| 29 | + $steps = round(($total / $number), 0); |
|
| 30 | 30 | |
| 31 | 31 | $doing_upgrade_args = array( |
| 32 | 32 | 'page' => 'give-upgrades', |
@@ -36,25 +36,25 @@ discard block |
||
| 36 | 36 | 'custom' => $custom, |
| 37 | 37 | 'steps' => $steps |
| 38 | 38 | ); |
| 39 | - update_option( 'give_doing_upgrade', $doing_upgrade_args ); |
|
| 40 | - if ( $step > $steps ) { |
|
| 39 | + update_option('give_doing_upgrade', $doing_upgrade_args); |
|
| 40 | + if ($step > $steps) { |
|
| 41 | 41 | // Prevent a weird case where the estimate was off. Usually only a couple. |
| 42 | 42 | $steps = $step; |
| 43 | 43 | } |
| 44 | 44 | ?> |
| 45 | 45 | <div class="wrap"> |
| 46 | - <h1><?php esc_html_e( 'Give - Upgrades', 'give' ); ?></h1> |
|
| 46 | + <h1><?php esc_html_e('Give - Upgrades', 'give'); ?></h1> |
|
| 47 | 47 | |
| 48 | - <?php if ( ! empty( $action ) ) : ?> |
|
| 48 | + <?php if ( ! empty($action)) : ?> |
|
| 49 | 49 | |
| 50 | 50 | <div id="give-upgrade-status"> |
| 51 | - <p style="font-size: 20px;max-width: 900px;"><?php esc_html_e( 'The upgrade process has started, please be patient and do not close this window or navigate away from this page. This could take several minutes depending on the upgrade and the size of your website. You will be automatically redirected when the upgrade is finished.', 'give' ); ?> |
|
| 52 | - <img src="<?php echo GIVE_PLUGIN_URL . '/assets/images/spinner.gif'; ?>" id="give-upgrade-loader" style=" position: relative; top: 3px; left: 6px;" /> |
|
| 51 | + <p style="font-size: 20px;max-width: 900px;"><?php esc_html_e('The upgrade process has started, please be patient and do not close this window or navigate away from this page. This could take several minutes depending on the upgrade and the size of your website. You will be automatically redirected when the upgrade is finished.', 'give'); ?> |
|
| 52 | + <img src="<?php echo GIVE_PLUGIN_URL.'/assets/images/spinner.gif'; ?>" id="give-upgrade-loader" style=" position: relative; top: 3px; left: 6px;" /> |
|
| 53 | 53 | </p> |
| 54 | 54 | |
| 55 | - <?php if ( ! empty( $total ) ) : ?> |
|
| 55 | + <?php if ( ! empty($total)) : ?> |
|
| 56 | 56 | <p> |
| 57 | - <strong><?php printf( esc_html__( 'Step %d of approximately %d running', 'give' ), $step, $steps ); ?></strong> |
|
| 57 | + <strong><?php printf(esc_html__('Step %d of approximately %d running', 'give'), $step, $steps); ?></strong> |
|
| 58 | 58 | </p> |
| 59 | 59 | <?php endif; ?> |
| 60 | 60 | </div> |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | <div id="give-upgrade-status"> |
| 70 | 70 | <p style="font-size: 20px;max-width: 900px;"> |
| 71 | - <?php esc_html_e( 'The upgrade process has started, please be patient and do not close this window or navigate away from this page. This could take several minutes depending on the upgrade and the size of your website. You will be automatically redirected when the upgrade is finished.', 'give' ); ?> |
|
| 72 | - <img src="<?php echo GIVE_PLUGIN_URL . '/assets/images/spinner.gif'; ?>" id="give-upgrade-loader" style=" position: relative; top: 3px; left: 6px;" /> |
|
| 71 | + <?php esc_html_e('The upgrade process has started, please be patient and do not close this window or navigate away from this page. This could take several minutes depending on the upgrade and the size of your website. You will be automatically redirected when the upgrade is finished.', 'give'); ?> |
|
| 72 | + <img src="<?php echo GIVE_PLUGIN_URL.'/assets/images/spinner.gif'; ?>" id="give-upgrade-loader" style=" position: relative; top: 3px; left: 6px;" /> |
|
| 73 | 73 | </p> |
| 74 | 74 | </div> |
| 75 | 75 | <script type="text/javascript"> |