PluginProbe
WPIDE – File Manager & Code Editor / 3.5.9
WPIDE – File Manager & Code Editor v3.5.9
3.5.9 3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 All 55 releases
← All changes | freemius/includes/managers/class-fs-plugin-manager.php +17 -4 3.13.5.9 View file →
@@ -210,11 +210,24 @@
210 210 *
211 211 * @return bool|\FS_Plugin
212 212 */
213 213 function get() {
214 - return isset( $this->_module ) ?
215 - $this->_module :
216 - false;
217 - }
214 + if ( isset( $this->_module ) ) {
215 + return $this->_module;
216 + }
218 217
218 + if ( empty( $this->_module_id ) ) {
219 + return false;
220 + }
219 221
222 + /**
223 + * Return an FS_Plugin entity that has its `id` and `is_live` properties set (`is_live` is initialized in the FS_Plugin constructor) to avoid triggering an error that is relevant to these properties when the FS_Plugin entity is used before the `parse_settings()` method is called. This can happen when creating a regular WordPress site by cloning a subsite of a multisite network and the data that is stored in the network-level storage is not cloned.
224 + *
225 + * @author Leo Fajardo (@leorw)
226 + * @since 2.5.0
227 + */
228 + $plugin = new FS_Plugin();
229 + $plugin->id = $this->_module_id;
230 +
231 + return $plugin;
232 + }
220 233 }