| @@ -8,8 +8,13 @@ | ||
| 8 | 8 | * |
| 9 | 9 | * @since 1.7 |
| 10 | 10 | */ |
| 11 | 11 | class PLL_Install_Base { |
| 12 | + /** | |
| 13 | + * The plugin basename. | |
| 14 | + * | |
| 15 | + * @var string | |
| 16 | + */ | |
| 12 | 17 | protected $plugin_basename; |
| 13 | 18 | |
| 14 | 19 | /** |
| 15 | 20 | * Constructor |
| @@ -46,8 +51,9 @@ | ||
| 46 | 51 | * @since 1.2 |
| 47 | 52 | * |
| 48 | 53 | * @param string $what Either 'activate' or 'deactivate' |
| 49 | 54 | * @param bool $networkwide |
| 55 | + * @return void | |
| 50 | 56 | */ |
| 51 | 57 | protected function do_for_all_blogs( $what, $networkwide ) { |
| 52 | 58 | // Network |
| 53 | 59 | if ( is_multisite() && $networkwide ) { |
| @@ -71,8 +77,9 @@ | ||
| 71 | 77 | * |
| 72 | 78 | * @since 1.7 |
| 73 | 79 | * |
| 74 | 80 | * @param bool $networkwide |
| 81 | + * @return void | |
| 75 | 82 | */ |
| 76 | 83 | public function activate( $networkwide ) { |
| 77 | 84 | $this->do_for_all_blogs( 'activate', $networkwide ); |
| 78 | 85 | } |
| @@ -80,8 +87,10 @@ | ||
| 80 | 87 | /** |
| 81 | 88 | * Plugin activation |
| 82 | 89 | * |
| 83 | 90 | * @since 0.5 |
| 91 | + * | |
| 92 | + * @return void | |
| 84 | 93 | */ |
| 85 | 94 | protected function _activate() { |
| 86 | 95 | // Can be overriden in child class |
| 87 | 96 | } |
| @@ -91,8 +100,9 @@ | ||
| 91 | 100 | * |
| 92 | 101 | * @since 0.1 |
| 93 | 102 | * |
| 94 | 103 | * @param bool $networkwide |
| 104 | + * @return void | |
| 95 | 105 | */ |
| 96 | 106 | public function deactivate( $networkwide ) { |
| 97 | 107 | $this->do_for_all_blogs( 'deactivate', $networkwide ); |
| 98 | 108 | } |
| @@ -100,8 +110,10 @@ | ||
| 100 | 110 | /** |
| 101 | 111 | * Plugin deactivation |
| 102 | 112 | * |
| 103 | 113 | * @since 0.5 |
| 114 | + * | |
| 115 | + * @return void | |
| 104 | 116 | */ |
| 105 | 117 | protected function _deactivate() { |
| 106 | 118 | // Can be overriden in child class |
| 107 | 119 | } |
| @@ -111,8 +123,9 @@ | ||
| 111 | 123 | * |
| 112 | 124 | * @since 2.6.8 |
| 113 | 125 | * |
| 114 | 126 | * @param WP_Site $new_site New site object. |
| 127 | + * @return void | |
| 115 | 128 | */ |
| 116 | 129 | public function new_site( $new_site ) { |
| 117 | 130 | switch_to_blog( $new_site->id ); |
| 118 | 131 | $this->_activate(); |