PluginProbe
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites / trunk
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites vtrunk
4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 2.6.1 All 38 releases
← All changes | freemius/includes/managers/class-fs-plugin-manager.php +17 -4 1.3.0trunk 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 }