@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * Constructor. |
36 | 36 | */ |
37 | 37 | public function __construct() { |
38 | - $this->load_classes(); |
|
38 | + $this->load_classes(); |
|
39 | 39 | |
40 | 40 | } |
41 | 41 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @return object \lsx\sharing\classes\Frontend() A single instance of this class. |
48 | 48 | */ |
49 | 49 | public static function get_instance() { |
50 | - // If the single instance hasn't been set, set it now. |
|
50 | + // If the single instance hasn't been set, set it now. |
|
51 | 51 | if ( null == self::$instance ) { |
52 | 52 | self::$instance = new self(); |
53 | 53 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * Loads the plugin functions. |
59 | 59 | */ |
60 | 60 | private function load_classes() { |
61 | - include_once LSX_SHARING_PATH . '/classes/frontend/class-button.php'; |
|
61 | + include_once LSX_SHARING_PATH . '/classes/frontend/class-button.php'; |
|
62 | 62 | include_once LSX_SHARING_PATH . '/classes/frontend/class-output.php'; |
63 | 63 | $this->output = \lsx\sharing\classes\frontend\Output::get_instance(); |
64 | 64 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * Backwards compatabile function for the sharing buttons. |
68 | 68 | */ |
69 | 69 | public function sharing_buttons( $buttons = array( 'facebook', 'twitter', 'pinterest' ), $echo = false, $post_id = false ) { |
70 | - wc_deprecated_function('LSX_Sharing_Frontend::sharing_buttons()', '1.2.0', 'lsx_sharing()->frontend->output->sharing_buttons()'); |
|
70 | + wc_deprecated_function('LSX_Sharing_Frontend::sharing_buttons()', '1.2.0', 'lsx_sharing()->frontend->output->sharing_buttons()'); |
|
71 | 71 | $this->output->sharing_buttons($buttons, $echo, $post_id); |
72 | 72 | } |
73 | 73 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * |
13 | 13 | * @package lsx-sharing |
14 | 14 | */ |
15 | -class Frontend { |
|
15 | +class Frontend{ |
|
16 | 16 | |
17 | 17 | |
18 | 18 | /** |
@@ -22,19 +22,19 @@ discard block |
||
22 | 22 | * |
23 | 23 | * @var object \lsx\sharing\classes\Frontend() |
24 | 24 | */ |
25 | - protected static $instance = null; |
|
25 | + protected static $instance=null; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Holds the output class. |
29 | 29 | * |
30 | 30 | * @var object \lsx\sharing\classes\frontend\Output() |
31 | 31 | */ |
32 | - public $output = null; |
|
32 | + public $output=null; |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Constructor. |
36 | 36 | */ |
37 | - public function __construct() { |
|
37 | + public function __construct(){ |
|
38 | 38 | $this->load_classes(); |
39 | 39 | |
40 | 40 | } |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | * |
47 | 47 | * @return object \lsx\sharing\classes\Frontend() A single instance of this class. |
48 | 48 | */ |
49 | - public static function get_instance() { |
|
49 | + public static function get_instance(){ |
|
50 | 50 | // If the single instance hasn't been set, set it now. |
51 | - if ( null == self::$instance ) { |
|
52 | - self::$instance = new self(); |
|
51 | + if(null==self::$instance){ |
|
52 | + self::$instance=new self(); |
|
53 | 53 | } |
54 | 54 | return self::$instance; |
55 | 55 | } |
@@ -57,17 +57,17 @@ discard block |
||
57 | 57 | /** |
58 | 58 | * Loads the plugin functions. |
59 | 59 | */ |
60 | - private function load_classes() { |
|
61 | - include_once LSX_SHARING_PATH . '/classes/frontend/class-button.php'; |
|
62 | - include_once LSX_SHARING_PATH . '/classes/frontend/class-output.php'; |
|
63 | - $this->output = \lsx\sharing\classes\frontend\Output::get_instance(); |
|
60 | + private function load_classes(){ |
|
61 | + include_once LSX_SHARING_PATH.'/classes/frontend/class-button.php'; |
|
62 | + include_once LSX_SHARING_PATH.'/classes/frontend/class-output.php'; |
|
63 | + $this->output=\lsx\sharing\classes\frontend\Output::get_instance(); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Backwards compatabile function for the sharing buttons. |
68 | 68 | */ |
69 | - public function sharing_buttons( $buttons = array( 'facebook', 'twitter', 'pinterest' ), $echo = false, $post_id = false ) { |
|
70 | - wc_deprecated_function('LSX_Sharing_Frontend::sharing_buttons()', '1.2.0', 'lsx_sharing()->frontend->output->sharing_buttons()'); |
|
71 | - $this->output->sharing_buttons($buttons, $echo, $post_id); |
|
69 | + public function sharing_buttons($buttons=array('facebook','twitter','pinterest'),$echo=false,$post_id=false){ |
|
70 | + wc_deprecated_function('LSX_Sharing_Frontend::sharing_buttons()','1.2.0','lsx_sharing()->frontend->output->sharing_buttons()'); |
|
71 | + $this->output->sharing_buttons($buttons,$echo,$post_id); |
|
72 | 72 | } |
73 | 73 | } |