| @@ -92,9 +92,9 @@ | ||
| 92 | 92 | ``` |
| 93 | 93 | |
| 94 | 94 | ## Usage example |
| 95 | 95 | |
| 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): | |
| 96 | +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): | |
| 97 | 97 | |
| 98 | 98 | ```php |
| 99 | 99 | <?php my_prefix_fs()->get_upgrade_url(); ?> |
| 100 | 100 | ``` |
| @@ -109,11 +109,11 @@ | ||
| 109 | 109 | ``` |
| 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 license-based logic examples | |
| 113 | +## Adding license based logic examples | |
| 114 | 114 | |
| 115 | -Add marketing content that encourages your users to upgrade to a paid version: | |
| 115 | +Add marketing content to encourage your users to upgrade for your paid version: | |
| 116 | 116 | |
| 117 | 117 | ```php |
| 118 | 118 | <?php |
| 119 | 119 | if ( my_prefix_fs()->is_not_paying() ) { |
| @@ -138,9 +138,9 @@ | ||
| 138 | 138 | } |
| 139 | 139 | ?> |
| 140 | 140 | ``` |
| 141 | 141 | |
| 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: | |
| 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: | |
| 143 | 143 | |
| 144 | 144 | ```php |
| 145 | 145 | <?php |
| 146 | 146 | class My_Plugin { |
| @@ -233,9 +233,9 @@ | ||
| 233 | 233 | |
| 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 included only 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 only included 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 |
| 241 | 241 | /** |
| @@ -260,12 +260,9 @@ | ||
| 260 | 260 | ?> |
| 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 | -## 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 | |
| 264 | +# WordPress.org Compliance | |
| 268 | 265 | 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: |
| 269 | 266 | > 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. |
| 270 | 267 | |
| 271 | 268 | Therefore, if you want to deploy your free plugin's version to WordPress.org, make sure you wrap all your premium code with `if ( my_prefix_fs()->{{ method }}__premium_only() )` or use [some of the other methods](https://freemius.com/help/documentation/wordpress-sdk/software-licensing/) provided by the SDK to exclude premium features & files from the free version. |
| @@ -282,8 +279,4 @@ | ||
| 282 | 279 | ## License |
| 283 | 280 | Copyright (c) Freemius®, Inc. |
| 284 | 281 | |
| 285 | 282 | Licensed under the GNU general public license (version 3). |
| 286 | - | |
| 287 | -## Contributing | |
| 288 | - | |
| 289 | -Please see our [contributing guide](CONTRIBUTING.md). | |