You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can call anySDK methods by prefixing them with the shortcode function for your particular plugin/theme (specified when completing the SDK integration form in the Developer Dashboard):
96
+
You can call any SDK methods by prefixing them with the shortcode function for your particular plugin/theme (specified when completing the SDK integration form in the Developer Dashboard):
97
97
98
98
```php
99
99
<?php my_prefix_fs()->get_upgrade_url(); ?>
@@ -110,9 +110,9 @@ Or when calling Freemius multiple times in a scope, it's recommended to use it w
110
110
111
111
There are many other SDK methods available that you can use to enhance the functionality of your WordPress product. Some of the more common use-cases are covered in the [Freemius SDK Gists](https://freemius.com/help/documentation/wordpress-sdk/gists/) documentation.
112
112
113
-
## Adding licensebased logic examples
113
+
## Adding license-based logic examples
114
114
115
-
Add marketing content to encourage your users to upgrade for your paid version:
115
+
Add marketing content that encourages your users to upgrade to a paid version:
116
116
117
117
```php
118
118
<?php
@@ -139,7 +139,7 @@ Add logic which will only be available in your premium plugin version:
139
139
?>
140
140
```
141
141
142
-
To add a function which will only be available in your premium plugin version, simply add __premium_only as the suffix of the function name. Just make sure that all lines that call that method directly or by hooks, are also wrapped in premium only logic:
142
+
To add a function which will only be available in your premium plugin version, add `__premium_only` as the suffix of the function name. Ensure that all lines that call that method directly or by hooks, are also wrapped in premium only logic:
143
143
144
144
```php
145
145
<?php
@@ -234,7 +234,7 @@ Add logic for specified paid plan:
234
234
## Excluding files and folders from the free plugin version
235
235
There are [two ways](https://freemius.com/help/documentation/wordpress-sdk/software-licensing/#excluding_files_and_folders_from_the_free_plugin_version) to exclude files from your free version.
236
236
237
-
1. Add `__premium_only` just before the file extension. For example, functions__premium_only.php will be only included in the premium plugin version. This works for all types of files, not only PHP.
237
+
1. Add `__premium_only` just before the file extension. For example, functions__premium_only.php will be included only in the premium plugin version. This works for all types of files, not only PHP.
238
238
2. Add `@fs_premium_only` a special meta tag to the plugin's main PHP file header. Example:
239
239
```php
240
240
<?php
@@ -261,7 +261,10 @@ There are [two ways](https://freemius.com/help/documentation/wordpress-sdk/softw
261
261
```
262
262
In the example plugin header above, the file `/lib/functions.php` and the directory `/premium-files/` will be removed from the free plugin version.
263
263
264
-
# WordPress.org Compliance
264
+
## Hooks: Actions and Filters
265
+
Similar to WordPress’ filters and actions hooks, the Freemius WordPress SDK provides a [collection of filters and actions](https://freemius.com/help/documentation/wordpress-sdk/filters-actions-hooks/) that enable you to customize and extend its functionality in your WordPress plugins or themes.
266
+
267
+
## WordPress.org Compliance
265
268
Based on [WordPress.org Guidelines](https://wordpress.org/plugins/about/guidelines/) you are not allowed to submit a plugin that has premium code in it:
266
269
> All code hosted by WordPress.org servers must be free and fully-functional. If you want to sell advanced features for a plugin (such as a "pro" version), then you must sell and serve that code from your own site, we will not host it on our servers.
0 commit comments