@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * @since 1.0.0 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -defined( 'ABSPATH' ) || exit; |
|
| 9 | +defined('ABSPATH') || exit; |
|
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * Retrieves all default settings. |
@@ -16,13 +16,13 @@ discard block |
||
| 16 | 16 | function wpinv_get_settings() { |
| 17 | 17 | $defaults = array(); |
| 18 | 18 | |
| 19 | - foreach ( array_values( wpinv_get_registered_settings() ) as $tab_settings ) { |
|
| 19 | + foreach (array_values(wpinv_get_registered_settings()) as $tab_settings) { |
|
| 20 | 20 | |
| 21 | - foreach ( array_values( $tab_settings ) as $section_settings ) { |
|
| 21 | + foreach (array_values($tab_settings) as $section_settings) { |
|
| 22 | 22 | |
| 23 | - foreach ( $section_settings as $key => $setting ) { |
|
| 24 | - if ( isset( $setting['std'] ) ) { |
|
| 25 | - $defaults[ $key ] = $setting['std']; |
|
| 23 | + foreach ($section_settings as $key => $setting) { |
|
| 24 | + if (isset($setting['std'])) { |
|
| 25 | + $defaults[$key] = $setting['std']; |
|
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | |
@@ -43,12 +43,12 @@ discard block |
||
| 43 | 43 | global $wpinv_options; |
| 44 | 44 | |
| 45 | 45 | // Try fetching the saved options. |
| 46 | - if ( ! is_array( $wpinv_options ) ) { |
|
| 47 | - $wpinv_options = get_option( 'wpinv_settings' ); |
|
| 46 | + if (!is_array($wpinv_options)) { |
|
| 47 | + $wpinv_options = get_option('wpinv_settings'); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | // If that fails, don't fetch the default settings to prevent a loop. |
| 51 | - if ( ! is_array( $wpinv_options ) ) { |
|
| 51 | + if (!is_array($wpinv_options)) { |
|
| 52 | 52 | $wpinv_options = array(); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -62,13 +62,13 @@ discard block |
||
| 62 | 62 | * @param mixed $default The default value to use if the setting has not been set. |
| 63 | 63 | * @return mixed |
| 64 | 64 | */ |
| 65 | -function wpinv_get_option( $key = '', $default = false ) { |
|
| 65 | +function wpinv_get_option($key = '', $default = false) { |
|
| 66 | 66 | |
| 67 | 67 | $options = wpinv_get_options(); |
| 68 | - $value = isset( $options[ $key ] ) ? $options[ $key ] : $default; |
|
| 69 | - $value = apply_filters( 'wpinv_get_option', $value, $key, $default ); |
|
| 68 | + $value = isset($options[$key]) ? $options[$key] : $default; |
|
| 69 | + $value = apply_filters('wpinv_get_option', $value, $key, $default); |
|
| 70 | 70 | |
| 71 | - return apply_filters( 'wpinv_get_option_' . $key, $value, $key, $default ); |
|
| 71 | + return apply_filters('wpinv_get_option_' . $key, $value, $key, $default); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -77,11 +77,11 @@ discard block |
||
| 77 | 77 | * @param array $options the new options. |
| 78 | 78 | * @return bool |
| 79 | 79 | */ |
| 80 | -function wpinv_update_options( $options ) { |
|
| 80 | +function wpinv_update_options($options) { |
|
| 81 | 81 | global $wpinv_options; |
| 82 | 82 | |
| 83 | 83 | // update the option. |
| 84 | - if ( is_array( $options ) && update_option( 'wpinv_settings', $options ) ) { |
|
| 84 | + if (is_array($options) && update_option('wpinv_settings', $options)) { |
|
| 85 | 85 | $wpinv_options = $options; |
| 86 | 86 | return true; |
| 87 | 87 | } |
@@ -96,24 +96,24 @@ discard block |
||
| 96 | 96 | * @param mixed $value The setting value. |
| 97 | 97 | * @return bool |
| 98 | 98 | */ |
| 99 | -function wpinv_update_option( $key = '', $value = false ) { |
|
| 99 | +function wpinv_update_option($key = '', $value = false) { |
|
| 100 | 100 | |
| 101 | 101 | // If no key, exit. |
| 102 | - if ( empty( $key ) ) { |
|
| 102 | + if (empty($key)) { |
|
| 103 | 103 | return false; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // Maybe delete the option instead. |
| 107 | - if ( is_null( $value ) ) { |
|
| 108 | - return wpinv_delete_option( $key ); |
|
| 107 | + if (is_null($value)) { |
|
| 108 | + return wpinv_delete_option($key); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | // Prepare the new options. |
| 112 | 112 | $options = wpinv_get_options(); |
| 113 | - $options[ $key ] = apply_filters( 'wpinv_update_option', $value, $key ); |
|
| 113 | + $options[$key] = apply_filters('wpinv_update_option', $value, $key); |
|
| 114 | 114 | |
| 115 | 115 | // Save the new options. |
| 116 | - return wpinv_update_options( $options ); |
|
| 116 | + return wpinv_update_options($options); |
|
| 117 | 117 | |
| 118 | 118 | } |
| 119 | 119 | |
@@ -123,18 +123,18 @@ discard block |
||
| 123 | 123 | * @param string $key the setting key. |
| 124 | 124 | * @return bool |
| 125 | 125 | */ |
| 126 | -function wpinv_delete_option( $key = '' ) { |
|
| 126 | +function wpinv_delete_option($key = '') { |
|
| 127 | 127 | |
| 128 | 128 | // If no key, exit |
| 129 | - if ( empty( $key ) ) { |
|
| 129 | + if (empty($key)) { |
|
| 130 | 130 | return false; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | $options = wpinv_get_options(); |
| 134 | 134 | |
| 135 | - if ( isset( $options[ $key ] ) ) { |
|
| 136 | - unset( $options[ $key ] ); |
|
| 137 | - return wpinv_update_options( $options ); |
|
| 135 | + if (isset($options[$key])) { |
|
| 136 | + unset($options[$key]); |
|
| 137 | + return wpinv_update_options($options); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | return true; |
@@ -148,14 +148,14 @@ discard block |
||
| 148 | 148 | function wpinv_register_settings() { |
| 149 | 149 | |
| 150 | 150 | // Loop through all tabs. |
| 151 | - foreach ( wpinv_get_registered_settings() as $tab => $sections ) { |
|
| 151 | + foreach (wpinv_get_registered_settings() as $tab => $sections) { |
|
| 152 | 152 | |
| 153 | 153 | // In each tab, loop through sections. |
| 154 | - foreach ( $sections as $section => $settings ) { |
|
| 154 | + foreach ($sections as $section => $settings) { |
|
| 155 | 155 | |
| 156 | 156 | // Check for backwards compatibility |
| 157 | - $section_tabs = wpinv_get_settings_tab_sections( $tab ); |
|
| 158 | - if ( ! is_array( $section_tabs ) || ! array_key_exists( $section, $section_tabs ) ) { |
|
| 157 | + $section_tabs = wpinv_get_settings_tab_sections($tab); |
|
| 158 | + if (!is_array($section_tabs) || !array_key_exists($section, $section_tabs)) { |
|
| 159 | 159 | $section = 'main'; |
| 160 | 160 | $settings = $sections; |
| 161 | 161 | } |
@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | 'wpinv_settings_' . $tab . '_' . $section |
| 169 | 169 | ); |
| 170 | 170 | |
| 171 | - foreach ( $settings as $option ) { |
|
| 172 | - if ( ! empty( $option['id'] ) ) { |
|
| 173 | - wpinv_register_settings_option( $tab, $section, $option ); |
|
| 171 | + foreach ($settings as $option) { |
|
| 172 | + if (!empty($option['id'])) { |
|
| 173 | + wpinv_register_settings_option($tab, $section, $option); |
|
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
@@ -178,9 +178,9 @@ discard block |
||
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | // Creates our settings in the options table. |
| 181 | - register_setting( 'wpinv_settings', 'wpinv_settings', 'wpinv_settings_sanitize' ); |
|
| 181 | + register_setting('wpinv_settings', 'wpinv_settings', 'wpinv_settings_sanitize'); |
|
| 182 | 182 | } |
| 183 | -add_action( 'admin_init', 'wpinv_register_settings' ); |
|
| 183 | +add_action('admin_init', 'wpinv_register_settings'); |
|
| 184 | 184 | |
| 185 | 185 | /** |
| 186 | 186 | * Register a single settings option. |
@@ -190,47 +190,47 @@ discard block |
||
| 190 | 190 | * @param string $option |
| 191 | 191 | * |
| 192 | 192 | */ |
| 193 | -function wpinv_register_settings_option( $tab, $section, $option ) { |
|
| 193 | +function wpinv_register_settings_option($tab, $section, $option) { |
|
| 194 | 194 | |
| 195 | - $name = isset( $option['name'] ) ? $option['name'] : ''; |
|
| 195 | + $name = isset($option['name']) ? $option['name'] : ''; |
|
| 196 | 196 | $cb = "wpinv_{$option['type']}_callback"; |
| 197 | 197 | $section = "wpinv_settings_{$tab}_$section"; |
| 198 | 198 | |
| 199 | - if ( isset( $option['desc'] ) && ! empty( $option['help-tip'] ) ) { |
|
| 200 | - $tip = wpinv_clean( $option['desc'] ); |
|
| 199 | + if (isset($option['desc']) && !empty($option['help-tip'])) { |
|
| 200 | + $tip = wpinv_clean($option['desc']); |
|
| 201 | 201 | $name .= "<span class='dashicons dashicons-editor-help wpi-help-tip' title='$tip'></span>"; |
| 202 | - unset( $option['desc'] ); |
|
| 202 | + unset($option['desc']); |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | // Loop through all tabs. |
| 206 | 206 | add_settings_field( |
| 207 | 207 | 'wpinv_settings[' . $option['id'] . ']', |
| 208 | 208 | $name, |
| 209 | - function_exists( $cb ) ? $cb : 'wpinv_missing_callback', |
|
| 209 | + function_exists($cb) ? $cb : 'wpinv_missing_callback', |
|
| 210 | 210 | $section, |
| 211 | 211 | $section, |
| 212 | 212 | array( |
| 213 | 213 | 'section' => $section, |
| 214 | - 'id' => isset( $option['id'] ) ? $option['id'] : uniqid( 'wpinv-' ), |
|
| 215 | - 'desc' => isset( $option['desc'] ) ? $option['desc'] : '', |
|
| 214 | + 'id' => isset($option['id']) ? $option['id'] : uniqid('wpinv-'), |
|
| 215 | + 'desc' => isset($option['desc']) ? $option['desc'] : '', |
|
| 216 | 216 | 'name' => $name, |
| 217 | - 'size' => isset( $option['size'] ) ? $option['size'] : null, |
|
| 218 | - 'options' => isset( $option['options'] ) ? $option['options'] : '', |
|
| 219 | - 'selected' => isset( $option['selected'] ) ? $option['selected'] : null, |
|
| 220 | - 'std' => isset( $option['std'] ) ? $option['std'] : '', |
|
| 221 | - 'min' => isset( $option['min'] ) ? $option['min'] : 0, |
|
| 222 | - 'max' => isset( $option['max'] ) ? $option['max'] : 999999, |
|
| 223 | - 'step' => isset( $option['step'] ) ? $option['step'] : 1, |
|
| 224 | - 'placeholder' => isset( $option['placeholder'] ) ? $option['placeholder'] : null, |
|
| 225 | - 'allow_blank' => isset( $option['allow_blank'] ) ? $option['allow_blank'] : true, |
|
| 226 | - 'readonly' => isset( $option['readonly'] ) ? $option['readonly'] : false, |
|
| 227 | - 'faux' => isset( $option['faux'] ) ? $option['faux'] : false, |
|
| 228 | - 'onchange' => isset( $option['onchange'] ) ? $option['onchange'] : '', |
|
| 229 | - 'custom' => isset( $option['custom'] ) ? $option['custom'] : '', |
|
| 230 | - 'class' => isset( $option['class'] ) ? $option['class'] : '', |
|
| 231 | - 'style' => isset( $option['style'] ) ? $option['style'] : '', |
|
| 232 | - 'cols' => isset( $option['cols'] ) && (int) $option['cols'] > 0 ? (int) $option['cols'] : 50, |
|
| 233 | - 'rows' => isset( $option['rows'] ) && (int) $option['rows'] > 0 ? (int) $option['rows'] : 5, |
|
| 217 | + 'size' => isset($option['size']) ? $option['size'] : null, |
|
| 218 | + 'options' => isset($option['options']) ? $option['options'] : '', |
|
| 219 | + 'selected' => isset($option['selected']) ? $option['selected'] : null, |
|
| 220 | + 'std' => isset($option['std']) ? $option['std'] : '', |
|
| 221 | + 'min' => isset($option['min']) ? $option['min'] : 0, |
|
| 222 | + 'max' => isset($option['max']) ? $option['max'] : 999999, |
|
| 223 | + 'step' => isset($option['step']) ? $option['step'] : 1, |
|
| 224 | + 'placeholder' => isset($option['placeholder']) ? $option['placeholder'] : null, |
|
| 225 | + 'allow_blank' => isset($option['allow_blank']) ? $option['allow_blank'] : true, |
|
| 226 | + 'readonly' => isset($option['readonly']) ? $option['readonly'] : false, |
|
| 227 | + 'faux' => isset($option['faux']) ? $option['faux'] : false, |
|
| 228 | + 'onchange' => isset($option['onchange']) ? $option['onchange'] : '', |
|
| 229 | + 'custom' => isset($option['custom']) ? $option['custom'] : '', |
|
| 230 | + 'class' => isset($option['class']) ? $option['class'] : '', |
|
| 231 | + 'style' => isset($option['style']) ? $option['style'] : '', |
|
| 232 | + 'cols' => isset($option['cols']) && (int) $option['cols'] > 0 ? (int) $option['cols'] : 50, |
|
| 233 | + 'rows' => isset($option['rows']) && (int) $option['rows'] > 0 ? (int) $option['rows'] : 5, |
|
| 234 | 234 | ) |
| 235 | 235 | ); |
| 236 | 236 | |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | * @return array |
| 243 | 243 | */ |
| 244 | 244 | function wpinv_get_registered_settings() { |
| 245 | - return array_filter( apply_filters( 'wpinv_registered_settings', wpinv_get_data( 'admin-settings' ) ) ); |
|
| 245 | + return array_filter(apply_filters('wpinv_registered_settings', wpinv_get_data('admin-settings'))); |
|
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | /** |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | * @return array |
| 252 | 252 | */ |
| 253 | 253 | function getpaid_get_integration_settings() { |
| 254 | - return apply_filters( 'getpaid_integration_settings', array() ); |
|
| 254 | + return apply_filters('getpaid_integration_settings', array()); |
|
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | /** |
@@ -259,144 +259,144 @@ discard block |
||
| 259 | 259 | * |
| 260 | 260 | * @return array |
| 261 | 261 | */ |
| 262 | -function wpinv_settings_sanitize( $input = array() ) { |
|
| 262 | +function wpinv_settings_sanitize($input = array()) { |
|
| 263 | 263 | |
| 264 | 264 | $wpinv_options = wpinv_get_options(); |
| 265 | 265 | $raw_referrer = wp_get_raw_referer(); |
| 266 | 266 | |
| 267 | - if ( empty( $raw_referrer ) ) { |
|
| 267 | + if (empty($raw_referrer)) { |
|
| 268 | 268 | return $input; |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | - wp_parse_str( $raw_referrer, $referrer ); |
|
| 271 | + wp_parse_str($raw_referrer, $referrer); |
|
| 272 | 272 | |
| 273 | - if ( empty( $referrer['tab'] ) ) { |
|
| 273 | + if (empty($referrer['tab'])) { |
|
| 274 | 274 | return $input; |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | $settings = wpinv_get_registered_settings(); |
| 278 | - $tab = isset( $referrer['tab'] ) ? $referrer['tab'] : 'general'; |
|
| 279 | - $section = isset( $referrer['section'] ) ? $referrer['section'] : 'main'; |
|
| 278 | + $tab = isset($referrer['tab']) ? $referrer['tab'] : 'general'; |
|
| 279 | + $section = isset($referrer['section']) ? $referrer['section'] : 'main'; |
|
| 280 | 280 | |
| 281 | 281 | $input = $input ? $input : array(); |
| 282 | - $input = apply_filters( 'wpinv_settings_tab_' . $tab . '_sanitize', $input ); |
|
| 283 | - $input = apply_filters( 'wpinv_settings_' . $tab . '-' . $section . '_sanitize', $input ); |
|
| 282 | + $input = apply_filters('wpinv_settings_tab_' . $tab . '_sanitize', $input); |
|
| 283 | + $input = apply_filters('wpinv_settings_' . $tab . '-' . $section . '_sanitize', $input); |
|
| 284 | 284 | |
| 285 | 285 | // Loop through each setting being saved and pass it through a sanitization filter |
| 286 | - foreach ( $input as $key => $value ) { |
|
| 286 | + foreach ($input as $key => $value) { |
|
| 287 | 287 | |
| 288 | 288 | // Get the setting type (checkbox, select, etc) |
| 289 | - $type = isset( $settings[ $tab ][$section][ $key ]['type'] ) ? $settings[ $tab ][$section][ $key ]['type'] : false; |
|
| 289 | + $type = isset($settings[$tab][$section][$key]['type']) ? $settings[$tab][$section][$key]['type'] : false; |
|
| 290 | 290 | |
| 291 | - if ( $type ) { |
|
| 291 | + if ($type) { |
|
| 292 | 292 | // Field type specific filter |
| 293 | - $input[$key] = apply_filters( 'wpinv_settings_sanitize_' . $type, $value, $key ); |
|
| 293 | + $input[$key] = apply_filters('wpinv_settings_sanitize_' . $type, $value, $key); |
|
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | // General filter |
| 297 | - $input[ $key ] = apply_filters( 'wpinv_settings_sanitize', $input[ $key ], $key ); |
|
| 297 | + $input[$key] = apply_filters('wpinv_settings_sanitize', $input[$key], $key); |
|
| 298 | 298 | |
| 299 | 299 | // Key specific filter. |
| 300 | - $input[ $key ] = apply_filters( "wpinv_settings_sanitize_$key", $input[ $key ] ); |
|
| 300 | + $input[$key] = apply_filters("wpinv_settings_sanitize_$key", $input[$key]); |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | // Loop through the whitelist and unset any that are empty for the tab being saved |
| 304 | - $main_settings = isset( $settings[ $tab ] ) ? $settings[ $tab ] : array(); // Check for extensions that aren't using new sections |
|
| 305 | - $section_settings = ! empty( $settings[ $tab ][ $section ] ) ? $settings[ $tab ][ $section ] : array(); |
|
| 304 | + $main_settings = isset($settings[$tab]) ? $settings[$tab] : array(); // Check for extensions that aren't using new sections |
|
| 305 | + $section_settings = !empty($settings[$tab][$section]) ? $settings[$tab][$section] : array(); |
|
| 306 | 306 | |
| 307 | - $found_settings = array_merge( $main_settings, $section_settings ); |
|
| 307 | + $found_settings = array_merge($main_settings, $section_settings); |
|
| 308 | 308 | |
| 309 | - if ( ! empty( $found_settings ) ) { |
|
| 310 | - foreach ( $found_settings as $key => $value ) { |
|
| 309 | + if (!empty($found_settings)) { |
|
| 310 | + foreach ($found_settings as $key => $value) { |
|
| 311 | 311 | |
| 312 | 312 | // settings used to have numeric keys, now they have keys that match the option ID. This ensures both methods work |
| 313 | - if ( is_numeric( $key ) ) { |
|
| 313 | + if (is_numeric($key)) { |
|
| 314 | 314 | $key = $value['id']; |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | - if ( ! isset( $input[ $key ] ) && isset( $wpinv_options[ $key ] ) ) { |
|
| 318 | - unset( $wpinv_options[ $key ] ); |
|
| 317 | + if (!isset($input[$key]) && isset($wpinv_options[$key])) { |
|
| 318 | + unset($wpinv_options[$key]); |
|
| 319 | 319 | } |
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | // Merge our new settings with the existing |
| 324 | - $output = array_merge( $wpinv_options, $input ); |
|
| 324 | + $output = array_merge($wpinv_options, $input); |
|
| 325 | 325 | |
| 326 | - add_settings_error( 'wpinv-notices', '', __( 'Settings updated.', 'invoicing' ), 'updated' ); |
|
| 326 | + add_settings_error('wpinv-notices', '', __('Settings updated.', 'invoicing'), 'updated'); |
|
| 327 | 327 | |
| 328 | 328 | return $output; |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | -function wpinv_settings_sanitize_misc_accounting( $input ) { |
|
| 331 | +function wpinv_settings_sanitize_misc_accounting($input) { |
|
| 332 | 332 | |
| 333 | - if ( ! wpinv_current_user_can_manage_invoicing() ) { |
|
| 333 | + if (!wpinv_current_user_can_manage_invoicing()) { |
|
| 334 | 334 | return $input; |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | - if( ! empty( $input['enable_sequential'] ) && !wpinv_get_option( 'enable_sequential' ) ) { |
|
| 337 | + if (!empty($input['enable_sequential']) && !wpinv_get_option('enable_sequential')) { |
|
| 338 | 338 | // Shows an admin notice about upgrading previous order numbers |
| 339 | - getpaid_session()->set( 'upgrade_sequential', '1' ); |
|
| 339 | + getpaid_session()->set('upgrade_sequential', '1'); |
|
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | return $input; |
| 343 | 343 | } |
| 344 | -add_filter( 'wpinv_settings_misc-accounting_sanitize', 'wpinv_settings_sanitize_misc_accounting' ); |
|
| 344 | +add_filter('wpinv_settings_misc-accounting_sanitize', 'wpinv_settings_sanitize_misc_accounting'); |
|
| 345 | 345 | |
| 346 | -function wpinv_settings_sanitize_tax_rates( $input ) { |
|
| 347 | - if( ! wpinv_current_user_can_manage_invoicing() ) { |
|
| 346 | +function wpinv_settings_sanitize_tax_rates($input) { |
|
| 347 | + if (!wpinv_current_user_can_manage_invoicing()) { |
|
| 348 | 348 | return $input; |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | - $new_rates = ! empty( $_POST['tax_rates'] ) ? array_values( $_POST['tax_rates'] ) : array(); |
|
| 351 | + $new_rates = !empty($_POST['tax_rates']) ? array_values($_POST['tax_rates']) : array(); |
|
| 352 | 352 | $tax_rates = array(); |
| 353 | 353 | |
| 354 | - foreach ( $new_rates as $rate ) { |
|
| 354 | + foreach ($new_rates as $rate) { |
|
| 355 | 355 | |
| 356 | - $rate['rate'] = wpinv_sanitize_amount( $rate['rate'] ); |
|
| 357 | - $rate['name'] = sanitize_text_field( $rate['name'] ); |
|
| 358 | - $rate['state'] = sanitize_text_field( $rate['state'] ); |
|
| 359 | - $rate['country'] = sanitize_text_field( $rate['country'] ); |
|
| 360 | - $rate['global'] = empty( $rate['state'] ); |
|
| 356 | + $rate['rate'] = wpinv_sanitize_amount($rate['rate']); |
|
| 357 | + $rate['name'] = sanitize_text_field($rate['name']); |
|
| 358 | + $rate['state'] = sanitize_text_field($rate['state']); |
|
| 359 | + $rate['country'] = sanitize_text_field($rate['country']); |
|
| 360 | + $rate['global'] = empty($rate['state']); |
|
| 361 | 361 | $tax_rates[] = $rate; |
| 362 | 362 | |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | - update_option( 'wpinv_tax_rates', $tax_rates ); |
|
| 365 | + update_option('wpinv_tax_rates', $tax_rates); |
|
| 366 | 366 | |
| 367 | 367 | return $input; |
| 368 | 368 | } |
| 369 | -add_filter( 'wpinv_settings_taxes-rates_sanitize', 'wpinv_settings_sanitize_tax_rates' ); |
|
| 369 | +add_filter('wpinv_settings_taxes-rates_sanitize', 'wpinv_settings_sanitize_tax_rates'); |
|
| 370 | 370 | |
| 371 | -function wpinv_sanitize_text_field( $input ) { |
|
| 372 | - return trim( $input ); |
|
| 371 | +function wpinv_sanitize_text_field($input) { |
|
| 372 | + return trim($input); |
|
| 373 | 373 | } |
| 374 | -add_filter( 'wpinv_settings_sanitize_text', 'wpinv_sanitize_text_field' ); |
|
| 374 | +add_filter('wpinv_settings_sanitize_text', 'wpinv_sanitize_text_field'); |
|
| 375 | 375 | |
| 376 | 376 | function wpinv_get_settings_tabs() { |
| 377 | 377 | $tabs = array(); |
| 378 | - $tabs['general'] = __( 'General', 'invoicing' ); |
|
| 379 | - $tabs['gateways'] = __( 'Payment Gateways', 'invoicing' ); |
|
| 380 | - $tabs['taxes'] = __( 'Taxes', 'invoicing' ); |
|
| 381 | - $tabs['emails'] = __( 'Emails', 'invoicing' ); |
|
| 378 | + $tabs['general'] = __('General', 'invoicing'); |
|
| 379 | + $tabs['gateways'] = __('Payment Gateways', 'invoicing'); |
|
| 380 | + $tabs['taxes'] = __('Taxes', 'invoicing'); |
|
| 381 | + $tabs['emails'] = __('Emails', 'invoicing'); |
|
| 382 | 382 | |
| 383 | - if ( count( getpaid_get_integration_settings() ) > 0 ) { |
|
| 384 | - $tabs['integrations'] = __( 'Integrations', 'invoicing' ); |
|
| 383 | + if (count(getpaid_get_integration_settings()) > 0) { |
|
| 384 | + $tabs['integrations'] = __('Integrations', 'invoicing'); |
|
| 385 | 385 | } |
| 386 | 386 | |
| 387 | - $tabs['privacy'] = __( 'Privacy', 'invoicing' ); |
|
| 388 | - $tabs['misc'] = __( 'Misc', 'invoicing' ); |
|
| 389 | - $tabs['tools'] = __( 'Tools', 'invoicing' ); |
|
| 387 | + $tabs['privacy'] = __('Privacy', 'invoicing'); |
|
| 388 | + $tabs['misc'] = __('Misc', 'invoicing'); |
|
| 389 | + $tabs['tools'] = __('Tools', 'invoicing'); |
|
| 390 | 390 | |
| 391 | - return apply_filters( 'wpinv_settings_tabs', $tabs ); |
|
| 391 | + return apply_filters('wpinv_settings_tabs', $tabs); |
|
| 392 | 392 | } |
| 393 | 393 | |
| 394 | -function wpinv_get_settings_tab_sections( $tab = false ) { |
|
| 394 | +function wpinv_get_settings_tab_sections($tab = false) { |
|
| 395 | 395 | $tabs = false; |
| 396 | 396 | $sections = wpinv_get_registered_settings_sections(); |
| 397 | 397 | |
| 398 | - if( $tab && ! empty( $sections[ $tab ] ) ) { |
|
| 399 | - $tabs = $sections[ $tab ]; |
|
| 398 | + if ($tab && !empty($sections[$tab])) { |
|
| 399 | + $tabs = $sections[$tab]; |
|
| 400 | 400 | } |
| 401 | 401 | |
| 402 | 402 | return $tabs; |
@@ -405,91 +405,91 @@ discard block |
||
| 405 | 405 | function wpinv_get_registered_settings_sections() { |
| 406 | 406 | static $sections = false; |
| 407 | 407 | |
| 408 | - if ( false !== $sections ) { |
|
| 408 | + if (false !== $sections) { |
|
| 409 | 409 | return $sections; |
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | $sections = array( |
| 413 | - 'general' => apply_filters( 'wpinv_settings_sections_general', array( |
|
| 414 | - 'main' => __( 'General Settings', 'invoicing' ), |
|
| 415 | - 'currency_section' => __( 'Currency Settings', 'invoicing' ), |
|
| 416 | - 'labels' => __( 'Label Texts', 'invoicing' ), |
|
| 417 | - ) ), |
|
| 418 | - 'gateways' => apply_filters( 'wpinv_settings_sections_gateways', array( |
|
| 419 | - 'main' => __( 'Gateway Settings', 'invoicing' ), |
|
| 420 | - ) ), |
|
| 421 | - 'taxes' => apply_filters( 'wpinv_settings_sections_taxes', array( |
|
| 422 | - 'main' => __( 'Tax Settings', 'invoicing' ), |
|
| 423 | - 'rates' => __( 'Tax Rates', 'invoicing' ), |
|
| 424 | - 'vat' => __( 'EU VAT Settings', 'invoicing' ) |
|
| 425 | - ) ), |
|
| 426 | - 'emails' => apply_filters( 'wpinv_settings_sections_emails', array( |
|
| 427 | - 'main' => __( 'Email Settings', 'invoicing' ), |
|
| 428 | - ) ), |
|
| 429 | - |
|
| 430 | - 'integrations' => wp_list_pluck( getpaid_get_integration_settings(), 'label', 'id' ), |
|
| 431 | - |
|
| 432 | - 'privacy' => apply_filters( 'wpinv_settings_sections_privacy', array( |
|
| 433 | - 'main' => __( 'Privacy policy', 'invoicing' ), |
|
| 434 | - ) ), |
|
| 435 | - 'misc' => apply_filters( 'wpinv_settings_sections_misc', array( |
|
| 436 | - 'main' => __( 'Miscellaneous', 'invoicing' ), |
|
| 437 | - 'custom-css' => __( 'Custom CSS', 'invoicing' ), |
|
| 438 | - ) ), |
|
| 439 | - 'tools' => apply_filters( 'wpinv_settings_sections_tools', array( |
|
| 440 | - 'main' => __( 'Diagnostic Tools', 'invoicing' ), |
|
| 441 | - ) ), |
|
| 413 | + 'general' => apply_filters('wpinv_settings_sections_general', array( |
|
| 414 | + 'main' => __('General Settings', 'invoicing'), |
|
| 415 | + 'currency_section' => __('Currency Settings', 'invoicing'), |
|
| 416 | + 'labels' => __('Label Texts', 'invoicing'), |
|
| 417 | + )), |
|
| 418 | + 'gateways' => apply_filters('wpinv_settings_sections_gateways', array( |
|
| 419 | + 'main' => __('Gateway Settings', 'invoicing'), |
|
| 420 | + )), |
|
| 421 | + 'taxes' => apply_filters('wpinv_settings_sections_taxes', array( |
|
| 422 | + 'main' => __('Tax Settings', 'invoicing'), |
|
| 423 | + 'rates' => __('Tax Rates', 'invoicing'), |
|
| 424 | + 'vat' => __('EU VAT Settings', 'invoicing') |
|
| 425 | + )), |
|
| 426 | + 'emails' => apply_filters('wpinv_settings_sections_emails', array( |
|
| 427 | + 'main' => __('Email Settings', 'invoicing'), |
|
| 428 | + )), |
|
| 429 | + |
|
| 430 | + 'integrations' => wp_list_pluck(getpaid_get_integration_settings(), 'label', 'id'), |
|
| 431 | + |
|
| 432 | + 'privacy' => apply_filters('wpinv_settings_sections_privacy', array( |
|
| 433 | + 'main' => __('Privacy policy', 'invoicing'), |
|
| 434 | + )), |
|
| 435 | + 'misc' => apply_filters('wpinv_settings_sections_misc', array( |
|
| 436 | + 'main' => __('Miscellaneous', 'invoicing'), |
|
| 437 | + 'custom-css' => __('Custom CSS', 'invoicing'), |
|
| 438 | + )), |
|
| 439 | + 'tools' => apply_filters('wpinv_settings_sections_tools', array( |
|
| 440 | + 'main' => __('Diagnostic Tools', 'invoicing'), |
|
| 441 | + )), |
|
| 442 | 442 | ); |
| 443 | 443 | |
| 444 | - $sections = apply_filters( 'wpinv_settings_sections', $sections ); |
|
| 444 | + $sections = apply_filters('wpinv_settings_sections', $sections); |
|
| 445 | 445 | |
| 446 | 446 | return $sections; |
| 447 | 447 | } |
| 448 | 448 | |
| 449 | -function wpinv_get_pages( $with_slug = false, $default_label = NULL ) { |
|
| 449 | +function wpinv_get_pages($with_slug = false, $default_label = NULL) { |
|
| 450 | 450 | $pages_options = array(); |
| 451 | 451 | |
| 452 | - if( $default_label !== NULL && $default_label !== false ) { |
|
| 453 | - $pages_options = array( '' => $default_label ); // Blank option |
|
| 452 | + if ($default_label !== NULL && $default_label !== false) { |
|
| 453 | + $pages_options = array('' => $default_label); // Blank option |
|
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | $pages = get_pages(); |
| 457 | - if ( $pages ) { |
|
| 458 | - foreach ( $pages as $page ) { |
|
| 457 | + if ($pages) { |
|
| 458 | + foreach ($pages as $page) { |
|
| 459 | 459 | $title = $with_slug ? $page->post_title . ' (' . $page->post_name . ')' : $page->post_title; |
| 460 | - $pages_options[ $page->ID ] = $title; |
|
| 460 | + $pages_options[$page->ID] = $title; |
|
| 461 | 461 | } |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | return $pages_options; |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | -function wpinv_header_callback( $args ) { |
|
| 468 | - if ( !empty( $args['desc'] ) ) { |
|
| 467 | +function wpinv_header_callback($args) { |
|
| 468 | + if (!empty($args['desc'])) { |
|
| 469 | 469 | echo $args['desc']; |
| 470 | 470 | } |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | -function wpinv_hidden_callback( $args ) { |
|
| 473 | +function wpinv_hidden_callback($args) { |
|
| 474 | 474 | global $wpinv_options; |
| 475 | 475 | |
| 476 | - if ( isset( $args['set_value'] ) ) { |
|
| 476 | + if (isset($args['set_value'])) { |
|
| 477 | 477 | $value = $args['set_value']; |
| 478 | - } elseif ( isset( $wpinv_options[ $args['id'] ] ) ) { |
|
| 479 | - $value = $wpinv_options[ $args['id'] ]; |
|
| 478 | + } elseif (isset($wpinv_options[$args['id']])) { |
|
| 479 | + $value = $wpinv_options[$args['id']]; |
|
| 480 | 480 | } else { |
| 481 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 481 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 482 | 482 | } |
| 483 | 483 | |
| 484 | - if ( isset( $args['faux'] ) && true === $args['faux'] ) { |
|
| 484 | + if (isset($args['faux']) && true === $args['faux']) { |
|
| 485 | 485 | $args['readonly'] = true; |
| 486 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 486 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 487 | 487 | $name = ''; |
| 488 | 488 | } else { |
| 489 | - $name = 'name="wpinv_settings[' . esc_attr( $args['id'] ) . ']"'; |
|
| 489 | + $name = 'name="wpinv_settings[' . esc_attr($args['id']) . ']"'; |
|
| 490 | 490 | } |
| 491 | 491 | |
| 492 | - $html = '<input type="hidden" id="wpinv_settings[' . wpinv_sanitize_key( $args['id'] ) . ']" ' . $name . ' value="' . esc_attr( stripslashes( $value ) ) . '" />'; |
|
| 492 | + $html = '<input type="hidden" id="wpinv_settings[' . wpinv_sanitize_key($args['id']) . ']" ' . $name . ' value="' . esc_attr(stripslashes($value)) . '" />'; |
|
| 493 | 493 | |
| 494 | 494 | echo $html; |
| 495 | 495 | } |
@@ -497,61 +497,61 @@ discard block |
||
| 497 | 497 | /** |
| 498 | 498 | * Displays a checkbox settings callback. |
| 499 | 499 | */ |
| 500 | -function wpinv_checkbox_callback( $args ) { |
|
| 500 | +function wpinv_checkbox_callback($args) { |
|
| 501 | 501 | |
| 502 | - $std = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 503 | - $std = wpinv_get_option( $args['id'], $std ); |
|
| 504 | - $id = esc_attr( $args['id'] ); |
|
| 502 | + $std = isset($args['std']) ? $args['std'] : ''; |
|
| 503 | + $std = wpinv_get_option($args['id'], $std); |
|
| 504 | + $id = esc_attr($args['id']); |
|
| 505 | 505 | |
| 506 | - getpaid_hidden_field( "wpinv_settings[$id]", '0' ); |
|
| 506 | + getpaid_hidden_field("wpinv_settings[$id]", '0'); |
|
| 507 | 507 | ?> |
| 508 | 508 | <fieldset> |
| 509 | 509 | <label> |
| 510 | - <input id="wpinv-settings-<?php echo $id; ?>" name="wpinv_settings[<?php echo $id; ?>]" <?php checked( empty( $std ), false ); ?> value="1" type="checkbox"> |
|
| 511 | - <?php echo wp_kses_post( $args['desc'] ); ?> |
|
| 510 | + <input id="wpinv-settings-<?php echo $id; ?>" name="wpinv_settings[<?php echo $id; ?>]" <?php checked(empty($std), false); ?> value="1" type="checkbox"> |
|
| 511 | + <?php echo wp_kses_post($args['desc']); ?> |
|
| 512 | 512 | </label> |
| 513 | 513 | </fieldset> |
| 514 | 514 | <?php |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | -function wpinv_multicheck_callback( $args ) { |
|
| 517 | +function wpinv_multicheck_callback($args) { |
|
| 518 | 518 | |
| 519 | 519 | global $wpinv_options; |
| 520 | 520 | |
| 521 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 522 | - $class = !empty( $args['class'] ) ? ' ' . esc_attr( $args['class'] ) : ''; |
|
| 521 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 522 | + $class = !empty($args['class']) ? ' ' . esc_attr($args['class']) : ''; |
|
| 523 | 523 | |
| 524 | - if ( ! empty( $args['options'] ) ) { |
|
| 524 | + if (!empty($args['options'])) { |
|
| 525 | 525 | |
| 526 | - $std = isset( $args['std'] ) ? $args['std'] : array(); |
|
| 527 | - $value = isset( $wpinv_options[ $args['id'] ] ) ? $wpinv_options[ $args['id'] ] : $std; |
|
| 526 | + $std = isset($args['std']) ? $args['std'] : array(); |
|
| 527 | + $value = isset($wpinv_options[$args['id']]) ? $wpinv_options[$args['id']] : $std; |
|
| 528 | 528 | |
| 529 | 529 | echo '<div class="wpi-mcheck-rows wpi-mcheck-' . $sanitize_id . $class . '">'; |
| 530 | - foreach( $args['options'] as $key => $option ): |
|
| 531 | - $sanitize_key = wpinv_sanitize_key( $key ); |
|
| 532 | - if ( in_array( $sanitize_key, $value ) ) { |
|
| 530 | + foreach ($args['options'] as $key => $option): |
|
| 531 | + $sanitize_key = wpinv_sanitize_key($key); |
|
| 532 | + if (in_array($sanitize_key, $value)) { |
|
| 533 | 533 | $enabled = $sanitize_key; |
| 534 | 534 | } else { |
| 535 | 535 | $enabled = NULL; |
| 536 | 536 | } |
| 537 | - echo '<div class="wpi-mcheck-row"><input name="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" id="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" type="checkbox" value="' . esc_attr( $sanitize_key ) . '" ' . checked( $sanitize_key, $enabled, false ) . '/> '; |
|
| 538 | - echo '<label for="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']">' . wp_kses_post( $option ) . '</label></div>'; |
|
| 537 | + echo '<div class="wpi-mcheck-row"><input name="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" id="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" type="checkbox" value="' . esc_attr($sanitize_key) . '" ' . checked($sanitize_key, $enabled, false) . '/> '; |
|
| 538 | + echo '<label for="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']">' . wp_kses_post($option) . '</label></div>'; |
|
| 539 | 539 | endforeach; |
| 540 | 540 | echo '</div>'; |
| 541 | 541 | echo '<p class="description">' . $args['desc'] . '</p>'; |
| 542 | 542 | } |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | -function wpinv_payment_icons_callback( $args ) { |
|
| 545 | +function wpinv_payment_icons_callback($args) { |
|
| 546 | 546 | global $wpinv_options; |
| 547 | 547 | |
| 548 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 548 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 549 | 549 | |
| 550 | - if ( ! empty( $args['options'] ) ) { |
|
| 551 | - foreach( $args['options'] as $key => $option ) { |
|
| 552 | - $sanitize_key = wpinv_sanitize_key( $key ); |
|
| 550 | + if (!empty($args['options'])) { |
|
| 551 | + foreach ($args['options'] as $key => $option) { |
|
| 552 | + $sanitize_key = wpinv_sanitize_key($key); |
|
| 553 | 553 | |
| 554 | - if( isset( $wpinv_options[$args['id']][$key] ) ) { |
|
| 554 | + if (isset($wpinv_options[$args['id']][$key])) { |
|
| 555 | 555 | $enabled = $option; |
| 556 | 556 | } else { |
| 557 | 557 | $enabled = NULL; |
@@ -559,67 +559,67 @@ discard block |
||
| 559 | 559 | |
| 560 | 560 | echo '<label for="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" style="margin-right:10px;line-height:16px;height:16px;display:inline-block;">'; |
| 561 | 561 | |
| 562 | - echo '<input name="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" id="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" type="checkbox" value="' . esc_attr( $option ) . '" ' . checked( $option, $enabled, false ) . '/> '; |
|
| 562 | + echo '<input name="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" id="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" type="checkbox" value="' . esc_attr($option) . '" ' . checked($option, $enabled, false) . '/> '; |
|
| 563 | 563 | |
| 564 | - if ( wpinv_string_is_image_url( $key ) ) { |
|
| 565 | - echo '<img class="payment-icon" src="' . esc_url( $key ) . '" style="width:32px;height:24px;position:relative;top:6px;margin-right:5px;"/>'; |
|
| 564 | + if (wpinv_string_is_image_url($key)) { |
|
| 565 | + echo '<img class="payment-icon" src="' . esc_url($key) . '" style="width:32px;height:24px;position:relative;top:6px;margin-right:5px;"/>'; |
|
| 566 | 566 | } else { |
| 567 | - $card = strtolower( str_replace( ' ', '', $option ) ); |
|
| 567 | + $card = strtolower(str_replace(' ', '', $option)); |
|
| 568 | 568 | |
| 569 | - if ( has_filter( 'wpinv_accepted_payment_' . $card . '_image' ) ) { |
|
| 570 | - $image = apply_filters( 'wpinv_accepted_payment_' . $card . '_image', '' ); |
|
| 569 | + if (has_filter('wpinv_accepted_payment_' . $card . '_image')) { |
|
| 570 | + $image = apply_filters('wpinv_accepted_payment_' . $card . '_image', ''); |
|
| 571 | 571 | } else { |
| 572 | - $image = wpinv_locate_template( 'images' . DIRECTORY_SEPARATOR . 'icons' . DIRECTORY_SEPARATOR . $card . '.gif', false ); |
|
| 572 | + $image = wpinv_locate_template('images' . DIRECTORY_SEPARATOR . 'icons' . DIRECTORY_SEPARATOR . $card . '.gif', false); |
|
| 573 | 573 | $content_dir = WP_CONTENT_DIR; |
| 574 | 574 | |
| 575 | - if ( function_exists( 'wp_normalize_path' ) ) { |
|
| 575 | + if (function_exists('wp_normalize_path')) { |
|
| 576 | 576 | // Replaces backslashes with forward slashes for Windows systems |
| 577 | - $image = wp_normalize_path( $image ); |
|
| 578 | - $content_dir = wp_normalize_path( $content_dir ); |
|
| 577 | + $image = wp_normalize_path($image); |
|
| 578 | + $content_dir = wp_normalize_path($content_dir); |
|
| 579 | 579 | } |
| 580 | 580 | |
| 581 | - $image = str_replace( $content_dir, content_url(), $image ); |
|
| 581 | + $image = str_replace($content_dir, content_url(), $image); |
|
| 582 | 582 | } |
| 583 | 583 | |
| 584 | - echo '<img class="payment-icon" src="' . esc_url( $image ) . '" style="width:32px;height:24px;position:relative;top:6px;margin-right:5px;"/>'; |
|
| 584 | + echo '<img class="payment-icon" src="' . esc_url($image) . '" style="width:32px;height:24px;position:relative;top:6px;margin-right:5px;"/>'; |
|
| 585 | 585 | } |
| 586 | 586 | echo $option . '</label>'; |
| 587 | 587 | } |
| 588 | - echo '<p class="description" style="margin-top:16px;">' . wp_kses_post( $args['desc'] ) . '</p>'; |
|
| 588 | + echo '<p class="description" style="margin-top:16px;">' . wp_kses_post($args['desc']) . '</p>'; |
|
| 589 | 589 | } |
| 590 | 590 | } |
| 591 | 591 | |
| 592 | 592 | /** |
| 593 | 593 | * Displays a radio settings field. |
| 594 | 594 | */ |
| 595 | -function wpinv_radio_callback( $args ) { |
|
| 595 | +function wpinv_radio_callback($args) { |
|
| 596 | 596 | |
| 597 | - $std = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 598 | - $std = wpinv_get_option( $args['id'], $std ); |
|
| 597 | + $std = isset($args['std']) ? $args['std'] : ''; |
|
| 598 | + $std = wpinv_get_option($args['id'], $std); |
|
| 599 | 599 | ?> |
| 600 | 600 | <fieldset> |
| 601 | - <ul id="wpinv-settings-<?php echo esc_attr( $args['id'] ); ?>" style="margin-top: 0;"> |
|
| 602 | - <?php foreach( $args['options'] as $key => $option ) : ?> |
|
| 601 | + <ul id="wpinv-settings-<?php echo esc_attr($args['id']); ?>" style="margin-top: 0;"> |
|
| 602 | + <?php foreach ($args['options'] as $key => $option) : ?> |
|
| 603 | 603 | <li> |
| 604 | 604 | <label> |
| 605 | - <input name="wpinv_settings[<?php echo esc_attr( $args['id'] ); ?>]" <?php checked( $std, $key ); ?> value="<?php echo esc_attr( $key ); ?>" type="radio"> |
|
| 606 | - <?php echo wp_kses_post( $option ); ?> |
|
| 605 | + <input name="wpinv_settings[<?php echo esc_attr($args['id']); ?>]" <?php checked($std, $key); ?> value="<?php echo esc_attr($key); ?>" type="radio"> |
|
| 606 | + <?php echo wp_kses_post($option); ?> |
|
| 607 | 607 | </label> |
| 608 | 608 | </li> |
| 609 | 609 | <?php endforeach; ?> |
| 610 | 610 | </ul> |
| 611 | 611 | </fieldset> |
| 612 | 612 | <?php |
| 613 | - getpaid_settings_description_callback( $args ); |
|
| 613 | + getpaid_settings_description_callback($args); |
|
| 614 | 614 | } |
| 615 | 615 | |
| 616 | 616 | /** |
| 617 | 617 | * Displays a description if available. |
| 618 | 618 | */ |
| 619 | -function getpaid_settings_description_callback( $args ) { |
|
| 619 | +function getpaid_settings_description_callback($args) { |
|
| 620 | 620 | |
| 621 | - if ( ! empty( $args['desc'] ) ) { |
|
| 622 | - $description = wp_kses_post( $args['desc'] ); |
|
| 621 | + if (!empty($args['desc'])) { |
|
| 622 | + $description = wp_kses_post($args['desc']); |
|
| 623 | 623 | echo "<p class='description'>$description</p>"; |
| 624 | 624 | } |
| 625 | 625 | |
@@ -635,7 +635,7 @@ discard block |
||
| 635 | 635 | </tr> |
| 636 | 636 | <tr class="bsui"> |
| 637 | 637 | <td colspan="2" class="p-0"> |
| 638 | - <?php include plugin_dir_path( __FILE__ ) . 'views/html-gateways-edit.php'; ?> |
|
| 638 | + <?php include plugin_dir_path(__FILE__) . 'views/html-gateways-edit.php'; ?> |
|
| 639 | 639 | |
| 640 | 640 | <?php |
| 641 | 641 | } |
@@ -643,22 +643,22 @@ discard block |
||
| 643 | 643 | function wpinv_gateway_select_callback($args) { |
| 644 | 644 | global $wpinv_options; |
| 645 | 645 | |
| 646 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 647 | - $class = !empty( $args['class'] ) ? ' ' . esc_attr( $args['class'] ) : ''; |
|
| 646 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 647 | + $class = !empty($args['class']) ? ' ' . esc_attr($args['class']) : ''; |
|
| 648 | 648 | |
| 649 | - echo '<select name="wpinv_settings[' . $sanitize_id . ']"" id="wpinv_settings[' . $sanitize_id . ']" class="'.$class.'" >'; |
|
| 649 | + echo '<select name="wpinv_settings[' . $sanitize_id . ']"" id="wpinv_settings[' . $sanitize_id . ']" class="' . $class . '" >'; |
|
| 650 | 650 | |
| 651 | - foreach ( $args['options'] as $key => $option ) : |
|
| 652 | - if ( isset( $args['selected'] ) && $args['selected'] !== null && $args['selected'] !== false ) { |
|
| 653 | - $selected = selected( $key, $args['selected'], false ); |
|
| 651 | + foreach ($args['options'] as $key => $option) : |
|
| 652 | + if (isset($args['selected']) && $args['selected'] !== null && $args['selected'] !== false) { |
|
| 653 | + $selected = selected($key, $args['selected'], false); |
|
| 654 | 654 | } else { |
| 655 | - $selected = isset( $wpinv_options[ $args['id'] ] ) ? selected( $key, $wpinv_options[$args['id']], false ) : ''; |
|
| 655 | + $selected = isset($wpinv_options[$args['id']]) ? selected($key, $wpinv_options[$args['id']], false) : ''; |
|
| 656 | 656 | } |
| 657 | - echo '<option value="' . wpinv_sanitize_key( $key ) . '"' . $selected . '>' . esc_html( $option['admin_label'] ) . '</option>'; |
|
| 657 | + echo '<option value="' . wpinv_sanitize_key($key) . '"' . $selected . '>' . esc_html($option['admin_label']) . '</option>'; |
|
| 658 | 658 | endforeach; |
| 659 | 659 | |
| 660 | 660 | echo '</select>'; |
| 661 | - echo '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post( $args['desc'] ) . '</label>'; |
|
| 661 | + echo '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post($args['desc']) . '</label>'; |
|
| 662 | 662 | } |
| 663 | 663 | |
| 664 | 664 | /** |
@@ -667,28 +667,28 @@ discard block |
||
| 667 | 667 | * @param array $args |
| 668 | 668 | * @return string |
| 669 | 669 | */ |
| 670 | -function wpinv_settings_attrs_helper( $args ) { |
|
| 670 | +function wpinv_settings_attrs_helper($args) { |
|
| 671 | 671 | |
| 672 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 673 | - $id = esc_attr( $args['id'] ); |
|
| 674 | - $placeholder = esc_attr( $args['placeholder'] ); |
|
| 672 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 673 | + $id = esc_attr($args['id']); |
|
| 674 | + $placeholder = esc_attr($args['placeholder']); |
|
| 675 | 675 | |
| 676 | - if ( ! empty( $args['faux'] ) ) { |
|
| 676 | + if (!empty($args['faux'])) { |
|
| 677 | 677 | $args['readonly'] = true; |
| 678 | 678 | $name = ''; |
| 679 | 679 | } else { |
| 680 | - $value = wpinv_get_option( $args['id'], $value ); |
|
| 680 | + $value = wpinv_get_option($args['id'], $value); |
|
| 681 | 681 | $name = "wpinv_settings[$id]"; |
| 682 | 682 | } |
| 683 | 683 | |
| 684 | - $value = is_scalar( $value ) ? esc_attr( $value ) : ''; |
|
| 685 | - $class = esc_attr( $args['class'] ); |
|
| 686 | - $style = esc_attr( $args['style'] ); |
|
| 687 | - $readonly = empty( $args['readonly'] ) ? '' : 'readonly onclick="this.select()"'; |
|
| 684 | + $value = is_scalar($value) ? esc_attr($value) : ''; |
|
| 685 | + $class = esc_attr($args['class']); |
|
| 686 | + $style = esc_attr($args['style']); |
|
| 687 | + $readonly = empty($args['readonly']) ? '' : 'readonly onclick="this.select()"'; |
|
| 688 | 688 | |
| 689 | 689 | $onchange = ''; |
| 690 | - if ( ! empty( $args['onchange'] ) ) { |
|
| 691 | - $onchange = ' onchange="' . esc_attr( $args['onchange'] ) . '"'; |
|
| 690 | + if (!empty($args['onchange'])) { |
|
| 691 | + $onchange = ' onchange="' . esc_attr($args['onchange']) . '"'; |
|
| 692 | 692 | } |
| 693 | 693 | |
| 694 | 694 | return "name='$name' id='wpinv-settings-$id' style='$style' value='$value' class='$class' placeholder='$placeholder' data-placeholder='$placeholder' $onchange $readonly"; |
@@ -697,11 +697,11 @@ discard block |
||
| 697 | 697 | /** |
| 698 | 698 | * Displays a text input settings callback. |
| 699 | 699 | */ |
| 700 | -function wpinv_text_callback( $args ) { |
|
| 700 | +function wpinv_text_callback($args) { |
|
| 701 | 701 | |
| 702 | - $desc = wp_kses_post( $args['desc'] ); |
|
| 703 | - $desc = empty( $desc ) ? '' : "<p class='description'>$desc</p>"; |
|
| 704 | - $attr = wpinv_settings_attrs_helper( $args ); |
|
| 702 | + $desc = wp_kses_post($args['desc']); |
|
| 703 | + $desc = empty($desc) ? '' : "<p class='description'>$desc</p>"; |
|
| 704 | + $attr = wpinv_settings_attrs_helper($args); |
|
| 705 | 705 | |
| 706 | 706 | ?> |
| 707 | 707 | <label style="width: 100%;"> |
@@ -715,14 +715,14 @@ discard block |
||
| 715 | 715 | /** |
| 716 | 716 | * Displays a number input settings callback. |
| 717 | 717 | */ |
| 718 | -function wpinv_number_callback( $args ) { |
|
| 718 | +function wpinv_number_callback($args) { |
|
| 719 | 719 | |
| 720 | - $desc = wp_kses_post( $args['desc'] ); |
|
| 721 | - $desc = empty( $desc ) ? '' : "<p class='description'>$desc</p>"; |
|
| 722 | - $attr = wpinv_settings_attrs_helper( $args ); |
|
| 723 | - $max = intval( $args['max'] ); |
|
| 724 | - $min = intval( $args['min'] ); |
|
| 725 | - $step = floatval( $args['step'] ); |
|
| 720 | + $desc = wp_kses_post($args['desc']); |
|
| 721 | + $desc = empty($desc) ? '' : "<p class='description'>$desc</p>"; |
|
| 722 | + $attr = wpinv_settings_attrs_helper($args); |
|
| 723 | + $max = intval($args['max']); |
|
| 724 | + $min = intval($args['min']); |
|
| 725 | + $step = floatval($args['step']); |
|
| 726 | 726 | |
| 727 | 727 | ?> |
| 728 | 728 | <label style="width: 100%;"> |
@@ -733,47 +733,47 @@ discard block |
||
| 733 | 733 | |
| 734 | 734 | } |
| 735 | 735 | |
| 736 | -function wpinv_textarea_callback( $args ) { |
|
| 736 | +function wpinv_textarea_callback($args) { |
|
| 737 | 737 | global $wpinv_options; |
| 738 | 738 | |
| 739 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 739 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 740 | 740 | |
| 741 | - if ( isset( $wpinv_options[ $args['id'] ] ) ) { |
|
| 742 | - $value = $wpinv_options[ $args['id'] ]; |
|
| 741 | + if (isset($wpinv_options[$args['id']])) { |
|
| 742 | + $value = $wpinv_options[$args['id']]; |
|
| 743 | 743 | } else { |
| 744 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 744 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 745 | 745 | } |
| 746 | 746 | |
| 747 | - $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular'; |
|
| 748 | - $class = ( isset( $args['class'] ) && ! is_null( $args['class'] ) ) ? $args['class'] : 'large-text'; |
|
| 747 | + $size = (isset($args['size']) && !is_null($args['size'])) ? $args['size'] : 'regular'; |
|
| 748 | + $class = (isset($args['class']) && !is_null($args['class'])) ? $args['class'] : 'large-text'; |
|
| 749 | 749 | |
| 750 | - $html = '<textarea class="' . sanitize_html_class( $class ) . ' txtarea-' . sanitize_html_class( $size ) . ' wpi-' . esc_attr( sanitize_html_class( $sanitize_id ) ) . ' " cols="' . $args['cols'] . '" rows="' . $args['rows'] . '" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr( $args['id'] ) . ']">' . esc_textarea( stripslashes( $value ) ) . '</textarea>'; |
|
| 751 | - $html .= '<br /><label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post( $args['desc'] ) . '</label>'; |
|
| 750 | + $html = '<textarea class="' . sanitize_html_class($class) . ' txtarea-' . sanitize_html_class($size) . ' wpi-' . esc_attr(sanitize_html_class($sanitize_id)) . ' " cols="' . $args['cols'] . '" rows="' . $args['rows'] . '" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr($args['id']) . ']">' . esc_textarea(stripslashes($value)) . '</textarea>'; |
|
| 751 | + $html .= '<br /><label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post($args['desc']) . '</label>'; |
|
| 752 | 752 | |
| 753 | 753 | echo $html; |
| 754 | 754 | } |
| 755 | 755 | |
| 756 | -function wpinv_password_callback( $args ) { |
|
| 756 | +function wpinv_password_callback($args) { |
|
| 757 | 757 | global $wpinv_options; |
| 758 | 758 | |
| 759 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 759 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 760 | 760 | |
| 761 | - if ( isset( $wpinv_options[ $args['id'] ] ) ) { |
|
| 762 | - $value = $wpinv_options[ $args['id'] ]; |
|
| 761 | + if (isset($wpinv_options[$args['id']])) { |
|
| 762 | + $value = $wpinv_options[$args['id']]; |
|
| 763 | 763 | } else { |
| 764 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 764 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 765 | 765 | } |
| 766 | 766 | |
| 767 | - $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular'; |
|
| 768 | - $html = '<input type="password" class="' . sanitize_html_class( $size ) . '-text" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr( $args['id'] ) . ']" value="' . esc_attr( $value ) . '"/>'; |
|
| 769 | - $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post( $args['desc'] ) . '</label>'; |
|
| 767 | + $size = (isset($args['size']) && !is_null($args['size'])) ? $args['size'] : 'regular'; |
|
| 768 | + $html = '<input type="password" class="' . sanitize_html_class($size) . '-text" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr($args['id']) . ']" value="' . esc_attr($value) . '"/>'; |
|
| 769 | + $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post($args['desc']) . '</label>'; |
|
| 770 | 770 | |
| 771 | 771 | echo $html; |
| 772 | 772 | } |
| 773 | 773 | |
| 774 | 774 | function wpinv_missing_callback($args) { |
| 775 | 775 | printf( |
| 776 | - __( 'The callback function used for the %s setting is missing.', 'invoicing' ), |
|
| 776 | + __('The callback function used for the %s setting is missing.', 'invoicing'), |
|
| 777 | 777 | '<strong>' . $args['id'] . '</strong>' |
| 778 | 778 | ); |
| 779 | 779 | } |
@@ -781,20 +781,20 @@ discard block |
||
| 781 | 781 | /** |
| 782 | 782 | * Displays a number input settings callback. |
| 783 | 783 | */ |
| 784 | -function wpinv_select_callback( $args ) { |
|
| 784 | +function wpinv_select_callback($args) { |
|
| 785 | 785 | |
| 786 | - $desc = wp_kses_post( $args['desc'] ); |
|
| 787 | - $desc = empty( $desc ) ? '' : "<p class='description'>$desc</p>"; |
|
| 788 | - $attr = wpinv_settings_attrs_helper( $args ); |
|
| 789 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 790 | - $value = wpinv_get_option( $args['id'], $value ); |
|
| 786 | + $desc = wp_kses_post($args['desc']); |
|
| 787 | + $desc = empty($desc) ? '' : "<p class='description'>$desc</p>"; |
|
| 788 | + $attr = wpinv_settings_attrs_helper($args); |
|
| 789 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 790 | + $value = wpinv_get_option($args['id'], $value); |
|
| 791 | 791 | |
| 792 | 792 | ?> |
| 793 | 793 | <label style="width: 100%;"> |
| 794 | 794 | <select <?php echo $attr; ?>> |
| 795 | - <?php foreach ( $args['options'] as $option => $name ) : ?> |
|
| 796 | - <option value="<?php echo esc_attr( $option ); ?>" <?php echo selected( is_array( $value ) ? in_array( "$option", $value, true ) : "$option" === $value ); ?>><?php echo wpinv_clean( $name ); ?></option> |
|
| 797 | - <?php endforeach;?> |
|
| 795 | + <?php foreach ($args['options'] as $option => $name) : ?> |
|
| 796 | + <option value="<?php echo esc_attr($option); ?>" <?php echo selected(is_array($value) ? in_array("$option", $value, true) : "$option" === $value); ?>><?php echo wpinv_clean($name); ?></option> |
|
| 797 | + <?php endforeach; ?> |
|
| 798 | 798 | </select> |
| 799 | 799 | <?php echo $desc; ?> |
| 800 | 800 | </label> |
@@ -802,95 +802,95 @@ discard block |
||
| 802 | 802 | |
| 803 | 803 | } |
| 804 | 804 | |
| 805 | -function wpinv_color_select_callback( $args ) { |
|
| 805 | +function wpinv_color_select_callback($args) { |
|
| 806 | 806 | global $wpinv_options; |
| 807 | 807 | |
| 808 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 808 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 809 | 809 | |
| 810 | - if ( isset( $wpinv_options[ $args['id'] ] ) ) { |
|
| 811 | - $value = $wpinv_options[ $args['id'] ]; |
|
| 810 | + if (isset($wpinv_options[$args['id']])) { |
|
| 811 | + $value = $wpinv_options[$args['id']]; |
|
| 812 | 812 | } else { |
| 813 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 813 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 814 | 814 | } |
| 815 | 815 | |
| 816 | - $html = '<select id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr( $args['id'] ) . ']"/>'; |
|
| 816 | + $html = '<select id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr($args['id']) . ']"/>'; |
|
| 817 | 817 | |
| 818 | - foreach ( $args['options'] as $option => $color ) { |
|
| 819 | - $selected = selected( $option, $value, false ); |
|
| 820 | - $html .= '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( $color['label'] ) . '</option>'; |
|
| 818 | + foreach ($args['options'] as $option => $color) { |
|
| 819 | + $selected = selected($option, $value, false); |
|
| 820 | + $html .= '<option value="' . esc_attr($option) . '" ' . $selected . '>' . esc_html($color['label']) . '</option>'; |
|
| 821 | 821 | } |
| 822 | 822 | |
| 823 | 823 | $html .= '</select>'; |
| 824 | - $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post( $args['desc'] ) . '</label>'; |
|
| 824 | + $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post($args['desc']) . '</label>'; |
|
| 825 | 825 | |
| 826 | 826 | echo $html; |
| 827 | 827 | } |
| 828 | 828 | |
| 829 | -function wpinv_rich_editor_callback( $args ) { |
|
| 829 | +function wpinv_rich_editor_callback($args) { |
|
| 830 | 830 | global $wpinv_options, $wp_version; |
| 831 | 831 | |
| 832 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 832 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 833 | 833 | |
| 834 | - if ( isset( $wpinv_options[ $args['id'] ] ) ) { |
|
| 835 | - $value = $wpinv_options[ $args['id'] ]; |
|
| 834 | + if (isset($wpinv_options[$args['id']])) { |
|
| 835 | + $value = $wpinv_options[$args['id']]; |
|
| 836 | 836 | |
| 837 | - if( empty( $args['allow_blank'] ) && empty( $value ) ) { |
|
| 838 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 837 | + if (empty($args['allow_blank']) && empty($value)) { |
|
| 838 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 839 | 839 | } |
| 840 | 840 | } else { |
| 841 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 841 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 842 | 842 | } |
| 843 | 843 | |
| 844 | - $rows = isset( $args['size'] ) ? $args['size'] : 20; |
|
| 844 | + $rows = isset($args['size']) ? $args['size'] : 20; |
|
| 845 | 845 | |
| 846 | 846 | $html = '<div class="getpaid-settings-editor-input">'; |
| 847 | - if ( $wp_version >= 3.3 && function_exists( 'wp_editor' ) ) { |
|
| 847 | + if ($wp_version >= 3.3 && function_exists('wp_editor')) { |
|
| 848 | 848 | ob_start(); |
| 849 | - wp_editor( stripslashes( $value ), 'wpinv_settings_' . esc_attr( $args['id'] ), array( 'textarea_name' => 'wpinv_settings[' . esc_attr( $args['id'] ) . ']', 'textarea_rows' => absint( $rows ), 'media_buttons' => false ) ); |
|
| 849 | + wp_editor(stripslashes($value), 'wpinv_settings_' . esc_attr($args['id']), array('textarea_name' => 'wpinv_settings[' . esc_attr($args['id']) . ']', 'textarea_rows' => absint($rows), 'media_buttons' => false)); |
|
| 850 | 850 | $html .= ob_get_clean(); |
| 851 | 851 | } else { |
| 852 | - $html .= '<textarea class="large-text" rows="10" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr( $args['id'] ) . ']" class="wpi-' . esc_attr( sanitize_html_class( $args['id'] ) ) . '">' . esc_textarea( stripslashes( $value ) ) . '</textarea>'; |
|
| 852 | + $html .= '<textarea class="large-text" rows="10" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr($args['id']) . ']" class="wpi-' . esc_attr(sanitize_html_class($args['id'])) . '">' . esc_textarea(stripslashes($value)) . '</textarea>'; |
|
| 853 | 853 | } |
| 854 | 854 | |
| 855 | - $html .= '</div><br/><label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post( $args['desc'] ) . '</label>'; |
|
| 855 | + $html .= '</div><br/><label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post($args['desc']) . '</label>'; |
|
| 856 | 856 | |
| 857 | 857 | echo $html; |
| 858 | 858 | } |
| 859 | 859 | |
| 860 | -function wpinv_upload_callback( $args ) { |
|
| 860 | +function wpinv_upload_callback($args) { |
|
| 861 | 861 | global $wpinv_options; |
| 862 | 862 | |
| 863 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 863 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 864 | 864 | |
| 865 | - if ( isset( $wpinv_options[ $args['id'] ] ) ) { |
|
| 865 | + if (isset($wpinv_options[$args['id']])) { |
|
| 866 | 866 | $value = $wpinv_options[$args['id']]; |
| 867 | 867 | } else { |
| 868 | 868 | $value = isset($args['std']) ? $args['std'] : ''; |
| 869 | 869 | } |
| 870 | 870 | |
| 871 | - $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular'; |
|
| 872 | - $html = '<input type="text" class="' . sanitize_html_class( $size ) . '-text" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr( $args['id'] ) . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>'; |
|
| 873 | - $html .= '<span> <input type="button" class="wpinv_settings_upload_button button-secondary" value="' . __( 'Upload File', 'invoicing' ) . '"/></span>'; |
|
| 874 | - $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post( $args['desc'] ) . '</label>'; |
|
| 871 | + $size = (isset($args['size']) && !is_null($args['size'])) ? $args['size'] : 'regular'; |
|
| 872 | + $html = '<input type="text" class="' . sanitize_html_class($size) . '-text" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr($args['id']) . ']" value="' . esc_attr(stripslashes($value)) . '"/>'; |
|
| 873 | + $html .= '<span> <input type="button" class="wpinv_settings_upload_button button-secondary" value="' . __('Upload File', 'invoicing') . '"/></span>'; |
|
| 874 | + $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post($args['desc']) . '</label>'; |
|
| 875 | 875 | |
| 876 | 876 | echo $html; |
| 877 | 877 | } |
| 878 | 878 | |
| 879 | -function wpinv_color_callback( $args ) { |
|
| 879 | +function wpinv_color_callback($args) { |
|
| 880 | 880 | global $wpinv_options; |
| 881 | 881 | |
| 882 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 882 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 883 | 883 | |
| 884 | - if ( isset( $wpinv_options[ $args['id'] ] ) ) { |
|
| 885 | - $value = $wpinv_options[ $args['id'] ]; |
|
| 884 | + if (isset($wpinv_options[$args['id']])) { |
|
| 885 | + $value = $wpinv_options[$args['id']]; |
|
| 886 | 886 | } else { |
| 887 | - $value = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 887 | + $value = isset($args['std']) ? $args['std'] : ''; |
|
| 888 | 888 | } |
| 889 | 889 | |
| 890 | - $default = isset( $args['std'] ) ? $args['std'] : ''; |
|
| 890 | + $default = isset($args['std']) ? $args['std'] : ''; |
|
| 891 | 891 | |
| 892 | - $html = '<input type="text" class="wpinv-color-picker" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr( $args['id'] ) . ']" value="' . esc_attr( $value ) . '" data-default-color="' . esc_attr( $default ) . '" />'; |
|
| 893 | - $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post( $args['desc'] ) . '</label>'; |
|
| 892 | + $html = '<input type="text" class="wpinv-color-picker" id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr($args['id']) . ']" value="' . esc_attr($value) . '" data-default-color="' . esc_attr($default) . '" />'; |
|
| 893 | + $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post($args['desc']) . '</label>'; |
|
| 894 | 894 | |
| 895 | 895 | echo $html; |
| 896 | 896 | } |
@@ -898,9 +898,9 @@ discard block |
||
| 898 | 898 | function wpinv_country_states_callback($args) { |
| 899 | 899 | global $wpinv_options; |
| 900 | 900 | |
| 901 | - $sanitize_id = wpinv_sanitize_key( $args['id'] ); |
|
| 901 | + $sanitize_id = wpinv_sanitize_key($args['id']); |
|
| 902 | 902 | |
| 903 | - if ( isset( $args['placeholder'] ) ) { |
|
| 903 | + if (isset($args['placeholder'])) { |
|
| 904 | 904 | $placeholder = $args['placeholder']; |
| 905 | 905 | } else { |
| 906 | 906 | $placeholder = ''; |
@@ -908,16 +908,16 @@ discard block |
||
| 908 | 908 | |
| 909 | 909 | $states = wpinv_get_country_states(); |
| 910 | 910 | |
| 911 | - $class = empty( $states ) ? ' class="wpinv-no-states"' : ' class="wpi_select2"'; |
|
| 912 | - $html = '<select id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr( $args['id'] ) . ']"' . $class . 'data-placeholder="' . esc_html( $placeholder ) . '"/>'; |
|
| 911 | + $class = empty($states) ? ' class="wpinv-no-states"' : ' class="wpi_select2"'; |
|
| 912 | + $html = '<select id="wpinv_settings[' . $sanitize_id . ']" name="wpinv_settings[' . esc_attr($args['id']) . ']"' . $class . 'data-placeholder="' . esc_html($placeholder) . '"/>'; |
|
| 913 | 913 | |
| 914 | - foreach ( $states as $option => $name ) { |
|
| 915 | - $selected = isset( $wpinv_options[ $args['id'] ] ) ? selected( $option, $wpinv_options[$args['id']], false ) : ''; |
|
| 916 | - $html .= '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( $name ) . '</option>'; |
|
| 914 | + foreach ($states as $option => $name) { |
|
| 915 | + $selected = isset($wpinv_options[$args['id']]) ? selected($option, $wpinv_options[$args['id']], false) : ''; |
|
| 916 | + $html .= '<option value="' . esc_attr($option) . '" ' . $selected . '>' . esc_html($name) . '</option>'; |
|
| 917 | 917 | } |
| 918 | 918 | |
| 919 | 919 | $html .= '</select>'; |
| 920 | - $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post( $args['desc'] ) . '</label>'; |
|
| 920 | + $html .= '<label for="wpinv_settings[' . $sanitize_id . ']"> ' . wp_kses_post($args['desc']) . '</label>'; |
|
| 921 | 921 | |
| 922 | 922 | echo $html; |
| 923 | 923 | } |
@@ -932,7 +932,7 @@ discard block |
||
| 932 | 932 | </tr> |
| 933 | 933 | <tr class="bsui"> |
| 934 | 934 | <td colspan="2" class="p-0"> |
| 935 | - <?php include plugin_dir_path( __FILE__ ) . 'views/html-tax-rates-edit.php'; ?> |
|
| 935 | + <?php include plugin_dir_path(__FILE__) . 'views/html-tax-rates-edit.php'; ?> |
|
| 936 | 936 | |
| 937 | 937 | <?php |
| 938 | 938 | |
@@ -941,14 +941,14 @@ discard block |
||
| 941 | 941 | /** |
| 942 | 942 | * Displays a tax rate' edit row. |
| 943 | 943 | */ |
| 944 | -function wpinv_tax_rate_callback( $tax_rate, $key, $echo = true ) { |
|
| 944 | +function wpinv_tax_rate_callback($tax_rate, $key, $echo = true) { |
|
| 945 | 945 | ob_start(); |
| 946 | 946 | |
| 947 | - $key = sanitize_key( $key ); |
|
| 948 | - $tax_rate['reduced_rate'] = empty( $tax_rate['reduced_rate'] ) ? 0 : $tax_rate['reduced_rate']; |
|
| 949 | - include plugin_dir_path( __FILE__ ) . 'views/html-tax-rate-edit.php'; |
|
| 947 | + $key = sanitize_key($key); |
|
| 948 | + $tax_rate['reduced_rate'] = empty($tax_rate['reduced_rate']) ? 0 : $tax_rate['reduced_rate']; |
|
| 949 | + include plugin_dir_path(__FILE__) . 'views/html-tax-rate-edit.php'; |
|
| 950 | 950 | |
| 951 | - if ( $echo ) { |
|
| 951 | + if ($echo) { |
|
| 952 | 952 | echo ob_get_clean(); |
| 953 | 953 | } else { |
| 954 | 954 | return ob_get_clean(); |
@@ -961,134 +961,134 @@ discard block |
||
| 961 | 961 | ob_start(); ?> |
| 962 | 962 | </td><tr> |
| 963 | 963 | <td colspan="2" class="wpinv_tools_tdbox"> |
| 964 | - <?php if ( $args['desc'] ) { ?><p><?php echo $args['desc']; ?></p><?php } ?> |
|
| 965 | - <?php do_action( 'wpinv_tools_before' ); ?> |
|
| 964 | + <?php if ($args['desc']) { ?><p><?php echo $args['desc']; ?></p><?php } ?> |
|
| 965 | + <?php do_action('wpinv_tools_before'); ?> |
|
| 966 | 966 | <table id="wpinv_tools_table" class="wp-list-table widefat fixed posts"> |
| 967 | 967 | <thead> |
| 968 | 968 | <tr> |
| 969 | - <th scope="col" class="wpinv-th-tool"><?php _e( 'Tool', 'invoicing' ); ?></th> |
|
| 970 | - <th scope="col" class="wpinv-th-desc"><?php _e( 'Description', 'invoicing' ); ?></th> |
|
| 971 | - <th scope="col" class="wpinv-th-action"><?php _e( 'Action', 'invoicing' ); ?></th> |
|
| 969 | + <th scope="col" class="wpinv-th-tool"><?php _e('Tool', 'invoicing'); ?></th> |
|
| 970 | + <th scope="col" class="wpinv-th-desc"><?php _e('Description', 'invoicing'); ?></th> |
|
| 971 | + <th scope="col" class="wpinv-th-action"><?php _e('Action', 'invoicing'); ?></th> |
|
| 972 | 972 | </tr> |
| 973 | 973 | </thead> |
| 974 | 974 | |
| 975 | 975 | <tbody> |
| 976 | 976 | <tr> |
| 977 | - <td><?php _e( 'Check Pages', 'invoicing' );?></td> |
|
| 977 | + <td><?php _e('Check Pages', 'invoicing'); ?></td> |
|
| 978 | 978 | <td> |
| 979 | - <small><?php _e( 'Creates any missing GetPaid pages.', 'invoicing' ); ?></small> |
|
| 979 | + <small><?php _e('Creates any missing GetPaid pages.', 'invoicing'); ?></small> |
|
| 980 | 980 | </td> |
| 981 | 981 | <td> |
| 982 | 982 | <a href="<?php |
| 983 | 983 | echo esc_url( |
| 984 | 984 | wp_nonce_url( |
| 985 | - add_query_arg( 'getpaid-admin-action', 'create_missing_pages' ), |
|
| 985 | + add_query_arg('getpaid-admin-action', 'create_missing_pages'), |
|
| 986 | 986 | 'getpaid-nonce', |
| 987 | 987 | 'getpaid-nonce' |
| 988 | 988 | ) |
| 989 | 989 | ); |
| 990 | - ?>" class="button button-primary"><?php _e('Run', 'invoicing');?></a> |
|
| 990 | + ?>" class="button button-primary"><?php _e('Run', 'invoicing'); ?></a> |
|
| 991 | 991 | </td> |
| 992 | 992 | </tr> |
| 993 | 993 | <tr> |
| 994 | - <td><?php _e( 'Create Database Tables', 'invoicing' );?></td> |
|
| 994 | + <td><?php _e('Create Database Tables', 'invoicing'); ?></td> |
|
| 995 | 995 | <td> |
| 996 | - <small><?php _e( 'Run this tool to create any missing database tables.', 'invoicing' ); ?></small> |
|
| 996 | + <small><?php _e('Run this tool to create any missing database tables.', 'invoicing'); ?></small> |
|
| 997 | 997 | </td> |
| 998 | 998 | <td> |
| 999 | 999 | <a href="<?php |
| 1000 | 1000 | echo esc_url( |
| 1001 | 1001 | wp_nonce_url( |
| 1002 | - add_query_arg( 'getpaid-admin-action', 'create_missing_tables' ), |
|
| 1002 | + add_query_arg('getpaid-admin-action', 'create_missing_tables'), |
|
| 1003 | 1003 | 'getpaid-nonce', |
| 1004 | 1004 | 'getpaid-nonce' |
| 1005 | 1005 | ) |
| 1006 | 1006 | ); |
| 1007 | - ?>" class="button button-primary"><?php _e('Run', 'invoicing');?></a> |
|
| 1007 | + ?>" class="button button-primary"><?php _e('Run', 'invoicing'); ?></a> |
|
| 1008 | 1008 | </td> |
| 1009 | 1009 | </tr> |
| 1010 | 1010 | <tr> |
| 1011 | - <td><?php _e( 'Migrate old invoices', 'invoicing' );?></td> |
|
| 1011 | + <td><?php _e('Migrate old invoices', 'invoicing'); ?></td> |
|
| 1012 | 1012 | <td> |
| 1013 | - <small><?php _e( 'If your old invoices were not migrated after updating from Invoicing to GetPaid, you can use this tool to migrate them.', 'invoicing' ); ?></small> |
|
| 1013 | + <small><?php _e('If your old invoices were not migrated after updating from Invoicing to GetPaid, you can use this tool to migrate them.', 'invoicing'); ?></small> |
|
| 1014 | 1014 | </td> |
| 1015 | 1015 | <td> |
| 1016 | 1016 | <a href="<?php |
| 1017 | 1017 | echo esc_url( |
| 1018 | 1018 | wp_nonce_url( |
| 1019 | - add_query_arg( 'getpaid-admin-action', 'migrate_old_invoices' ), |
|
| 1019 | + add_query_arg('getpaid-admin-action', 'migrate_old_invoices'), |
|
| 1020 | 1020 | 'getpaid-nonce', |
| 1021 | 1021 | 'getpaid-nonce' |
| 1022 | 1022 | ) |
| 1023 | 1023 | ); |
| 1024 | - ?>" class="button button-primary"><?php _e('Run', 'invoicing');?></a> |
|
| 1024 | + ?>" class="button button-primary"><?php _e('Run', 'invoicing'); ?></a> |
|
| 1025 | 1025 | </td> |
| 1026 | 1026 | </tr> |
| 1027 | 1027 | |
| 1028 | 1028 | <tr> |
| 1029 | - <td><?php _e( 'Recalculate Discounts', 'invoicing' );?></td> |
|
| 1029 | + <td><?php _e('Recalculate Discounts', 'invoicing'); ?></td> |
|
| 1030 | 1030 | <td> |
| 1031 | - <small><?php _e( 'Recalculate discounts for existing invoices that have discount codes but are not discounted.', 'invoicing' ); ?></small> |
|
| 1031 | + <small><?php _e('Recalculate discounts for existing invoices that have discount codes but are not discounted.', 'invoicing'); ?></small> |
|
| 1032 | 1032 | </td> |
| 1033 | 1033 | <td> |
| 1034 | 1034 | <a href="<?php |
| 1035 | 1035 | echo esc_url( |
| 1036 | 1036 | wp_nonce_url( |
| 1037 | - add_query_arg( 'getpaid-admin-action', 'recalculate_discounts' ), |
|
| 1037 | + add_query_arg('getpaid-admin-action', 'recalculate_discounts'), |
|
| 1038 | 1038 | 'getpaid-nonce', |
| 1039 | 1039 | 'getpaid-nonce' |
| 1040 | 1040 | ) |
| 1041 | 1041 | ); |
| 1042 | - ?>" class="button button-primary"><?php _e( 'Run', 'invoicing' );?></a> |
|
| 1042 | + ?>" class="button button-primary"><?php _e('Run', 'invoicing'); ?></a> |
|
| 1043 | 1043 | </td> |
| 1044 | 1044 | </tr> |
| 1045 | 1045 | |
| 1046 | - <?php do_action( 'wpinv_tools_row' ); ?> |
|
| 1046 | + <?php do_action('wpinv_tools_row'); ?> |
|
| 1047 | 1047 | </tbody> |
| 1048 | 1048 | </table> |
| 1049 | - <?php do_action( 'wpinv_tools_after' ); ?> |
|
| 1049 | + <?php do_action('wpinv_tools_after'); ?> |
|
| 1050 | 1050 | <?php |
| 1051 | 1051 | echo ob_get_clean(); |
| 1052 | 1052 | } |
| 1053 | 1053 | |
| 1054 | 1054 | |
| 1055 | -function wpinv_descriptive_text_callback( $args ) { |
|
| 1056 | - echo wp_kses_post( $args['desc'] ); |
|
| 1055 | +function wpinv_descriptive_text_callback($args) { |
|
| 1056 | + echo wp_kses_post($args['desc']); |
|
| 1057 | 1057 | } |
| 1058 | 1058 | |
| 1059 | -function wpinv_raw_html_callback( $args ) { |
|
| 1059 | +function wpinv_raw_html_callback($args) { |
|
| 1060 | 1060 | echo $args['desc']; |
| 1061 | 1061 | } |
| 1062 | 1062 | |
| 1063 | -function wpinv_hook_callback( $args ) { |
|
| 1064 | - do_action( 'wpinv_' . $args['id'], $args ); |
|
| 1063 | +function wpinv_hook_callback($args) { |
|
| 1064 | + do_action('wpinv_' . $args['id'], $args); |
|
| 1065 | 1065 | } |
| 1066 | 1066 | |
| 1067 | 1067 | function wpinv_set_settings_cap() { |
| 1068 | 1068 | return wpinv_get_capability(); |
| 1069 | 1069 | } |
| 1070 | -add_filter( 'option_page_capability_wpinv_settings', 'wpinv_set_settings_cap' ); |
|
| 1070 | +add_filter('option_page_capability_wpinv_settings', 'wpinv_set_settings_cap'); |
|
| 1071 | 1071 | |
| 1072 | -function wpinv_settings_sanitize_input( $value, $key ) { |
|
| 1072 | +function wpinv_settings_sanitize_input($value, $key) { |
|
| 1073 | 1073 | |
| 1074 | - if ( $key == 'tax_rate' ) { |
|
| 1075 | - $value = wpinv_sanitize_amount( $value ); |
|
| 1076 | - $value = absint( min( $value, 99 ) ); |
|
| 1074 | + if ($key == 'tax_rate') { |
|
| 1075 | + $value = wpinv_sanitize_amount($value); |
|
| 1076 | + $value = absint(min($value, 99)); |
|
| 1077 | 1077 | } |
| 1078 | 1078 | |
| 1079 | 1079 | return $value; |
| 1080 | 1080 | } |
| 1081 | -add_filter( 'wpinv_settings_sanitize', 'wpinv_settings_sanitize_input', 10, 2 ); |
|
| 1081 | +add_filter('wpinv_settings_sanitize', 'wpinv_settings_sanitize_input', 10, 2); |
|
| 1082 | 1082 | |
| 1083 | -function wpinv_on_update_settings( $old_value, $value, $option ) { |
|
| 1084 | - $old = !empty( $old_value['remove_data_on_unistall'] ) ? 1 : ''; |
|
| 1085 | - $new = !empty( $value['remove_data_on_unistall'] ) ? 1 : ''; |
|
| 1083 | +function wpinv_on_update_settings($old_value, $value, $option) { |
|
| 1084 | + $old = !empty($old_value['remove_data_on_unistall']) ? 1 : ''; |
|
| 1085 | + $new = !empty($value['remove_data_on_unistall']) ? 1 : ''; |
|
| 1086 | 1086 | |
| 1087 | - if ( $old != $new ) { |
|
| 1088 | - update_option( 'wpinv_remove_data_on_invoice_unistall', $new ); |
|
| 1087 | + if ($old != $new) { |
|
| 1088 | + update_option('wpinv_remove_data_on_invoice_unistall', $new); |
|
| 1089 | 1089 | } |
| 1090 | 1090 | } |
| 1091 | -add_action( 'update_option_wpinv_settings', 'wpinv_on_update_settings', 10, 3 ); |
|
| 1091 | +add_action('update_option_wpinv_settings', 'wpinv_on_update_settings', 10, 3); |
|
| 1092 | 1092 | |
| 1093 | 1093 | /** |
| 1094 | 1094 | * Returns the merge tags help text. |
@@ -1097,16 +1097,16 @@ discard block |
||
| 1097 | 1097 | * |
| 1098 | 1098 | * @return string |
| 1099 | 1099 | */ |
| 1100 | -function wpinv_get_merge_tags_help_text( $subscription = false ) { |
|
| 1100 | +function wpinv_get_merge_tags_help_text($subscription = false) { |
|
| 1101 | 1101 | |
| 1102 | 1102 | $url = $subscription ? 'https://gist.github.com/picocodes/3d213982d57c34edf7a46fd3f0e8583e' : 'https://gist.github.com/picocodes/43bdc4d4bbba844534b2722e2af0b58f'; |
| 1103 | 1103 | $link = sprintf( |
| 1104 | 1104 | '<strong><a href="%s" target="_blank">%s</a></strong>', |
| 1105 | 1105 | $url, |
| 1106 | - esc_html__( 'View available merge tags.', 'wpinv-quotes' ) |
|
| 1106 | + esc_html__('View available merge tags.', 'wpinv-quotes') |
|
| 1107 | 1107 | ); |
| 1108 | 1108 | |
| 1109 | - $description = esc_html__( 'The content of the email (Merge Tags and HTML are allowed).', 'invoicing' ); |
|
| 1109 | + $description = esc_html__('The content of the email (Merge Tags and HTML are allowed).', 'invoicing'); |
|
| 1110 | 1110 | |
| 1111 | 1111 | return "$description $link"; |
| 1112 | 1112 | |
@@ -8,24 +8,24 @@ discard block |
||
| 8 | 8 | * @version 1.0.19 |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -defined( 'ABSPATH' ) || exit; |
|
| 11 | +defined('ABSPATH') || exit; |
|
| 12 | 12 | |
| 13 | 13 | // Prepare the due date reminder options. |
| 14 | 14 | $overdue_days_options = array(); |
| 15 | -$overdue_days_options['0'] = __( 'On the Due Date', 'invoicing' ); |
|
| 16 | -$overdue_days_options['1'] = __( '1 day after Due Date', 'invoicing' ); |
|
| 15 | +$overdue_days_options['0'] = __('On the Due Date', 'invoicing'); |
|
| 16 | +$overdue_days_options['1'] = __('1 day after Due Date', 'invoicing'); |
|
| 17 | 17 | |
| 18 | -for ( $i = 2; $i <= 10; $i++ ) { |
|
| 19 | - $overdue_days_options["$i"] = wp_sprintf( __( '%d days after Due Date', 'invoicing' ), $i ); |
|
| 18 | +for ($i = 2; $i <= 10; $i++) { |
|
| 19 | + $overdue_days_options["$i"] = wp_sprintf(__('%d days after Due Date', 'invoicing'), $i); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | // Prepare up coming renewal reminder options. |
| 23 | 23 | $renewal_days_options = array(); |
| 24 | -$renewal_days_options['0'] = __( 'On the renewal date', 'invoicing' ); |
|
| 25 | -$renewal_days_options['1'] = __( '1 day before the renewal date', 'invoicing' ); |
|
| 24 | +$renewal_days_options['0'] = __('On the renewal date', 'invoicing'); |
|
| 25 | +$renewal_days_options['1'] = __('1 day before the renewal date', 'invoicing'); |
|
| 26 | 26 | |
| 27 | -for ( $i = 2; $i <= 10; $i++ ) { |
|
| 28 | - $renewal_days_options["$i"] = wp_sprintf( __( '%d days before the renewal date', 'invoicing' ), $i ); |
|
| 27 | +for ($i = 2; $i <= 10; $i++) { |
|
| 28 | + $renewal_days_options["$i"] = wp_sprintf(__('%d days before the renewal date', 'invoicing'), $i); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | // Default, built-in gateways |
@@ -34,45 +34,45 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | 'email_new_invoice_header' => array( |
| 36 | 36 | 'id' => 'email_new_invoice_header', |
| 37 | - 'name' => '<h3>' . __( 'New Invoice', 'invoicing' ) . '</h3>', |
|
| 38 | - 'desc' => __( 'These emails are sent to the site admin whenever there is a new invoice.', 'invoicing' ), |
|
| 37 | + 'name' => '<h3>' . __('New Invoice', 'invoicing') . '</h3>', |
|
| 38 | + 'desc' => __('These emails are sent to the site admin whenever there is a new invoice.', 'invoicing'), |
|
| 39 | 39 | 'type' => 'header', |
| 40 | 40 | ), |
| 41 | 41 | |
| 42 | 42 | 'email_new_invoice_active' => array( |
| 43 | 43 | 'id' => 'email_new_invoice_active', |
| 44 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 45 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 44 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 45 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 46 | 46 | 'type' => 'checkbox', |
| 47 | 47 | 'std' => 1 |
| 48 | 48 | ), |
| 49 | 49 | |
| 50 | 50 | 'email_new_invoice_subject' => array( |
| 51 | 51 | 'id' => 'email_new_invoice_subject', |
| 52 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 53 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 52 | + 'name' => __('Subject', 'invoicing'), |
|
| 53 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 54 | 54 | 'help-tip' => true, |
| 55 | 55 | 'type' => 'text', |
| 56 | - 'std' => __( '[{site_title}] We sent your invoice ({invoice_number}) for {invoice_total} {invoice_currency}', 'invoicing' ), |
|
| 56 | + 'std' => __('[{site_title}] We sent your invoice ({invoice_number}) for {invoice_total} {invoice_currency}', 'invoicing'), |
|
| 57 | 57 | 'size' => 'large' |
| 58 | 58 | ), |
| 59 | 59 | |
| 60 | 60 | 'email_new_invoice_heading' => array( |
| 61 | 61 | 'id' => 'email_new_invoice_heading', |
| 62 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 63 | - 'desc' => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ), |
|
| 62 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 63 | + 'desc' => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'), |
|
| 64 | 64 | 'help-tip' => true, |
| 65 | 65 | 'type' => 'text', |
| 66 | - 'std' => __( 'Invoice sent', 'invoicing' ), |
|
| 66 | + 'std' => __('Invoice sent', 'invoicing'), |
|
| 67 | 67 | 'size' => 'large' |
| 68 | 68 | ), |
| 69 | 69 | |
| 70 | 70 | 'email_new_invoice_body' => array( |
| 71 | 71 | 'id' => 'email_new_invoice_body', |
| 72 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 72 | + 'name' => __('Email Content', 'invoicing'), |
|
| 73 | 73 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 74 | 74 | 'type' => 'rich_editor', |
| 75 | - 'std' => __( '<p>We sent your invoice <a href="{invoice_link}">({invoice_number})</a> to {name} for {invoice_total} {invoice_currency}.</p>', 'invoicing' ), |
|
| 75 | + 'std' => __('<p>We sent your invoice <a href="{invoice_link}">({invoice_number})</a> to {name} for {invoice_total} {invoice_currency}.</p>', 'invoicing'), |
|
| 76 | 76 | 'class' => 'large', |
| 77 | 77 | 'size' => '10' |
| 78 | 78 | ), |
@@ -82,45 +82,45 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | 'email_cancelled_invoice_header' => array( |
| 84 | 84 | 'id' => 'email_cancelled_invoice_header', |
| 85 | - 'name' => '<h3>' . __( 'Cancelled Invoice', 'invoicing' ) . '</h3>', |
|
| 86 | - 'desc' => __( 'These emails are sent to the site admin whenever invoices are cancelled.', 'invoicing' ), |
|
| 85 | + 'name' => '<h3>' . __('Cancelled Invoice', 'invoicing') . '</h3>', |
|
| 86 | + 'desc' => __('These emails are sent to the site admin whenever invoices are cancelled.', 'invoicing'), |
|
| 87 | 87 | 'type' => 'header', |
| 88 | 88 | ), |
| 89 | 89 | |
| 90 | 90 | 'email_cancelled_invoice_active' => array( |
| 91 | 91 | 'id' => 'email_cancelled_invoice_active', |
| 92 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 93 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 92 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 93 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 94 | 94 | 'type' => 'checkbox', |
| 95 | 95 | 'std' => 1 |
| 96 | 96 | ), |
| 97 | 97 | |
| 98 | 98 | 'email_cancelled_invoice_subject' => array( |
| 99 | 99 | 'id' => 'email_cancelled_invoice_subject', |
| 100 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 101 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 100 | + 'name' => __('Subject', 'invoicing'), |
|
| 101 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 102 | 102 | 'help-tip' => true, |
| 103 | 103 | 'type' => 'text', |
| 104 | - 'std' => __( '[{site_title}] Cancelled invoice ({invoice_number})', 'invoicing' ), |
|
| 104 | + 'std' => __('[{site_title}] Cancelled invoice ({invoice_number})', 'invoicing'), |
|
| 105 | 105 | 'size' => 'large' |
| 106 | 106 | ), |
| 107 | 107 | |
| 108 | 108 | 'email_cancelled_invoice_heading' => array( |
| 109 | 109 | 'id' => 'email_cancelled_invoice_heading', |
| 110 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 111 | - 'desc' => __( 'Enter the main heading contained within the email notification.', 'invoicing' ), |
|
| 110 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 111 | + 'desc' => __('Enter the main heading contained within the email notification.', 'invoicing'), |
|
| 112 | 112 | 'help-tip' => true, |
| 113 | 113 | 'type' => 'text', |
| 114 | - 'std' => __( 'Cancelled Invoice', 'invoicing' ), |
|
| 114 | + 'std' => __('Cancelled Invoice', 'invoicing'), |
|
| 115 | 115 | 'size' => 'large' |
| 116 | 116 | ), |
| 117 | 117 | |
| 118 | 118 | 'email_cancelled_invoice_body' => array( |
| 119 | 119 | 'id' => 'email_cancelled_invoice_body', |
| 120 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 120 | + 'name' => __('Email Content', 'invoicing'), |
|
| 121 | 121 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 122 | 122 | 'type' => 'rich_editor', |
| 123 | - 'std' => __( '<p>The invoice <a href="{invoice_link}">#{invoice_number}</a> created for {name} on {site_title} has been cancelled.</p>', 'invoicing' ), |
|
| 123 | + 'std' => __('<p>The invoice <a href="{invoice_link}">#{invoice_number}</a> created for {name} on {site_title} has been cancelled.</p>', 'invoicing'), |
|
| 124 | 124 | 'class' => 'large', |
| 125 | 125 | 'size' => '10' |
| 126 | 126 | ), |
@@ -131,45 +131,45 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | 'email_failed_invoice_header' => array( |
| 133 | 133 | 'id' => 'email_failed_invoice_header', |
| 134 | - 'name' => '<h3>' . __( 'Failed Invoice', 'invoicing' ) . '</h3>', |
|
| 135 | - 'desc' => __( 'Failed invoice emails are sent to the site admin when invoice payments fail.', 'invoicing' ), |
|
| 134 | + 'name' => '<h3>' . __('Failed Invoice', 'invoicing') . '</h3>', |
|
| 135 | + 'desc' => __('Failed invoice emails are sent to the site admin when invoice payments fail.', 'invoicing'), |
|
| 136 | 136 | 'type' => 'header', |
| 137 | 137 | ), |
| 138 | 138 | |
| 139 | 139 | 'email_failed_invoice_active' => array( |
| 140 | 140 | 'id' => 'email_failed_invoice_active', |
| 141 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 142 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 141 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 142 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 143 | 143 | 'type' => 'checkbox', |
| 144 | 144 | 'std' => 1 |
| 145 | 145 | ), |
| 146 | 146 | |
| 147 | 147 | 'email_failed_invoice_subject' => array( |
| 148 | 148 | 'id' => 'email_failed_invoice_subject', |
| 149 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 150 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 149 | + 'name' => __('Subject', 'invoicing'), |
|
| 150 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 151 | 151 | 'help-tip' => true, |
| 152 | 152 | 'type' => 'text', |
| 153 | - 'std' => __( '[{site_title}] Failed invoice ({invoice_number})', 'invoicing' ), |
|
| 153 | + 'std' => __('[{site_title}] Failed invoice ({invoice_number})', 'invoicing'), |
|
| 154 | 154 | 'size' => 'large' |
| 155 | 155 | ), |
| 156 | 156 | |
| 157 | 157 | 'email_failed_invoice_heading' => array( |
| 158 | 158 | 'id' => 'email_failed_invoice_heading', |
| 159 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 160 | - 'desc' => __( 'Enter the main heading contained within the email notification.', 'invoicing' ), |
|
| 159 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 160 | + 'desc' => __('Enter the main heading contained within the email notification.', 'invoicing'), |
|
| 161 | 161 | 'help-tip' => true, |
| 162 | 162 | 'type' => 'text', |
| 163 | - 'std' => __( 'Failed invoice', 'invoicing' ), |
|
| 163 | + 'std' => __('Failed invoice', 'invoicing'), |
|
| 164 | 164 | 'size' => 'large' |
| 165 | 165 | ), |
| 166 | 166 | |
| 167 | 167 | 'email_failed_invoice_body' => array( |
| 168 | 168 | 'id' => 'email_failed_invoice_body', |
| 169 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 169 | + 'name' => __('Email Content', 'invoicing'), |
|
| 170 | 170 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 171 | 171 | 'type' => 'rich_editor', |
| 172 | - 'std' => __( '<p>Payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title} has failed to go through.</p>', 'invoicing' ), |
|
| 172 | + 'std' => __('<p>Payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title} has failed to go through.</p>', 'invoicing'), |
|
| 173 | 173 | 'class' => 'large', |
| 174 | 174 | 'size' => '10' |
| 175 | 175 | ), |
@@ -179,53 +179,53 @@ discard block |
||
| 179 | 179 | |
| 180 | 180 | 'email_onhold_invoice_header' => array( |
| 181 | 181 | 'id' => 'email_onhold_invoice_header', |
| 182 | - 'name' => '<h3>' . __( 'On Hold Invoice', 'invoicing' ) . '</h3>', |
|
| 183 | - 'desc' => __( 'These emails are sent to customers whenever their invoices are held.', 'invoicing' ), |
|
| 182 | + 'name' => '<h3>' . __('On Hold Invoice', 'invoicing') . '</h3>', |
|
| 183 | + 'desc' => __('These emails are sent to customers whenever their invoices are held.', 'invoicing'), |
|
| 184 | 184 | 'type' => 'header', |
| 185 | 185 | ), |
| 186 | 186 | |
| 187 | 187 | 'email_onhold_invoice_active' => array( |
| 188 | 188 | 'id' => 'email_onhold_invoice_active', |
| 189 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 190 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 189 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 190 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 191 | 191 | 'type' => 'checkbox', |
| 192 | 192 | 'std' => 1 |
| 193 | 193 | ), |
| 194 | 194 | |
| 195 | 195 | 'email_onhold_invoice_admin_bcc' => array( |
| 196 | 196 | 'id' => 'email_onhold_invoice_admin_bcc', |
| 197 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 198 | - 'desc' => __( 'Check if you want to send this notification email to site Admin.', 'invoicing' ), |
|
| 197 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 198 | + 'desc' => __('Check if you want to send this notification email to site Admin.', 'invoicing'), |
|
| 199 | 199 | 'type' => 'checkbox', |
| 200 | 200 | 'std' => 1 |
| 201 | 201 | ), |
| 202 | 202 | |
| 203 | 203 | 'email_onhold_invoice_subject' => array( |
| 204 | 204 | 'id' => 'email_onhold_invoice_subject', |
| 205 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 206 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 205 | + 'name' => __('Subject', 'invoicing'), |
|
| 206 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 207 | 207 | 'help-tip' => true, |
| 208 | 208 | 'type' => 'text', |
| 209 | - 'std' => __( '[{site_title}] Your invoice receipt from {invoice_date}', 'invoicing' ), |
|
| 209 | + 'std' => __('[{site_title}] Your invoice receipt from {invoice_date}', 'invoicing'), |
|
| 210 | 210 | 'size' => 'large' |
| 211 | 211 | ), |
| 212 | 212 | |
| 213 | 213 | 'email_onhold_invoice_heading' => array( |
| 214 | 214 | 'id' => 'email_onhold_invoice_heading', |
| 215 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 216 | - 'desc' => __( 'Enter the main heading contained within the email notification.', 'invoicing' ), |
|
| 215 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 216 | + 'desc' => __('Enter the main heading contained within the email notification.', 'invoicing'), |
|
| 217 | 217 | 'help-tip' => true, |
| 218 | 218 | 'type' => 'text', |
| 219 | - 'std' => __( 'Thank you for your invoice', 'invoicing' ), |
|
| 219 | + 'std' => __('Thank you for your invoice', 'invoicing'), |
|
| 220 | 220 | 'size' => 'large' |
| 221 | 221 | ), |
| 222 | 222 | |
| 223 | 223 | 'email_onhold_invoice_body' => array( |
| 224 | 224 | 'id' => 'email_onhold_invoice_body', |
| 225 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 225 | + 'name' => __('Email Content', 'invoicing'), |
|
| 226 | 226 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 227 | 227 | 'type' => 'rich_editor', |
| 228 | - 'std' => __( '<p>Hi {name},</p><p>Your invoice is on-hold and will be processed when we receive your payment.</p>', 'invoicing' ), |
|
| 228 | + 'std' => __('<p>Hi {name},</p><p>Your invoice is on-hold and will be processed when we receive your payment.</p>', 'invoicing'), |
|
| 229 | 229 | 'class' => 'large', |
| 230 | 230 | 'size' => '10' |
| 231 | 231 | ), |
@@ -236,53 +236,53 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | 'email_processing_invoice_header' => array( |
| 238 | 238 | 'id' => 'email_processing_invoice_header', |
| 239 | - 'name' => '<h3>' . __( 'Processing Invoice', 'invoicing' ) . '</h3>', |
|
| 240 | - 'desc' => __( 'These emails are sent to users whenever payments for their invoices are processing.', 'invoicing' ), |
|
| 239 | + 'name' => '<h3>' . __('Processing Invoice', 'invoicing') . '</h3>', |
|
| 240 | + 'desc' => __('These emails are sent to users whenever payments for their invoices are processing.', 'invoicing'), |
|
| 241 | 241 | 'type' => 'header', |
| 242 | 242 | ), |
| 243 | 243 | |
| 244 | 244 | 'email_processing_invoice_active' => array( |
| 245 | 245 | 'id' => 'email_processing_invoice_active', |
| 246 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 247 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 246 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 247 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 248 | 248 | 'type' => 'checkbox', |
| 249 | 249 | 'std' => 1 |
| 250 | 250 | ), |
| 251 | 251 | |
| 252 | 252 | 'email_processing_invoice_admin_bcc' => array( |
| 253 | 253 | 'id' => 'email_processing_invoice_admin_bcc', |
| 254 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 255 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 254 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 255 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 256 | 256 | 'type' => 'checkbox', |
| 257 | 257 | 'std' => 1 |
| 258 | 258 | ), |
| 259 | 259 | |
| 260 | 260 | 'email_processing_invoice_subject' => array( |
| 261 | 261 | 'id' => 'email_processing_invoice_subject', |
| 262 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 263 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 262 | + 'name' => __('Subject', 'invoicing'), |
|
| 263 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 264 | 264 | 'help-tip' => true, |
| 265 | 265 | 'type' => 'text', |
| 266 | - 'std' => __( '[{site_title}] Your invoice receipt from {invoice_date}', 'invoicing' ), |
|
| 266 | + 'std' => __('[{site_title}] Your invoice receipt from {invoice_date}', 'invoicing'), |
|
| 267 | 267 | 'size' => 'large' |
| 268 | 268 | ), |
| 269 | 269 | |
| 270 | 270 | 'email_processing_invoice_heading' => array( |
| 271 | 271 | 'id' => 'email_processing_invoice_heading', |
| 272 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 273 | - 'desc' => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ), |
|
| 272 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 273 | + 'desc' => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'), |
|
| 274 | 274 | 'help-tip' => true, |
| 275 | 275 | 'type' => 'text', |
| 276 | - 'std' => __( 'Thank you for your invoice', 'invoicing' ), |
|
| 276 | + 'std' => __('Thank you for your invoice', 'invoicing'), |
|
| 277 | 277 | 'size' => 'large' |
| 278 | 278 | ), |
| 279 | 279 | |
| 280 | 280 | 'email_processing_invoice_body' => array( |
| 281 | 281 | 'id' => 'email_processing_invoice_body', |
| 282 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 282 | + 'name' => __('Email Content', 'invoicing'), |
|
| 283 | 283 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 284 | 284 | 'type' => 'rich_editor', |
| 285 | - 'std' => __( '<p>Hi {name},</p><p>I would like to let you know that we have received and are currently processing your payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title}.</p>', 'invoicing' ), |
|
| 285 | + 'std' => __('<p>Hi {name},</p><p>I would like to let you know that we have received and are currently processing your payment for the invoice <a href="{invoice_link}">#{invoice_number}</a> on {site_title}.</p>', 'invoicing'), |
|
| 286 | 286 | 'class' => 'large', |
| 287 | 287 | 'size' => '10' |
| 288 | 288 | ), |
@@ -293,61 +293,61 @@ discard block |
||
| 293 | 293 | |
| 294 | 294 | 'email_completed_invoice_header' => array( |
| 295 | 295 | 'id' => 'email_completed_invoice_header', |
| 296 | - 'name' => '<h3>' . __( 'Paid Invoice', 'invoicing' ) . '</h3>', |
|
| 297 | - 'desc' => __( 'These emails are sent to customers when their invoices are marked as paid.', 'invoicing' ), |
|
| 296 | + 'name' => '<h3>' . __('Paid Invoice', 'invoicing') . '</h3>', |
|
| 297 | + 'desc' => __('These emails are sent to customers when their invoices are marked as paid.', 'invoicing'), |
|
| 298 | 298 | 'type' => 'header', |
| 299 | 299 | ), |
| 300 | 300 | |
| 301 | 301 | 'email_completed_invoice_active' => array( |
| 302 | 302 | 'id' => 'email_completed_invoice_active', |
| 303 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 304 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 303 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 304 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 305 | 305 | 'type' => 'checkbox', |
| 306 | 306 | 'std' => 1 |
| 307 | 307 | ), |
| 308 | 308 | |
| 309 | 309 | 'email_completed_invoice_renewal_active' => array( |
| 310 | 310 | 'id' => 'email_completed_invoice_renewal_active', |
| 311 | - 'name' => __( 'Enable renewal notification', 'invoicing' ), |
|
| 312 | - 'desc' => __( 'Should this email be sent for renewals too?', 'invoicing' ), |
|
| 311 | + 'name' => __('Enable renewal notification', 'invoicing'), |
|
| 312 | + 'desc' => __('Should this email be sent for renewals too?', 'invoicing'), |
|
| 313 | 313 | 'type' => 'checkbox', |
| 314 | 314 | 'std' => 1 |
| 315 | 315 | ), |
| 316 | 316 | |
| 317 | 317 | 'email_completed_invoice_admin_bcc' => array( |
| 318 | 318 | 'id' => 'email_completed_invoice_admin_bcc', |
| 319 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 320 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 319 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 320 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 321 | 321 | 'type' => 'checkbox', |
| 322 | 322 | 'std' => 1, |
| 323 | 323 | ), |
| 324 | 324 | |
| 325 | 325 | 'email_completed_invoice_subject' => array( |
| 326 | 326 | 'id' => 'email_completed_invoice_subject', |
| 327 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 328 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 327 | + 'name' => __('Subject', 'invoicing'), |
|
| 328 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 329 | 329 | 'help-tip' => true, |
| 330 | 330 | 'type' => 'text', |
| 331 | - 'std' => __( '[{site_title}] Your invoice from {invoice_date} has been paid', 'invoicing' ), |
|
| 331 | + 'std' => __('[{site_title}] Your invoice from {invoice_date} has been paid', 'invoicing'), |
|
| 332 | 332 | 'size' => 'large' |
| 333 | 333 | ), |
| 334 | 334 | |
| 335 | 335 | 'email_completed_invoice_heading' => array( |
| 336 | 336 | 'id' => 'email_completed_invoice_heading', |
| 337 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 338 | - 'desc' => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ), |
|
| 337 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 338 | + 'desc' => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'), |
|
| 339 | 339 | 'help-tip' => true, |
| 340 | 340 | 'type' => 'text', |
| 341 | - 'std' => __( 'Your invoice has been paid', 'invoicing' ), |
|
| 341 | + 'std' => __('Your invoice has been paid', 'invoicing'), |
|
| 342 | 342 | 'size' => 'large' |
| 343 | 343 | ), |
| 344 | 344 | |
| 345 | 345 | 'email_completed_invoice_body' => array( |
| 346 | 346 | 'id' => 'email_completed_invoice_body', |
| 347 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 347 | + 'name' => __('Email Content', 'invoicing'), |
|
| 348 | 348 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 349 | 349 | 'type' => 'rich_editor', |
| 350 | - 'std' => __( '<p>Hi {name},</p><p>Your recent invoice on {site_title} has been paid.</p>', 'invoicing' ), |
|
| 350 | + 'std' => __('<p>Hi {name},</p><p>Your recent invoice on {site_title} has been paid.</p>', 'invoicing'), |
|
| 351 | 351 | 'class' => 'large', |
| 352 | 352 | 'size' => '10' |
| 353 | 353 | ), |
@@ -358,53 +358,53 @@ discard block |
||
| 358 | 358 | |
| 359 | 359 | 'email_refunded_invoice_header' => array( |
| 360 | 360 | 'id' => 'email_refunded_invoice_header', |
| 361 | - 'name' => '<h3>' . __( 'Refunded Invoice', 'invoicing' ) . '</h3>', |
|
| 362 | - 'desc' => __( 'These emails are sent to users when their invoices are marked as refunded.', 'invoicing' ), |
|
| 361 | + 'name' => '<h3>' . __('Refunded Invoice', 'invoicing') . '</h3>', |
|
| 362 | + 'desc' => __('These emails are sent to users when their invoices are marked as refunded.', 'invoicing'), |
|
| 363 | 363 | 'type' => 'header', |
| 364 | 364 | ), |
| 365 | 365 | |
| 366 | 366 | 'email_refunded_invoice_active' => array( |
| 367 | 367 | 'id' => 'email_refunded_invoice_active', |
| 368 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 369 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 368 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 369 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 370 | 370 | 'type' => 'checkbox', |
| 371 | 371 | 'std' => 1 |
| 372 | 372 | ), |
| 373 | 373 | |
| 374 | 374 | 'email_refunded_invoice_admin_bcc' => array( |
| 375 | 375 | 'id' => 'email_refunded_invoice_admin_bcc', |
| 376 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 377 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 376 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 377 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 378 | 378 | 'type' => 'checkbox', |
| 379 | 379 | 'std' => 1 |
| 380 | 380 | ), |
| 381 | 381 | |
| 382 | 382 | 'email_refunded_invoice_subject' => array( |
| 383 | 383 | 'id' => 'email_refunded_invoice_subject', |
| 384 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 385 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 384 | + 'name' => __('Subject', 'invoicing'), |
|
| 385 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 386 | 386 | 'help-tip' => true, |
| 387 | 387 | 'type' => 'text', |
| 388 | - 'std' => __( '[{site_title}] Your invoice from {invoice_date} has been refunded', 'invoicing' ), |
|
| 388 | + 'std' => __('[{site_title}] Your invoice from {invoice_date} has been refunded', 'invoicing'), |
|
| 389 | 389 | 'size' => 'large' |
| 390 | 390 | ), |
| 391 | 391 | |
| 392 | 392 | 'email_refunded_invoice_heading' => array( |
| 393 | 393 | 'id' => 'email_refunded_invoice_heading', |
| 394 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 395 | - 'desc' => __( 'Enter the main heading contained within the email notification.', 'invoicing' ), |
|
| 394 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 395 | + 'desc' => __('Enter the main heading contained within the email notification.', 'invoicing'), |
|
| 396 | 396 | 'help-tip' => true, |
| 397 | 397 | 'type' => 'text', |
| 398 | - 'std' => __( 'Your invoice has been refunded', 'invoicing' ), |
|
| 398 | + 'std' => __('Your invoice has been refunded', 'invoicing'), |
|
| 399 | 399 | 'size' => 'large' |
| 400 | 400 | ), |
| 401 | 401 | |
| 402 | 402 | 'email_refunded_invoice_body' => array( |
| 403 | 403 | 'id' => 'email_refunded_invoice_body', |
| 404 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 404 | + 'name' => __('Email Content', 'invoicing'), |
|
| 405 | 405 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 406 | 406 | 'type' => 'rich_editor', |
| 407 | - 'std' => __( '<p>Hi {name},</p><p>Your invoice on {site_title} has been refunded.</p>', 'invoicing' ), |
|
| 407 | + 'std' => __('<p>Hi {name},</p><p>Your invoice on {site_title} has been refunded.</p>', 'invoicing'), |
|
| 408 | 408 | 'class' => 'large', |
| 409 | 409 | 'size' => '10' |
| 410 | 410 | ), |
@@ -415,53 +415,53 @@ discard block |
||
| 415 | 415 | |
| 416 | 416 | 'email_user_invoice_header' => array( |
| 417 | 417 | 'id' => 'email_user_invoice_header', |
| 418 | - 'name' => '<h3>' . __( 'Customer Invoice', 'invoicing' ) . '</h3>', |
|
| 419 | - 'desc' => __( 'These emails are sent to customers containing their invoice information and payment links.', 'invoicing' ), |
|
| 418 | + 'name' => '<h3>' . __('Customer Invoice', 'invoicing') . '</h3>', |
|
| 419 | + 'desc' => __('These emails are sent to customers containing their invoice information and payment links.', 'invoicing'), |
|
| 420 | 420 | 'type' => 'header', |
| 421 | 421 | ), |
| 422 | 422 | |
| 423 | 423 | 'email_user_invoice_active' => array( |
| 424 | 424 | 'id' => 'email_user_invoice_active', |
| 425 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 426 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 425 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 426 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 427 | 427 | 'type' => 'checkbox', |
| 428 | 428 | 'std' => 1 |
| 429 | 429 | ), |
| 430 | 430 | |
| 431 | 431 | 'email_user_invoice_admin_bcc' => array( |
| 432 | 432 | 'id' => 'email_user_invoice_admin_bcc', |
| 433 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 434 | - 'desc' => __( 'Check if you want to send a copy of this notification email to to the site admin.', 'invoicing' ), |
|
| 433 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 434 | + 'desc' => __('Check if you want to send a copy of this notification email to to the site admin.', 'invoicing'), |
|
| 435 | 435 | 'type' => 'checkbox', |
| 436 | 436 | 'std' => 0 |
| 437 | 437 | ), |
| 438 | 438 | |
| 439 | 439 | 'email_user_invoice_subject' => array( |
| 440 | 440 | 'id' => 'email_user_invoice_subject', |
| 441 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 442 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 441 | + 'name' => __('Subject', 'invoicing'), |
|
| 442 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 443 | 443 | 'help-tip' => true, |
| 444 | 444 | 'type' => 'text', |
| 445 | - 'std' => __( '[{site_title}] Your invoice from {invoice_date}', 'invoicing' ), |
|
| 445 | + 'std' => __('[{site_title}] Your invoice from {invoice_date}', 'invoicing'), |
|
| 446 | 446 | 'size' => 'large' |
| 447 | 447 | ), |
| 448 | 448 | |
| 449 | 449 | 'email_user_invoice_heading' => array( |
| 450 | 450 | 'id' => 'email_user_invoice_heading', |
| 451 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 452 | - 'desc' => __( 'Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing' ), |
|
| 451 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 452 | + 'desc' => __('Enter the main heading contained within the email notification for the invoice receipt email.', 'invoicing'), |
|
| 453 | 453 | 'help-tip' => true, |
| 454 | 454 | 'type' => 'text', |
| 455 | - 'std' => __( 'Your invoice {invoice_number} details', 'invoicing' ), |
|
| 455 | + 'std' => __('Your invoice {invoice_number} details', 'invoicing'), |
|
| 456 | 456 | 'size' => 'large' |
| 457 | 457 | ), |
| 458 | 458 | |
| 459 | 459 | 'email_user_invoice_body' => array( |
| 460 | 460 | 'id' => 'email_user_invoice_body', |
| 461 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 461 | + 'name' => __('Email Content', 'invoicing'), |
|
| 462 | 462 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 463 | 463 | 'type' => 'rich_editor', |
| 464 | - 'std' => __( '<p>Hi {name},</p><p>An invoice of {invoice_total} has been created for you on {site_title}. You can <a href="{invoice_link}">view</a> or <a href="{invoice_pay_link}">pay</a> the invoice. Please reply to this email if you have any questions about the invoice.', 'invoicing' ), |
|
| 464 | + 'std' => __('<p>Hi {name},</p><p>An invoice of {invoice_total} has been created for you on {site_title}. You can <a href="{invoice_link}">view</a> or <a href="{invoice_pay_link}">pay</a> the invoice. Please reply to this email if you have any questions about the invoice.', 'invoicing'), |
|
| 465 | 465 | 'class' => 'large', |
| 466 | 466 | 'size' => '10' |
| 467 | 467 | ), |
@@ -471,53 +471,53 @@ discard block |
||
| 471 | 471 | |
| 472 | 472 | 'email_user_note_header' => array( |
| 473 | 473 | 'id' => 'email_user_note_header', |
| 474 | - 'name' => '<h3>' . __( 'Customer Note', 'invoicing' ) . '</h3>', |
|
| 475 | - 'desc' => __( 'These emails are sent when you add a customer note to an invoice/quote.', 'invoicing' ), |
|
| 474 | + 'name' => '<h3>' . __('Customer Note', 'invoicing') . '</h3>', |
|
| 475 | + 'desc' => __('These emails are sent when you add a customer note to an invoice/quote.', 'invoicing'), |
|
| 476 | 476 | 'type' => 'header', |
| 477 | 477 | ), |
| 478 | 478 | |
| 479 | 479 | 'email_user_note_active' => array( |
| 480 | 480 | 'id' => 'email_user_note_active', |
| 481 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 482 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 481 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 482 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 483 | 483 | 'type' => 'checkbox', |
| 484 | 484 | 'std' => 1 |
| 485 | 485 | ), |
| 486 | 486 | |
| 487 | 487 | 'email_user_note_admin_bcc' => array( |
| 488 | 488 | 'id' => 'email_user_note_admin_bcc', |
| 489 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 490 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 489 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 490 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 491 | 491 | 'type' => 'checkbox', |
| 492 | 492 | 'std' => 0 |
| 493 | 493 | ), |
| 494 | 494 | |
| 495 | 495 | 'email_user_note_subject' => array( |
| 496 | 496 | 'id' => 'email_user_note_subject', |
| 497 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 498 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 497 | + 'name' => __('Subject', 'invoicing'), |
|
| 498 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 499 | 499 | 'help-tip' => true, |
| 500 | 500 | 'type' => 'text', |
| 501 | - 'std' => __( '[{site_title}] Note added to your {invoice_label} #{invoice_number} from {invoice_date}', 'invoicing' ), |
|
| 501 | + 'std' => __('[{site_title}] Note added to your {invoice_label} #{invoice_number} from {invoice_date}', 'invoicing'), |
|
| 502 | 502 | 'size' => 'large' |
| 503 | 503 | ), |
| 504 | 504 | |
| 505 | 505 | 'email_user_note_heading' => array( |
| 506 | 506 | 'id' => 'email_user_note_heading', |
| 507 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 508 | - 'desc' => __( 'Enter the main heading contained within the email notification.', 'invoicing' ), |
|
| 507 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 508 | + 'desc' => __('Enter the main heading contained within the email notification.', 'invoicing'), |
|
| 509 | 509 | 'help-tip' => true, |
| 510 | 510 | 'type' => 'text', |
| 511 | - 'std' => __( 'A note has been added to your {invoice_label}', 'invoicing' ), |
|
| 511 | + 'std' => __('A note has been added to your {invoice_label}', 'invoicing'), |
|
| 512 | 512 | 'size' => 'large' |
| 513 | 513 | ), |
| 514 | 514 | |
| 515 | 515 | 'email_user_note_body' => array( |
| 516 | 516 | 'id' => 'email_user_note_body', |
| 517 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 517 | + 'name' => __('Email Content', 'invoicing'), |
|
| 518 | 518 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 519 | 519 | 'type' => 'rich_editor', |
| 520 | - 'std' => __( '<p>Hi {name},</p><p>Following note has been added to your {invoice_label}:</p><blockquote class="wpinv-note">{customer_note}</blockquote>', 'invoicing' ), |
|
| 520 | + 'std' => __('<p>Hi {name},</p><p>Following note has been added to your {invoice_label}:</p><blockquote class="wpinv-note">{customer_note}</blockquote>', 'invoicing'), |
|
| 521 | 521 | 'class' => 'large', |
| 522 | 522 | 'size' => '10' |
| 523 | 523 | ), |
@@ -528,63 +528,63 @@ discard block |
||
| 528 | 528 | |
| 529 | 529 | 'email_overdue_header' => array( |
| 530 | 530 | 'id' => 'email_overdue_header', |
| 531 | - 'name' => '<h3>' . __( 'Payment Reminder', 'invoicing' ) . '</h3>', |
|
| 532 | - 'desc' => __( 'Payment reminder emails are sent to customers whenever their invoices are due.', 'invoicing' ), |
|
| 531 | + 'name' => '<h3>' . __('Payment Reminder', 'invoicing') . '</h3>', |
|
| 532 | + 'desc' => __('Payment reminder emails are sent to customers whenever their invoices are due.', 'invoicing'), |
|
| 533 | 533 | 'type' => 'header', |
| 534 | 534 | ), |
| 535 | 535 | |
| 536 | 536 | 'email_overdue_active' => array( |
| 537 | 537 | 'id' => 'email_overdue_active', |
| 538 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 539 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 538 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 539 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 540 | 540 | 'type' => 'checkbox', |
| 541 | 541 | 'std' => 1 |
| 542 | 542 | ), |
| 543 | 543 | |
| 544 | 544 | 'email_overdue_admin_bcc' => array( |
| 545 | 545 | 'id' => 'email_overdue_admin_bcc', |
| 546 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 547 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 546 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 547 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 548 | 548 | 'type' => 'checkbox', |
| 549 | 549 | 'std' => 0 |
| 550 | 550 | ), |
| 551 | 551 | |
| 552 | 552 | 'email_overdue_days' => array( |
| 553 | 553 | 'id' => 'email_overdue_days', |
| 554 | - 'name' => __( 'When to Send', 'invoicing' ), |
|
| 555 | - 'desc' => __( 'Check when you would like payment reminders sent out.', 'invoicing' ), |
|
| 554 | + 'name' => __('When to Send', 'invoicing'), |
|
| 555 | + 'desc' => __('Check when you would like payment reminders sent out.', 'invoicing'), |
|
| 556 | 556 | 'help-tip' => true, |
| 557 | - 'std' => array( '1' ), |
|
| 557 | + 'std' => array('1'), |
|
| 558 | 558 | 'type' => 'multicheck', |
| 559 | 559 | 'options' => $overdue_days_options, |
| 560 | 560 | ), |
| 561 | 561 | |
| 562 | 562 | 'email_overdue_subject' => array( |
| 563 | 563 | 'id' => 'email_overdue_subject', |
| 564 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 565 | - 'desc' => __( 'Enter the subject line for the invoice receipt email.', 'invoicing' ), |
|
| 564 | + 'name' => __('Subject', 'invoicing'), |
|
| 565 | + 'desc' => __('Enter the subject line for the invoice receipt email.', 'invoicing'), |
|
| 566 | 566 | 'help-tip' => true, |
| 567 | 567 | 'type' => 'text', |
| 568 | - 'std' => __( '[{site_title}] Payment Reminder', 'invoicing' ), |
|
| 568 | + 'std' => __('[{site_title}] Payment Reminder', 'invoicing'), |
|
| 569 | 569 | 'size' => 'large' |
| 570 | 570 | ), |
| 571 | 571 | |
| 572 | 572 | 'email_overdue_heading' => array( |
| 573 | 573 | 'id' => 'email_overdue_heading', |
| 574 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 575 | - 'desc' => __( 'Enter the main heading contained within the email notification.', 'invoicing' ), |
|
| 574 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 575 | + 'desc' => __('Enter the main heading contained within the email notification.', 'invoicing'), |
|
| 576 | 576 | 'help-tip' => true, |
| 577 | 577 | 'type' => 'text', |
| 578 | - 'std' => __( 'Payment reminder for your invoice', 'invoicing' ), |
|
| 578 | + 'std' => __('Payment reminder for your invoice', 'invoicing'), |
|
| 579 | 579 | 'size' => 'large' |
| 580 | 580 | ), |
| 581 | 581 | |
| 582 | 582 | 'email_overdue_body' => array( |
| 583 | 583 | 'id' => 'email_overdue_body', |
| 584 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 584 | + 'name' => __('Email Content', 'invoicing'), |
|
| 585 | 585 | 'desc' => wpinv_get_merge_tags_help_text(), |
| 586 | 586 | 'type' => 'rich_editor', |
| 587 | - 'std' => __( '<p>Hi {full_name},</p><p>This is just a friendly reminder that your invoice <a href="{invoice_link}">#{invoice_number}</a> {is_was} due on {invoice_due_date}.</p><p>The total of this invoice is {invoice_total}</p><p>To view / pay now for this invoice please use the following link: <a class="btn btn-success" href="{invoice_link}">View / Pay</a></p>', 'invoicing' ), |
|
| 587 | + 'std' => __('<p>Hi {full_name},</p><p>This is just a friendly reminder that your invoice <a href="{invoice_link}">#{invoice_number}</a> {is_was} due on {invoice_due_date}.</p><p>The total of this invoice is {invoice_total}</p><p>To view / pay now for this invoice please use the following link: <a class="btn btn-success" href="{invoice_link}">View / Pay</a></p>', 'invoicing'), |
|
| 588 | 588 | 'class' => 'large', |
| 589 | 589 | 'size' => 10, |
| 590 | 590 | ), |
@@ -595,63 +595,63 @@ discard block |
||
| 595 | 595 | |
| 596 | 596 | 'email_renewal_reminder_header' => array( |
| 597 | 597 | 'id' => 'email_renewal_reminder_header', |
| 598 | - 'name' => '<h3>' . __( 'Renewal Reminder', 'invoicing' ) . '</h3>', |
|
| 599 | - 'desc' => __( 'These emails are sent to customers whenever their subscription is about to expire.', 'invoicing' ), |
|
| 598 | + 'name' => '<h3>' . __('Renewal Reminder', 'invoicing') . '</h3>', |
|
| 599 | + 'desc' => __('These emails are sent to customers whenever their subscription is about to expire.', 'invoicing'), |
|
| 600 | 600 | 'type' => 'header', |
| 601 | 601 | ), |
| 602 | 602 | |
| 603 | 603 | 'email_renewal_reminder_active' => array( |
| 604 | 604 | 'id' => 'email_renewal_reminder_active', |
| 605 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 606 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 605 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 606 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 607 | 607 | 'type' => 'checkbox', |
| 608 | 608 | 'std' => 0 |
| 609 | 609 | ), |
| 610 | 610 | |
| 611 | 611 | 'email_renewal_reminder_admin_bcc' => array( |
| 612 | 612 | 'id' => 'email_renewal_reminder_admin_bcc', |
| 613 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 614 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 613 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 614 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 615 | 615 | 'type' => 'checkbox', |
| 616 | 616 | 'std' => 0 |
| 617 | 617 | ), |
| 618 | 618 | |
| 619 | 619 | 'email_renewal_reminder_days' => array( |
| 620 | 620 | 'id' => 'email_renewal_reminder_days', |
| 621 | - 'name' => __( 'When to Send', 'invoicing' ), |
|
| 622 | - 'desc' => __( 'Check when you would like renewal reminders sent out.', 'invoicing' ), |
|
| 621 | + 'name' => __('When to Send', 'invoicing'), |
|
| 622 | + 'desc' => __('Check when you would like renewal reminders sent out.', 'invoicing'), |
|
| 623 | 623 | 'help-tip' => true, |
| 624 | - 'std' => array( '1', '5', '10' ), |
|
| 624 | + 'std' => array('1', '5', '10'), |
|
| 625 | 625 | 'type' => 'multicheck', |
| 626 | 626 | 'options' => $renewal_days_options, |
| 627 | 627 | ), |
| 628 | 628 | |
| 629 | 629 | 'email_renewal_reminder_subject' => array( |
| 630 | 630 | 'id' => 'email_renewal_reminder_subject', |
| 631 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 632 | - 'desc' => __( 'Enter the subject line for the email.', 'invoicing' ), |
|
| 631 | + 'name' => __('Subject', 'invoicing'), |
|
| 632 | + 'desc' => __('Enter the subject line for the email.', 'invoicing'), |
|
| 633 | 633 | 'help-tip' => true, |
| 634 | 634 | 'type' => 'text', |
| 635 | - 'std' => __( '[{site_title}] Renewal Reminder', 'invoicing' ), |
|
| 635 | + 'std' => __('[{site_title}] Renewal Reminder', 'invoicing'), |
|
| 636 | 636 | 'size' => 'large' |
| 637 | 637 | ), |
| 638 | 638 | |
| 639 | 639 | 'email_renewal_reminder_heading' => array( |
| 640 | 640 | 'id' => 'email_renewal_reminder_heading', |
| 641 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 642 | - 'desc' => __( 'Enter the main heading contained within the email notification.', 'invoicing' ), |
|
| 641 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 642 | + 'desc' => __('Enter the main heading contained within the email notification.', 'invoicing'), |
|
| 643 | 643 | 'help-tip' => true, |
| 644 | 644 | 'type' => 'text', |
| 645 | - 'std' => __( 'Upcoming renewal reminder', 'invoicing' ), |
|
| 645 | + 'std' => __('Upcoming renewal reminder', 'invoicing'), |
|
| 646 | 646 | 'size' => 'large' |
| 647 | 647 | ), |
| 648 | 648 | |
| 649 | 649 | 'email_renewal_reminder_body' => array( |
| 650 | 650 | 'id' => 'email_renewal_reminder_body', |
| 651 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 652 | - 'desc' => wpinv_get_merge_tags_help_text( true ), |
|
| 651 | + 'name' => __('Email Content', 'invoicing'), |
|
| 652 | + 'desc' => wpinv_get_merge_tags_help_text(true), |
|
| 653 | 653 | 'type' => 'rich_editor', |
| 654 | - 'std' => __( '<p>Hi {full_name},</p><p>This is just a friendly reminder that your subscription for invoice <a href="{invoice_link}">#{invoice_number}</a> will renew on {subscription_renewal_date}.</p>', 'invoicing' ), |
|
| 654 | + 'std' => __('<p>Hi {full_name},</p><p>This is just a friendly reminder that your subscription for invoice <a href="{invoice_link}">#{invoice_number}</a> will renew on {subscription_renewal_date}.</p>', 'invoicing'), |
|
| 655 | 655 | 'class' => 'large', |
| 656 | 656 | 'size' => 10, |
| 657 | 657 | ), |
@@ -662,53 +662,53 @@ discard block |
||
| 662 | 662 | |
| 663 | 663 | 'email_subscription_trial_header' => array( |
| 664 | 664 | 'id' => 'email_subscription_trial_header', |
| 665 | - 'name' => '<h3>' . __( 'Trial Started', 'invoicing' ) . '</h3>', |
|
| 666 | - 'desc' => __( 'These emails are sent when a customer starts a subscription trial.', 'invoicing' ), |
|
| 665 | + 'name' => '<h3>' . __('Trial Started', 'invoicing') . '</h3>', |
|
| 666 | + 'desc' => __('These emails are sent when a customer starts a subscription trial.', 'invoicing'), |
|
| 667 | 667 | 'type' => 'header', |
| 668 | 668 | ), |
| 669 | 669 | |
| 670 | 670 | 'email_subscription_trial_active' => array( |
| 671 | 671 | 'id' => 'email_subscription_trial_active', |
| 672 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 673 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 672 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 673 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 674 | 674 | 'type' => 'checkbox', |
| 675 | 675 | 'std' => 0 |
| 676 | 676 | ), |
| 677 | 677 | |
| 678 | 678 | 'email_subscription_trial_admin_bcc' => array( |
| 679 | 679 | 'id' => 'email_subscription_trial_admin_bcc', |
| 680 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 681 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 680 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 681 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 682 | 682 | 'type' => 'checkbox', |
| 683 | 683 | 'std' => 0 |
| 684 | 684 | ), |
| 685 | 685 | |
| 686 | 686 | 'email_subscription_trial_subject' => array( |
| 687 | 687 | 'id' => 'email_subscription_trial_subject', |
| 688 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 689 | - 'desc' => __( 'Enter the subject line for the subscription trial email.', 'invoicing' ), |
|
| 688 | + 'name' => __('Subject', 'invoicing'), |
|
| 689 | + 'desc' => __('Enter the subject line for the subscription trial email.', 'invoicing'), |
|
| 690 | 690 | 'help-tip' => true, |
| 691 | 691 | 'type' => 'text', |
| 692 | - 'std' => __( '[{site_title}] Trial Started', 'invoicing' ), |
|
| 692 | + 'std' => __('[{site_title}] Trial Started', 'invoicing'), |
|
| 693 | 693 | 'size' => 'large' |
| 694 | 694 | ), |
| 695 | 695 | |
| 696 | 696 | 'email_subscription_trial_heading' => array( |
| 697 | 697 | 'id' => 'email_subscription_trial_heading', |
| 698 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 699 | - 'desc' => __( 'Enter the main heading of this email.', 'invoicing' ), |
|
| 698 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 699 | + 'desc' => __('Enter the main heading of this email.', 'invoicing'), |
|
| 700 | 700 | 'help-tip' => true, |
| 701 | 701 | 'type' => 'text', |
| 702 | - 'std' => __( 'Trial Started', 'invoicing' ), |
|
| 702 | + 'std' => __('Trial Started', 'invoicing'), |
|
| 703 | 703 | 'size' => 'large' |
| 704 | 704 | ), |
| 705 | 705 | |
| 706 | 706 | 'email_subscription_trial_body' => array( |
| 707 | 707 | 'id' => 'email_subscription_trial_body', |
| 708 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 709 | - 'desc' => wpinv_get_merge_tags_help_text( true ), |
|
| 708 | + 'name' => __('Email Content', 'invoicing'), |
|
| 709 | + 'desc' => wpinv_get_merge_tags_help_text(true), |
|
| 710 | 710 | 'type' => 'rich_editor', |
| 711 | - 'std' => __( '<p>Hi {first_name},</p><p>Your trial for {subscription_name} is now active and will renew on {subscription_renewal_date}.</p>', 'invoicing' ), |
|
| 711 | + 'std' => __('<p>Hi {first_name},</p><p>Your trial for {subscription_name} is now active and will renew on {subscription_renewal_date}.</p>', 'invoicing'), |
|
| 712 | 712 | 'class' => 'large', |
| 713 | 713 | 'size' => 10, |
| 714 | 714 | ), |
@@ -718,53 +718,53 @@ discard block |
||
| 718 | 718 | |
| 719 | 719 | 'email_subscription_cancelled_header' => array( |
| 720 | 720 | 'id' => 'email_subscription_cancelled_header', |
| 721 | - 'name' => '<h3>' . __( 'Subscription Cancelled', 'invoicing' ) . '</h3>', |
|
| 722 | - 'desc' => __( 'These emails are sent when a customer cancels their subscription.', 'invoicing' ), |
|
| 721 | + 'name' => '<h3>' . __('Subscription Cancelled', 'invoicing') . '</h3>', |
|
| 722 | + 'desc' => __('These emails are sent when a customer cancels their subscription.', 'invoicing'), |
|
| 723 | 723 | 'type' => 'header', |
| 724 | 724 | ), |
| 725 | 725 | |
| 726 | 726 | 'email_subscription_cancelled_active' => array( |
| 727 | 727 | 'id' => 'email_subscription_cancelled_active', |
| 728 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 729 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 728 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 729 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 730 | 730 | 'type' => 'checkbox', |
| 731 | 731 | 'std' => 1 |
| 732 | 732 | ), |
| 733 | 733 | |
| 734 | 734 | 'email_subscription_cancelled_admin_bcc' => array( |
| 735 | 735 | 'id' => 'email_subscription_cancelled_admin_bcc', |
| 736 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 737 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 736 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 737 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 738 | 738 | 'type' => 'checkbox', |
| 739 | 739 | 'std' => 1 |
| 740 | 740 | ), |
| 741 | 741 | |
| 742 | 742 | 'email_subscription_cancelled_subject' => array( |
| 743 | 743 | 'id' => 'email_subscription_cancelled_subject', |
| 744 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 745 | - 'desc' => __( 'Enter the subject line for the subscription cancelled email.', 'invoicing' ), |
|
| 744 | + 'name' => __('Subject', 'invoicing'), |
|
| 745 | + 'desc' => __('Enter the subject line for the subscription cancelled email.', 'invoicing'), |
|
| 746 | 746 | 'help-tip' => true, |
| 747 | 747 | 'type' => 'text', |
| 748 | - 'std' => __( '[{site_title}] Subscription Cancelled', 'invoicing' ), |
|
| 748 | + 'std' => __('[{site_title}] Subscription Cancelled', 'invoicing'), |
|
| 749 | 749 | 'size' => 'large' |
| 750 | 750 | ), |
| 751 | 751 | |
| 752 | 752 | 'email_subscription_cancelled_heading' => array( |
| 753 | 753 | 'id' => 'email_subscription_cancelled_heading', |
| 754 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 755 | - 'desc' => __( 'Enter the main heading of this email.', 'invoicing' ), |
|
| 754 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 755 | + 'desc' => __('Enter the main heading of this email.', 'invoicing'), |
|
| 756 | 756 | 'help-tip' => true, |
| 757 | 757 | 'type' => 'text', |
| 758 | - 'std' => __( 'Subscription Cancelled', 'invoicing' ), |
|
| 758 | + 'std' => __('Subscription Cancelled', 'invoicing'), |
|
| 759 | 759 | 'size' => 'large' |
| 760 | 760 | ), |
| 761 | 761 | |
| 762 | 762 | 'email_subscription_cancelled_body' => array( |
| 763 | 763 | 'id' => 'email_subscription_cancelled_body', |
| 764 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 765 | - 'desc' => wpinv_get_merge_tags_help_text( true ), |
|
| 764 | + 'name' => __('Email Content', 'invoicing'), |
|
| 765 | + 'desc' => wpinv_get_merge_tags_help_text(true), |
|
| 766 | 766 | 'type' => 'rich_editor', |
| 767 | - 'std' => __( '<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has been cancelled and will no longer renew.</p>', 'invoicing' ), |
|
| 767 | + 'std' => __('<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has been cancelled and will no longer renew.</p>', 'invoicing'), |
|
| 768 | 768 | 'class' => 'large', |
| 769 | 769 | 'size' => 10, |
| 770 | 770 | ), |
@@ -774,53 +774,53 @@ discard block |
||
| 774 | 774 | |
| 775 | 775 | 'email_subscription_expired_header' => array( |
| 776 | 776 | 'id' => 'email_subscription_expired_header', |
| 777 | - 'name' => '<h3>' . __( 'Subscription Expired', 'invoicing' ) . '</h3>', |
|
| 778 | - 'desc' => __( "These emails are sent when a customer's subscription expires and automatic renewal fails.", 'invoicing' ), |
|
| 777 | + 'name' => '<h3>' . __('Subscription Expired', 'invoicing') . '</h3>', |
|
| 778 | + 'desc' => __("These emails are sent when a customer's subscription expires and automatic renewal fails.", 'invoicing'), |
|
| 779 | 779 | 'type' => 'header', |
| 780 | 780 | ), |
| 781 | 781 | |
| 782 | 782 | 'email_subscription_expired_active' => array( |
| 783 | 783 | 'id' => 'email_subscription_expired_active', |
| 784 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 785 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 784 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 785 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 786 | 786 | 'type' => 'checkbox', |
| 787 | 787 | 'std' => 1 |
| 788 | 788 | ), |
| 789 | 789 | |
| 790 | 790 | 'email_subscription_expired_admin_bcc' => array( |
| 791 | 791 | 'id' => 'email_subscription_expired_admin_bcc', |
| 792 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 793 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 792 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 793 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 794 | 794 | 'type' => 'checkbox', |
| 795 | 795 | 'std' => 1 |
| 796 | 796 | ), |
| 797 | 797 | |
| 798 | 798 | 'email_subscription_expired_subject' => array( |
| 799 | 799 | 'id' => 'email_subscription_expired_subject', |
| 800 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 801 | - 'desc' => __( 'Enter the subject line for the subscription expired email.', 'invoicing' ), |
|
| 800 | + 'name' => __('Subject', 'invoicing'), |
|
| 801 | + 'desc' => __('Enter the subject line for the subscription expired email.', 'invoicing'), |
|
| 802 | 802 | 'help-tip' => true, |
| 803 | 803 | 'type' => 'text', |
| 804 | - 'std' => __( '[{site_title}] Subscription Expired', 'invoicing' ), |
|
| 804 | + 'std' => __('[{site_title}] Subscription Expired', 'invoicing'), |
|
| 805 | 805 | 'size' => 'large' |
| 806 | 806 | ), |
| 807 | 807 | |
| 808 | 808 | 'email_subscription_expired_heading' => array( |
| 809 | 809 | 'id' => 'email_subscription_expired_heading', |
| 810 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 811 | - 'desc' => __( 'Enter the main heading of this email.', 'invoicing' ), |
|
| 810 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 811 | + 'desc' => __('Enter the main heading of this email.', 'invoicing'), |
|
| 812 | 812 | 'type' => 'text', |
| 813 | - 'std' => __( 'Subscription Expired', 'invoicing' ), |
|
| 813 | + 'std' => __('Subscription Expired', 'invoicing'), |
|
| 814 | 814 | 'help-tip' => true, |
| 815 | 815 | 'size' => 'large' |
| 816 | 816 | ), |
| 817 | 817 | |
| 818 | 818 | 'email_subscription_expired_body' => array( |
| 819 | 819 | 'id' => 'email_subscription_expired_body', |
| 820 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 821 | - 'desc' => wpinv_get_merge_tags_help_text( true ), |
|
| 820 | + 'name' => __('Email Content', 'invoicing'), |
|
| 821 | + 'desc' => wpinv_get_merge_tags_help_text(true), |
|
| 822 | 822 | 'type' => 'rich_editor', |
| 823 | - 'std' => __( '<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has expired.</p>', 'invoicing' ), |
|
| 823 | + 'std' => __('<p>Hi {first_name},</p><p>Your subscription for {subscription_name} has expired.</p>', 'invoicing'), |
|
| 824 | 824 | 'class' => 'large', |
| 825 | 825 | 'size' => 10, |
| 826 | 826 | ), |
@@ -830,53 +830,53 @@ discard block |
||
| 830 | 830 | |
| 831 | 831 | 'email_subscription_complete_header' => array( |
| 832 | 832 | 'id' => 'email_subscription_complete_header', |
| 833 | - 'name' => '<h3>' . __( 'Subscription Complete', 'invoicing' ) . '</h3>', |
|
| 834 | - 'desc' => __( 'These emails are sent when a customer completes their subscription.', 'invoicing' ), |
|
| 833 | + 'name' => '<h3>' . __('Subscription Complete', 'invoicing') . '</h3>', |
|
| 834 | + 'desc' => __('These emails are sent when a customer completes their subscription.', 'invoicing'), |
|
| 835 | 835 | 'type' => 'header', |
| 836 | 836 | ), |
| 837 | 837 | |
| 838 | 838 | 'email_subscription_complete_active' => array( |
| 839 | 839 | 'id' => 'email_subscription_complete_active', |
| 840 | - 'name' => __( 'Enable/Disable', 'invoicing' ), |
|
| 841 | - 'desc' => __( 'Enable this email notification', 'invoicing' ), |
|
| 840 | + 'name' => __('Enable/Disable', 'invoicing'), |
|
| 841 | + 'desc' => __('Enable this email notification', 'invoicing'), |
|
| 842 | 842 | 'type' => 'checkbox', |
| 843 | 843 | 'std' => 1 |
| 844 | 844 | ), |
| 845 | 845 | |
| 846 | 846 | 'email_subscription_complete_admin_bcc' => array( |
| 847 | 847 | 'id' => 'email_subscription_complete_admin_bcc', |
| 848 | - 'name' => __( 'Enable Admin BCC', 'invoicing' ), |
|
| 849 | - 'desc' => __( 'Check if you want to send a copy of this notification email to the site admin.', 'invoicing' ), |
|
| 848 | + 'name' => __('Enable Admin BCC', 'invoicing'), |
|
| 849 | + 'desc' => __('Check if you want to send a copy of this notification email to the site admin.', 'invoicing'), |
|
| 850 | 850 | 'type' => 'checkbox', |
| 851 | 851 | 'std' => 1 |
| 852 | 852 | ), |
| 853 | 853 | |
| 854 | 854 | 'email_subscription_complete_subject' => array( |
| 855 | 855 | 'id' => 'email_subscription_complete_subject', |
| 856 | - 'name' => __( 'Subject', 'invoicing' ), |
|
| 857 | - 'desc' => __( 'Enter the subject line for the subscription complete email.', 'invoicing' ), |
|
| 856 | + 'name' => __('Subject', 'invoicing'), |
|
| 857 | + 'desc' => __('Enter the subject line for the subscription complete email.', 'invoicing'), |
|
| 858 | 858 | 'help-tip' => true, |
| 859 | 859 | 'type' => 'text', |
| 860 | - 'std' => __( '[{site_title}] Subscription Complete', 'invoicing' ), |
|
| 860 | + 'std' => __('[{site_title}] Subscription Complete', 'invoicing'), |
|
| 861 | 861 | 'size' => 'large' |
| 862 | 862 | ), |
| 863 | 863 | |
| 864 | 864 | 'email_subscription_complete_heading' => array( |
| 865 | 865 | 'id' => 'email_subscription_complete_heading', |
| 866 | - 'name' => __( 'Email Heading', 'invoicing' ), |
|
| 867 | - 'desc' => __( 'Enter the main heading of this email.', 'invoicing' ), |
|
| 866 | + 'name' => __('Email Heading', 'invoicing'), |
|
| 867 | + 'desc' => __('Enter the main heading of this email.', 'invoicing'), |
|
| 868 | 868 | 'help-tip' => true, |
| 869 | 869 | 'type' => 'text', |
| 870 | - 'std' => __( 'Subscription Complete', 'invoicing' ), |
|
| 870 | + 'std' => __('Subscription Complete', 'invoicing'), |
|
| 871 | 871 | 'size' => 'large' |
| 872 | 872 | ), |
| 873 | 873 | |
| 874 | 874 | 'email_subscription_complete_body' => array( |
| 875 | 875 | 'id' => 'email_subscription_complete_body', |
| 876 | - 'name' => __( 'Email Content', 'invoicing' ), |
|
| 877 | - 'desc' => wpinv_get_merge_tags_help_text( true ), |
|
| 876 | + 'name' => __('Email Content', 'invoicing'), |
|
| 877 | + 'desc' => wpinv_get_merge_tags_help_text(true), |
|
| 878 | 878 | 'type' => 'rich_editor', |
| 879 | - 'std' => __( '<p>Hi {first_name},</p><p>Your subscription for {subscription_name} is now complete.</p>', 'invoicing' ), |
|
| 879 | + 'std' => __('<p>Hi {first_name},</p><p>Your subscription for {subscription_name} is now complete.</p>', 'invoicing'), |
|
| 880 | 880 | 'class' => 'large', |
| 881 | 881 | 'size' => 10, |
| 882 | 882 | ), |