PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 3.1.0
Defender Security – Malware Scanner, Login Security & Firewall v3.1.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / extra / free-dashboard / README.md

README.md in Defender Security – Malware Scanner, Login Security & Firewall 3.1.0, at extra/free-dashboard/README.md

142 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # WDEV Free Notices Module #
2
3 WPMU DEV Free Notices module (short wpmu-free-notices) is used in our free plugins hosted on wordpress.org
4 It will display,
5 * A welcome message upon plugin activation that offers the user a 5-day introduction email course for the plugin.
6 * After 7 days a message asking the user to rate the plugin on wordpress.org.
7 * After 2 days a giveaway notice asking for email subscription.
8
9 # How to use it #
10
11 1. Insert this repository as **sub-module** into the existing project
12
13 2. Include the file `module.php` in your main plugin file.
14
15 3. Call the action `wpmudev_register_notices` with the params mentioned below.
16
17 4. Done!
18
19
20 # Upgrading to v2.0
21
22 The 2.0 release is backward incompatible with the 1.x versions. To accommodate new functionality and fix WordPress coding standards violations, a lot of the hooks/filters have been refactored.
23 Make sure to change the following:
24
25 1. Update the `do_action` hook name from `wdev-register-plugin` to `wpmudev_register_notices`.
26 2. Update the params to new format (See example below).
27 3. Both `wdev-email-message-` and `wdev-rating-message-` filters have been changed to `wdev_email_title_`/`wdev_email_message_` and `wdev_rating_title_`/`wdev_rating_message_`
28
29
30 ## Code Example (from Smush) ##
31
32 ```
33 #!php
34
35 <?php
36 add_action( 'admin_init', 'mycustom_free_notices_init' );
37
38 function mycustom_free_notices_init() {
39 // Load the notices module.
40 include_once 'external/free-notices/module.php';
41
42 // Register the current plugin for notices.
43 do_action(
44 'wpmudev_register_notices',
45 'smush', // Required: plugin id. Get from the below list.
46 array(
47 'basename' => WP_SMUSH_BASENAME, // Required: Plugin basename (for backward compat).
48 'title' => 'Smush', // Plugin title.
49 'wp_slug' => 'wp-smushit', // Plugin slug on wp.org
50 'cta_email' => __( 'Get Fast!', 'ga_trans' ), // Email button CTA.
51 'mc_list_id' => '4b14b58816', // Mailchimp list id for the plugin - e.g. 4b14b58816 is list id for Smush.
52 'installed_on' => time(), // Plugin installed time (timestamp). Default to current time.
53 'screens' => array( // Screen IDs of plugin pages.
54 'toplevel_page_smush',
55 'smush_page_smush-bulk',
56 'smush_page_smush-directory',
57 ),
58 )
59 );
60 }
61 ```
62
63 > IMPORTANT: Make sure to initialize this on a hook which is executed in admin-ajax requests too. The recommended hook is `admin_init`
64
65 ## Plugins and IDs
66 Only wp.org plugins are listed below.
67
68 | Plugin | ID |
69 |-------------|-------------|
70 | Smush | smush |
71 | Hummingbird | hummingbird |
72 | Defender | defender |
73 | SmartCrawl | smartcrawl |
74 | Forminator | forminator |
75 | Hustle | hustle |
76 | Snapshot | snapshot |
77 | Branda | branda |
78 | Beehive | beehive |
79
80
81 ## Testing Notices
82
83 To see the notices before the due time, you can fake the current time by appending `&wpmudev_notice_time=CUSTOMTIMESTAMP` to the url on a page where the notice should be visible. Please make sure you are using a timestamp after the due time.
84
85 ## Optional: Customize the messages via filters ##
86
87 ```
88 <?php
89 // The email message contains 1 variable: plugin-name
90 add_filter(
91 'wdev_email_message_smush', // change plugin id.
92 'custom_email_message'
93 );
94 function custom_email_message( $message ) {
95 $message = 'You installed %s! This is a custom <u>email message</u>';
96 return $message;
97 }
98 ```
99
100 ```
101 <?php
102 // The rating message contains 2 variables: user-name, plugin-name
103 add_filter(
104 'wdev_rating_message_smush', // Change plugin id.
105 'custom_rating_message'
106 );
107 function custom_rating_message( $message ) {
108 $message = 'Hi %s, you used %s for a while now! This is a custom <u>rating message</u>';
109 return $message;
110 }
111 ```
112
113 # Development
114
115 Do not commit anything directly to `master` branch. The `master` branch should always be production ready. All plugins will be using it as a submodule.
116
117 ## Build Tasks (npm)
118
119 Everything should be handled by npm. Note that you don't need to interact with Gulp in a direct way.
120
121 | Command | Action |
122 |----------------------|--------------------------------------------------------|
123 | `npm run watch` | Compiles and watch for changes. |
124 | `npm run compile` | Compile production ready assets. |
125 | `npm run build` | Build production ready submodule inside `/build/` folder |
126
127 ## Git Workflow
128
129 - Create a new branch from `dev` branch: `git checkout -b branch-name`. Try to give it a descriptive name. For example:
130 - `release/X.X.X` for next releases
131 - `new/some-feature` for new features
132 - `enhance/some-enhancement` for enhancements
133 - `fix/some-bug` for bug fixing
134 - Make your commits and push the new branch: `git push -u origin branch-name`
135 - File the new Pull Request against `dev` branch
136 - Assign somebody to review your code.
137 - Once the PR is approved and finished, merge it in `dev` branch.
138 - Checkout `dev` branch.
139 - Run `npm run build` and copy all files and folders from the `build` folder.
140 - Checkout `master` branch and replace all files and folders with copied content from the build folder.
141 - Commit and push the `master` branch changes.
142 - Inform all devs to update the submodule.