@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | */ |
36 | 36 | protected function inflectModuleVars($vars) |
37 | 37 | { |
38 | - $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) |
|
39 | - $vars['name'] = str_replace('module-', '', $vars['name']); // strip out module- |
|
40 | - $vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module |
|
41 | - $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s |
|
42 | - $vars['name'] = ucwords($vars['name']); // make module name camelcased |
|
38 | + $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) |
|
39 | + $vars['name'] = str_replace('module-', '', $vars['name']); // strip out module- |
|
40 | + $vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module |
|
41 | + $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s |
|
42 | + $vars['name'] = ucwords($vars['name']); // make module name camelcased |
|
43 | 43 | |
44 | 44 | return $vars; |
45 | 45 | } |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | */ |
53 | 53 | protected function inflectThemeVars($vars) |
54 | 54 | { |
55 | - $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) |
|
56 | - $vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme- |
|
57 | - $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme |
|
58 | - $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s |
|
59 | - $vars['name'] = ucwords($vars['name']); // make module name camelcased |
|
55 | + $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) |
|
56 | + $vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme- |
|
57 | + $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme |
|
58 | + $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s |
|
59 | + $vars['name'] = ucwords($vars['name']); // make module name camelcased |
|
60 | 60 | |
61 | 61 | return $vars; |
62 | 62 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | */ |
38 | 38 | private function correctPluginName($vars) |
39 | 39 | { |
40 | - $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) { |
|
40 | + $camelCasedName = preg_replace_callback('/(-[a-z])/', function($matches) { |
|
41 | 41 | return strtoupper($matches[0][1]); |
42 | 42 | }, $vars['name']); |
43 | 43 |
@@ -6,8 +6,8 @@ |
||
6 | 6 | } |
7 | 7 | } |
8 | 8 | if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) { |
9 | - die('You must set up the project dependencies, run the following commands:'.PHP_EOL. |
|
10 | - 'curl -s http://getcomposer.org/installer | php'.PHP_EOL. |
|
11 | - 'php composer.phar install'.PHP_EOL); |
|
9 | + die('You must set up the project dependencies, run the following commands:' . PHP_EOL . |
|
10 | + 'curl -s http://getcomposer.org/installer | php' . PHP_EOL . |
|
11 | + 'php composer.phar install' . PHP_EOL); |
|
12 | 12 | } |
13 | 13 | return $loader; |
@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | // MUST have WordPress. |
10 | -if ( !defined( 'WPINC' ) ) { |
|
11 | - exit( 'Do NOT access this file directly: ' . basename( __FILE__ ) ); |
|
10 | +if (!defined('WPINC')) { |
|
11 | + exit('Do NOT access this file directly: ' . basename(__FILE__)); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | class WPInv_Admin_Users { |
15 | 15 | private static $instance; |
16 | 16 | |
17 | 17 | public static function run() { |
18 | - if ( !isset( self::$instance ) && !( self::$instance instanceof WPInv_Admin_Users ) ) { |
|
18 | + if (!isset(self::$instance) && !(self::$instance instanceof WPInv_Admin_Users)) { |
|
19 | 19 | self::$instance = new WPInv_Admin_Users; |
20 | 20 | } |
21 | 21 | |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | public function __construct() { |
26 | - add_filter( 'manage_users_columns', array( $this, 'wpinv_add_user_column') ); |
|
27 | - add_filter( 'manage_users_custom_column', array( $this, 'wpinv_user_column_content') , 10, 3 ); |
|
26 | + add_filter('manage_users_columns', array($this, 'wpinv_add_user_column')); |
|
27 | + add_filter('manage_users_custom_column', array($this, 'wpinv_user_column_content'), 10, 3); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | * |
35 | 35 | * @return mixed |
36 | 36 | */ |
37 | - public function wpinv_add_user_column( $column ) { |
|
38 | - $column['wpinvoicing'] = __('Invoicing','invoicing'); |
|
37 | + public function wpinv_add_user_column($column) { |
|
38 | + $column['wpinvoicing'] = __('Invoicing', 'invoicing'); |
|
39 | 39 | return $column; |
40 | 40 | } |
41 | 41 | |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | * |
49 | 49 | * @return string |
50 | 50 | */ |
51 | - function wpinv_user_column_content( $val, $column_name, $user_id ) { |
|
51 | + function wpinv_user_column_content($val, $column_name, $user_id) { |
|
52 | 52 | switch ($column_name) { |
53 | 53 | case 'wpinvoicing' : |
54 | - return $this->get_user_invoices( $user_id ); |
|
54 | + return $this->get_user_invoices($user_id); |
|
55 | 55 | break; |
56 | 56 | default: |
57 | 57 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * |
66 | 66 | * @return string |
67 | 67 | */ |
68 | - public function get_user_invoices($user_id){ |
|
68 | + public function get_user_invoices($user_id) { |
|
69 | 69 | $output = ''; |
70 | 70 | $wp_query_args = array( |
71 | 71 | 'post_type' => 'wpi_invoice', |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | |
78 | 78 | $wp_query_args = apply_filters('wpinv_get_user_invoices_args', $wp_query_args, $user_id); |
79 | 79 | |
80 | - $invoices = new WP_Query( $wp_query_args ); |
|
81 | - $count = absint( $invoices->found_posts ); |
|
80 | + $invoices = new WP_Query($wp_query_args); |
|
81 | + $count = absint($invoices->found_posts); |
|
82 | 82 | |
83 | - if(empty($count)){ |
|
84 | - $output .= __('No Invoice(s)','invoicing'); |
|
85 | - }else{ |
|
86 | - $link_url = admin_url( "edit.php?post_type=wpi_invoice&author=".absint($user_id) ); |
|
87 | - $link_text = sprintf( __('Invoices ( %d )', 'invoicing'), $count ); |
|
83 | + if (empty($count)) { |
|
84 | + $output .= __('No Invoice(s)', 'invoicing'); |
|
85 | + } else { |
|
86 | + $link_url = admin_url("edit.php?post_type=wpi_invoice&author=" . absint($user_id)); |
|
87 | + $link_text = sprintf(__('Invoices ( %d )', 'invoicing'), $count); |
|
88 | 88 | $output .= "<a href='$link_url' >$link_text</a>"; |
89 | 89 | } |
90 | 90 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | // Exit if accessed directly |
3 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
4 | -if(!class_exists('Ayecode_Addons')) { |
|
3 | +if (!defined('ABSPATH')) exit; |
|
4 | +if (!class_exists('Ayecode_Addons')) { |
|
5 | 5 | |
6 | 6 | abstract class Ayecode_Addons |
7 | 7 | { |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * Abstract privacy class. |
4 | 4 | */ |
5 | 5 | |
6 | -defined( 'ABSPATH' ) || exit; |
|
6 | +defined('ABSPATH') || exit; |
|
7 | 7 | |
8 | 8 | /** |
9 | 9 | * Abstract class that is intended to be extended by |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * |
39 | 39 | * @param string $name Plugin identifier. |
40 | 40 | */ |
41 | - public function __construct( $name = '' ) { |
|
41 | + public function __construct($name = '') { |
|
42 | 42 | $this->name = $name; |
43 | 43 | $this->init(); |
44 | 44 | } |
@@ -47,22 +47,22 @@ discard block |
||
47 | 47 | * Hook in events. |
48 | 48 | */ |
49 | 49 | protected function init() { |
50 | - add_action( 'admin_init', array( $this, 'add_privacy_message' ) ); |
|
50 | + add_action('admin_init', array($this, 'add_privacy_message')); |
|
51 | 51 | // Register data exporters |
52 | - add_filter( 'wp_privacy_personal_data_exporters', array( $this, 'register_exporters' ), 10 ); |
|
52 | + add_filter('wp_privacy_personal_data_exporters', array($this, 'register_exporters'), 10); |
|
53 | 53 | // Register data erasers |
54 | - add_filter( 'wp_privacy_personal_data_erasers', array( $this, 'register_erasers' ) ); |
|
54 | + add_filter('wp_privacy_personal_data_erasers', array($this, 'register_erasers')); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | 58 | * Adds the privacy message on invoicing privacy page. |
59 | 59 | */ |
60 | 60 | public function add_privacy_message() { |
61 | - if ( function_exists( 'wp_add_privacy_policy_content' ) ) { |
|
61 | + if (function_exists('wp_add_privacy_policy_content')) { |
|
62 | 62 | $content = $this->get_privacy_message(); |
63 | 63 | |
64 | - if ( $content ) { |
|
65 | - wp_add_privacy_policy_content( $this->name, $this->get_privacy_message() ); |
|
64 | + if ($content) { |
|
65 | + wp_add_privacy_policy_content($this->name, $this->get_privacy_message()); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | } |
@@ -83,9 +83,9 @@ discard block |
||
83 | 83 | * @param array $exporters List of exporter callbacks. |
84 | 84 | * @return array |
85 | 85 | */ |
86 | - public function register_exporters( $exporters = array() ) { |
|
87 | - foreach ( $this->exporters as $id => $exporter ) { |
|
88 | - $exporters[ $id ] = $exporter; |
|
86 | + public function register_exporters($exporters = array()) { |
|
87 | + foreach ($this->exporters as $id => $exporter) { |
|
88 | + $exporters[$id] = $exporter; |
|
89 | 89 | } |
90 | 90 | return $exporters; |
91 | 91 | } |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | * @param array $erasers List of eraser callbacks. |
97 | 97 | * @return array |
98 | 98 | */ |
99 | - public function register_erasers( $erasers = array() ) { |
|
100 | - foreach ( $this->erasers as $id => $eraser ) { |
|
101 | - $erasers[ $id ] = $eraser; |
|
99 | + public function register_erasers($erasers = array()) { |
|
100 | + foreach ($this->erasers as $id => $eraser) { |
|
101 | + $erasers[$id] = $eraser; |
|
102 | 102 | } |
103 | 103 | return $erasers; |
104 | 104 | } |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | * |
113 | 113 | * @return array |
114 | 114 | */ |
115 | - public function add_exporter( $id, $name, $callback ) { |
|
116 | - $this->exporters[ $id ] = array( |
|
115 | + public function add_exporter($id, $name, $callback) { |
|
116 | + $this->exporters[$id] = array( |
|
117 | 117 | 'exporter_friendly_name' => $name, |
118 | 118 | 'callback' => $callback, |
119 | 119 | ); |
@@ -129,8 +129,8 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @return array |
131 | 131 | */ |
132 | - public function add_eraser( $id, $name, $callback ) { |
|
133 | - $this->erasers[ $id ] = array( |
|
132 | + public function add_eraser($id, $name, $callback) { |
|
133 | + $this->erasers[$id] = array( |
|
134 | 134 | 'eraser_friendly_name' => $name, |
135 | 135 | 'callback' => $callback, |
136 | 136 | ); |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * Handle data for the current customer session |
4 | 4 | */ |
5 | 5 | |
6 | -if ( ! defined( 'ABSPATH' ) ) { |
|
6 | +if (!defined('ABSPATH')) { |
|
7 | 7 | exit; |
8 | 8 | } |
9 | 9 | |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | * @param mixed $key Key to get. |
52 | 52 | * @return mixed |
53 | 53 | */ |
54 | - public function __get( $key ) { |
|
55 | - return $this->get( $key ); |
|
54 | + public function __get($key) { |
|
55 | + return $this->get($key); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | * @param mixed $key Key to set. |
62 | 62 | * @param mixed $value Value to set. |
63 | 63 | */ |
64 | - public function __set( $key, $value ) { |
|
65 | - $this->set( $key, $value ); |
|
64 | + public function __set($key, $value) { |
|
65 | + $this->set($key, $value); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | * @param mixed $key Key to check. |
72 | 72 | * @return bool |
73 | 73 | */ |
74 | - public function __isset( $key ) { |
|
75 | - return isset( $this->_data[ sanitize_title( $key ) ] ); |
|
74 | + public function __isset($key) { |
|
75 | + return isset($this->_data[sanitize_title($key)]); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @param mixed $key Key to unset. |
82 | 82 | */ |
83 | - public function __unset( $key ) { |
|
84 | - if ( isset( $this->_data[ $key ] ) ) { |
|
85 | - unset( $this->_data[ $key ] ); |
|
83 | + public function __unset($key) { |
|
84 | + if (isset($this->_data[$key])) { |
|
85 | + unset($this->_data[$key]); |
|
86 | 86 | $this->_dirty = true; |
87 | 87 | } |
88 | 88 | } |
@@ -94,9 +94,9 @@ discard block |
||
94 | 94 | * @param mixed $default used if the session variable isn't set. |
95 | 95 | * @return array|string value of session variable |
96 | 96 | */ |
97 | - public function get( $key, $default = null ) { |
|
98 | - $key = sanitize_key( $key ); |
|
99 | - return isset( $this->_data[ $key ] ) ? maybe_unserialize( $this->_data[ $key ] ) : $default; |
|
97 | + public function get($key, $default = null) { |
|
98 | + $key = sanitize_key($key); |
|
99 | + return isset($this->_data[$key]) ? maybe_unserialize($this->_data[$key]) : $default; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -105,9 +105,9 @@ discard block |
||
105 | 105 | * @param string $key Key to set. |
106 | 106 | * @param mixed $value Value to set. |
107 | 107 | */ |
108 | - public function set( $key, $value ) { |
|
109 | - if ( $value !== $this->get( $key ) ) { |
|
110 | - $this->_data[ sanitize_key( $key ) ] = maybe_serialize( $value ); |
|
108 | + public function set($key, $value) { |
|
109 | + if ($value !== $this->get($key)) { |
|
110 | + $this->_data[sanitize_key($key)] = maybe_serialize($value); |
|
111 | 111 | $this->_dirty = true; |
112 | 112 | } |
113 | 113 | } |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * Admin View: Page - Addons |
4 | 4 | * |
5 | 5 | */ |
6 | -if ( ! defined( 'ABSPATH' ) ) { |
|
6 | +if (!defined('ABSPATH')) { |
|
7 | 7 | exit; |
8 | 8 | } |
9 | 9 | add_ThickBox(); |
@@ -11,19 +11,19 @@ discard block |
||
11 | 11 | <div class="wrap wpi_addons_wrap"> |
12 | 12 | <h1><?php echo get_admin_page_title(); ?></h1> |
13 | 13 | |
14 | - <?php if ( $tabs ){ ?> |
|
14 | + <?php if ($tabs) { ?> |
|
15 | 15 | <nav class="nav-tab-wrapper wpi-nav-tab-wrapper"> |
16 | 16 | <?php |
17 | - foreach ( $tabs as $name => $label ) { |
|
18 | - echo '<a href="' . admin_url( 'admin.php?page=wpi-addons&tab=' . $name ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . $label . '</a>'; |
|
17 | + foreach ($tabs as $name => $label) { |
|
18 | + echo '<a href="' . admin_url('admin.php?page=wpi-addons&tab=' . $name) . '" class="nav-tab ' . ($current_tab == $name ? 'nav-tab-active' : '') . '">' . $label . '</a>'; |
|
19 | 19 | } |
20 | - do_action( 'wpi_addons_tabs' ); |
|
20 | + do_action('wpi_addons_tabs'); |
|
21 | 21 | ?> |
22 | 22 | </nav> |
23 | 23 | |
24 | 24 | <?php |
25 | 25 | |
26 | - if($current_tab == 'membership'){ |
|
26 | + if ($current_tab == 'membership') { |
|
27 | 27 | |
28 | 28 | ?> |
29 | 29 | |
@@ -32,42 +32,42 @@ discard block |
||
32 | 32 | <!-- |
33 | 33 | <h2>With our WPInvoicing Membership you get access to all our products!</h2> |
34 | 34 | <p><a class="button button-primary" href="https://wpinvoicing.com/downloads/membership/">View Memberships</a></p>--> |
35 | - <?php if(defined('WP_EASY_UPDATES_ACTIVE')){?> |
|
36 | - <h2><?php _e("Have a membership key?","invoicing");?></h2> |
|
35 | + <?php if (defined('WP_EASY_UPDATES_ACTIVE')) {?> |
|
36 | + <h2><?php _e("Have a membership key?", "invoicing"); ?></h2> |
|
37 | 37 | <p> |
38 | 38 | <?php |
39 | - $wpeu_admin = new External_Updates_Admin('wpinvoicing.com','1'); |
|
40 | - echo $wpeu_admin->render_licence_actions('wpinvoicing.com', 'membership',array(95, 106, 108,12351)); |
|
39 | + $wpeu_admin = new External_Updates_Admin('wpinvoicing.com', '1'); |
|
40 | + echo $wpeu_admin->render_licence_actions('wpinvoicing.com', 'membership', array(95, 106, 108, 12351)); |
|
41 | 41 | ?> |
42 | 42 | </p> |
43 | 43 | <?php }?> |
44 | 44 | |
45 | 45 | <div class="membership-cta-contet"> |
46 | 46 | <div class="main-cta"> |
47 | - <h2><?php _e("Membership benefits Include:","invoicing");?></h2> |
|
47 | + <h2><?php _e("Membership benefits Include:", "invoicing"); ?></h2> |
|
48 | 48 | <div class="feature-list"> |
49 | 49 | <ul> |
50 | 50 | <?php |
51 | 51 | $addon_obj = new WPInv_Admin_Addons(); |
52 | - if ($addons = $addon_obj->get_section_data( 'addons' ) ) { |
|
53 | - foreach ( $addons as $addon ) { |
|
54 | - echo '<li><i class="far fa-check-circle fa-sm"></i> '.esc_html( $addon->info->title ).'</li>'; |
|
52 | + if ($addons = $addon_obj->get_section_data('addons')) { |
|
53 | + foreach ($addons as $addon) { |
|
54 | + echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html($addon->info->title) . '</li>'; |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | ?> |
58 | 58 | </ul> |
59 | 59 | |
60 | 60 | <div class="feature-cta"> |
61 | - <h3><?php _e("Membership Starts from","invoicing");?></h3> |
|
61 | + <h3><?php _e("Membership Starts from", "invoicing"); ?></h3> |
|
62 | 62 | <h4>$99</h4> |
63 | - <a href="https://wpinvoicing.com/downloads/membership/" target="_blank"><?php _e("Buy Membership","invoicing");?></a> |
|
63 | + <a href="https://wpinvoicing.com/downloads/membership/" target="_blank"><?php _e("Buy Membership", "invoicing"); ?></a> |
|
64 | 64 | </div> |
65 | - <h3><?php _e("Included Gateways:","invoicing");?></h3> |
|
65 | + <h3><?php _e("Included Gateways:", "invoicing"); ?></h3> |
|
66 | 66 | <ul> |
67 | 67 | <?php |
68 | - if ($addons = $addon_obj->get_section_data( 'gateways' ) ) { |
|
69 | - foreach ( $addons as $addon ) { |
|
70 | - echo '<li><i class="far fa-check-circle fa-sm"></i> '.esc_html( $addon->info->title ).'</li>'; |
|
68 | + if ($addons = $addon_obj->get_section_data('gateways')) { |
|
69 | + foreach ($addons as $addon) { |
|
70 | + echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html($addon->info->title) . '</li>'; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | ?> |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | <div class="testimonial-content"> |
82 | 82 | <div class="t-image"> |
83 | 83 | <?php |
84 | - echo '<img src="' . plugins_url( 'images/t-image2.png', dirname(__FILE__) ) . '" > '; |
|
84 | + echo '<img src="' . plugins_url('images/t-image2.png', dirname(__FILE__)) . '" > '; |
|
85 | 85 | ?> |
86 | 86 | </div> |
87 | 87 | <div class="t-content"> |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | <div class="testimonial-content"> |
102 | 102 | <div class="t-image"> |
103 | 103 | <?php |
104 | - echo '<img src="' . plugins_url( 'images/t-image1.png', dirname(__FILE__) ) . '" > '; |
|
104 | + echo '<img src="' . plugins_url('images/t-image1.png', dirname(__FILE__)) . '" > '; |
|
105 | 105 | ?> |
106 | 106 | </div> |
107 | 107 | <div class="t-content"> |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | </div> |
118 | 118 | </div> |
119 | 119 | <div class="member-footer"> |
120 | - <a class="footer-btn" href="https://wpinvoicing.com/downloads/membership/" target="_blank"><?php _e("Buy Membership","invoicing");?></a> |
|
121 | - <a class="footer-link" href="post-new.php?post_type=wpi_invoice"><?php _e("Create Invoice","invoicing");?></a> |
|
120 | + <a class="footer-btn" href="https://wpinvoicing.com/downloads/membership/" target="_blank"><?php _e("Buy Membership", "invoicing"); ?></a> |
|
121 | + <a class="footer-link" href="post-new.php?post_type=wpi_invoice"><?php _e("Create Invoice", "invoicing"); ?></a> |
|
122 | 122 | </div> |
123 | 123 | </div> |
124 | 124 | |
@@ -126,44 +126,44 @@ discard block |
||
126 | 126 | </div> |
127 | 127 | </div> |
128 | 128 | <?php |
129 | - }else{ |
|
129 | + } else { |
|
130 | 130 | $installed_plugins = get_plugins(); |
131 | 131 | $addon_obj = new WPInv_Admin_Addons(); |
132 | - if ($addons = $addon_obj->get_section_data( $current_tab ) ) : |
|
132 | + if ($addons = $addon_obj->get_section_data($current_tab)) : |
|
133 | 133 | ?> |
134 | - <ul class="wpi-products"><?php foreach ( $addons as $addon ) : |
|
135 | - if(965==$addon->info->id){continue;}// don't show quote add on |
|
134 | + <ul class="wpi-products"><?php foreach ($addons as $addon) : |
|
135 | + if (965 == $addon->info->id) {continue; }// don't show quote add on |
|
136 | 136 | ?><li class="wpi-product"> |
137 | 137 | <div class="wpi-product-title"> |
138 | 138 | <h3><?php |
139 | - if ( ! empty( $addon->info->excerpt) ){ |
|
140 | - echo wpi_help_tip( $addon->info->excerpt ); |
|
139 | + if (!empty($addon->info->excerpt)) { |
|
140 | + echo wpi_help_tip($addon->info->excerpt); |
|
141 | 141 | } |
142 | - echo esc_html( $addon->info->title ); ?></h3> |
|
142 | + echo esc_html($addon->info->title); ?></h3> |
|
143 | 143 | </div> |
144 | 144 | |
145 | 145 | <span class="wpi-product-image"> |
146 | - <?php if ( ! empty( $addon->info->thumbnail) ) : ?> |
|
147 | - <img src="<?php echo esc_attr( $addon->info->thumbnail ); ?>"/> |
|
146 | + <?php if (!empty($addon->info->thumbnail)) : ?> |
|
147 | + <img src="<?php echo esc_attr($addon->info->thumbnail); ?>"/> |
|
148 | 148 | <?php endif; |
149 | 149 | |
150 | - if(isset($addon->info->link) && substr( $addon->info->link, 0, 21 ) === "https://wordpress.org"){ |
|
151 | - echo '<a href="'.admin_url('/plugin-install.php?tab=plugin-information&plugin='.$addon->info->slug).'&width=770&height=660&TB_iframe=true" class="thickbox" >'; |
|
152 | - echo '<span class="wpi-product-info">'.__('More info','invoicing').'</span>'; |
|
150 | + if (isset($addon->info->link) && substr($addon->info->link, 0, 21) === "https://wordpress.org") { |
|
151 | + echo '<a href="' . admin_url('/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug) . '&width=770&height=660&TB_iframe=true" class="thickbox" >'; |
|
152 | + echo '<span class="wpi-product-info">' . __('More info', 'invoicing') . '</span>'; |
|
153 | 153 | echo '</a>'; |
154 | - }elseif(isset($addon->info->link) && substr( $addon->info->link, 0, 23 ) === "https://wpinvoicing.com"){ |
|
155 | - if(defined('WP_EASY_UPDATES_ACTIVE')){ |
|
156 | - $url = admin_url('/plugin-install.php?tab=plugin-information&plugin='.$addon->info->slug.'&width=770&height=660&item_id='.$addon->info->id.'&update_url=https://wpinvoicing.com&TB_iframe=true'); |
|
157 | - }else{ |
|
154 | + }elseif (isset($addon->info->link) && substr($addon->info->link, 0, 23) === "https://wpinvoicing.com") { |
|
155 | + if (defined('WP_EASY_UPDATES_ACTIVE')) { |
|
156 | + $url = admin_url('/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug . '&width=770&height=660&item_id=' . $addon->info->id . '&update_url=https://wpinvoicing.com&TB_iframe=true'); |
|
157 | + } else { |
|
158 | 158 | // if installed show activation link |
159 | - if(isset($installed_plugins['wp-easy-updates/external-updates.php'])){ |
|
159 | + if (isset($installed_plugins['wp-easy-updates/external-updates.php'])) { |
|
160 | 160 | $url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-activation'; |
161 | - }else{ |
|
161 | + } else { |
|
162 | 162 | $url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-for-external'; |
163 | 163 | } |
164 | 164 | } |
165 | - echo '<a href="'.$url.'" class="thickbox">'; |
|
166 | - echo '<span class="wpi-product-info">'.__('More info','invoicing').'</span>'; |
|
165 | + echo '<a href="' . $url . '" class="thickbox">'; |
|
166 | + echo '<span class="wpi-product-info">' . __('More info', 'invoicing') . '</span>'; |
|
167 | 167 | echo '</a>'; |
168 | 168 | } |
169 | 169 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | |
175 | 175 | <span class="wpi-product-button"> |
176 | 176 | <?php |
177 | - $addon_obj->output_button( $addon ); |
|
177 | + $addon_obj->output_button($addon); |
|
178 | 178 | ?> |
179 | 179 | </span> |
180 | 180 | |
@@ -188,21 +188,21 @@ discard block |
||
188 | 188 | |
189 | 189 | <div class="clearfix" ></div> |
190 | 190 | |
191 | - <?php if($current_tab =='addons'){ ?> |
|
192 | - <p><?php printf( __( 'All of our Invoicing Addons can be found on WPInvoicing.com here: <a href="%s">Invoicing Addons</a>', 'invoicing' ), 'https://wpinvoicing.com/downloads/category/addons/' ); ?></p> |
|
193 | - <?php } if($current_tab =='gateways'){ ?> |
|
194 | - <p><?php printf( __( 'All of our Invoicing Payment Gateways can be found on WPInvoicing.com here: <a href="%s">Invoicing Payment Gateways</a>', 'invoicing' ), 'https://wpinvoicing.com/downloads/category/gateways/' ); ?></p> |
|
191 | + <?php if ($current_tab == 'addons') { ?> |
|
192 | + <p><?php printf(__('All of our Invoicing Addons can be found on WPInvoicing.com here: <a href="%s">Invoicing Addons</a>', 'invoicing'), 'https://wpinvoicing.com/downloads/category/addons/'); ?></p> |
|
193 | + <?php } if ($current_tab == 'gateways') { ?> |
|
194 | + <p><?php printf(__('All of our Invoicing Payment Gateways can be found on WPInvoicing.com here: <a href="%s">Invoicing Payment Gateways</a>', 'invoicing'), 'https://wpinvoicing.com/downloads/category/gateways/'); ?></p> |
|
195 | 195 | <?php } ?> |
196 | 196 | |
197 | - <div id="wpi-wpeu-required-activation" style="display:none;"><span class="wpi-notification "><?php printf( __("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s'>activate</a> it now.",'invoicing'),wp_nonce_url(admin_url('plugins.php?action=activate&plugin=wp-easy-updates/external-updates.php'), 'activate-plugin_wp-easy-updates/external-updates.php'));?></span></div> |
|
198 | - <div id="wpi-wpeu-required-for-external" style="display:none;"><span class="wpi-notification "><?php printf( __("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s' onclick='window.open(\"https://wpeasyupdates.com/wp-easy-updates.zip\", \"_blank\");' >download</a> and install it now.",'invoicing'),admin_url("plugin-install.php?tab=upload&wpeu-install=true"));?></span></div> |
|
197 | + <div id="wpi-wpeu-required-activation" style="display:none;"><span class="wpi-notification "><?php printf(__("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s'>activate</a> it now.", 'invoicing'), wp_nonce_url(admin_url('plugins.php?action=activate&plugin=wp-easy-updates/external-updates.php'), 'activate-plugin_wp-easy-updates/external-updates.php')); ?></span></div> |
|
198 | + <div id="wpi-wpeu-required-for-external" style="display:none;"><span class="wpi-notification "><?php printf(__("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s' onclick='window.open(\"https://wpeasyupdates.com/wp-easy-updates.zip\", \"_blank\");' >download</a> and install it now.", 'invoicing'), admin_url("plugin-install.php?tab=upload&wpeu-install=true")); ?></span></div> |
|
199 | 199 | <div id="wpeu-licence-popup" style="display:none;"> |
200 | 200 | <span class="wpi-notification noti-white"> |
201 | - <h3 class="wpeu-licence-title"><?php _e("Licence key",'invoicing');?></h3> |
|
202 | - <input class="wpeu-licence-key" type="text" placeholder="<?php _e("Enter your licence key",'invoicing');?>"> <button class="button-primary wpeu-licence-popup-button" ><?php _e("Install",'invoicing');?></button> |
|
201 | + <h3 class="wpeu-licence-title"><?php _e("Licence key", 'invoicing'); ?></h3> |
|
202 | + <input class="wpeu-licence-key" type="text" placeholder="<?php _e("Enter your licence key", 'invoicing'); ?>"> <button class="button-primary wpeu-licence-popup-button" ><?php _e("Install", 'invoicing'); ?></button> |
|
203 | 203 | <br> |
204 | 204 | <?php |
205 | - echo sprintf( __('%sFind your licence key here%s OR %sBuy one here%s', 'invoicing'), '<a href="https://wpinvoicing.com/your-account/" target="_blank">','</a>','<a class="wpeu-licence-link" href="https://wpinvoicing.com/downloads/category/addons/" target="_blank">','</a>' ); |
|
205 | + echo sprintf(__('%sFind your licence key here%s OR %sBuy one here%s', 'invoicing'), '<a href="https://wpinvoicing.com/your-account/" target="_blank">', '</a>', '<a class="wpeu-licence-link" href="https://wpinvoicing.com/downloads/category/addons/" target="_blank">', '</a>'); |
|
206 | 206 | ?> |
207 | 207 | </span> |
208 | 208 | </div> |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | return false; |
343 | 343 | } |
344 | 344 | if (null !== $this->apcuPrefix) { |
345 | - $file = apcu_fetch($this->apcuPrefix.$class, $hit); |
|
345 | + $file = apcu_fetch($this->apcuPrefix . $class, $hit); |
|
346 | 346 | if ($hit) { |
347 | 347 | return $file; |
348 | 348 | } |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | if (null !== $this->apcuPrefix) { |
359 | - apcu_add($this->apcuPrefix.$class, $file); |
|
359 | + apcu_add($this->apcuPrefix . $class, $file); |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | if (false === $file) { |