Changeset 2783411
- Timestamp:
- 09/12/2022 01:02:44 PM (4 years ago)
- Location:
- flair-antispam
- Files:
-
- 8 edited
- 1 copied
-
tags/1.0.2 (copied) (copied from flair-antispam/trunk)
-
tags/1.0.2/admin/admin.php (modified) (7 diffs)
-
tags/1.0.2/flair-antispam.php (modified) (3 diffs)
-
tags/1.0.2/readme.md (modified) (2 diffs)
-
tags/1.0.2/readme.txt (modified) (2 diffs)
-
trunk/admin/admin.php (modified) (7 diffs)
-
trunk/flair-antispam.php (modified) (3 diffs)
-
trunk/readme.md (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
flair-antispam/tags/1.0.2/admin/admin.php
r2782661 r2783411 8 8 { 9 9 add_options_page( 10 __('Flair Antispam plugin', "flair-antispam"),11 __('Flair Antispam Config', "flair-antispam"),10 __('Flair Antispam plugin', "flair-antispam"), 11 __('Flair Antispam Config', "flair-antispam"), 12 12 'manage_options', 13 13 'flair-antispam-settings-page', 14 14 'flair_antispam_admin_index', 15 null);15 null); 16 16 } 17 17 … … 19 19 function flair_antispam_settings_init(): void 20 20 { 21 // Setup settings section21 // Setup settings section 22 22 add_settings_section( 23 23 'flair_antispam_settings_section', … … 29 29 // Register form fields 30 30 31 // app_id31 // phrases 32 32 register_setting( 33 33 'flair-antispam-settings-page', … … 54 54 $options = get_option('flair_antispam_settings_phrases'); 55 55 ?> 56 <div class="flair-antispam-settings-phrases">56 <div class="flair-antispam-settings-phrases"> 57 57 <label for="flair_antispam_settings_phrases"> 58 58 Words or phrases to look for, comma separated, no spaces unless you want to include them too. … … 69 69 <div> 70 70 Current pattern according to settings: ' 71 <?php72 $pattern = str_replace(',', '|', $options);73 $pattern = '/('.$pattern.')/i';74 esc_html_e( $pattern, 'flair-antispam' );75 ?> '71 <?php 72 $pattern = str_replace(',', '|', $options); 73 $pattern = '/('.$pattern.')/i'; 74 esc_html_e( $pattern, 'flair-antispam' ); 75 ?> ' 76 76 </div> 77 77 </div> … … 83 83 { 84 84 ?> 85 <div class="wrap">86 <form action="options.php" method="post">85 <div class="wrap"> 86 <form action="options.php" method="post"> 87 87 <?php 88 88 … … 98 98 99 99 ?> 100 </form>100 </form> 101 101 <div class="phrases-example-hints"> 102 102 <p>Example 1: wolf,moon,what will be converted to /(wolf|moon|what)/i</p> 103 103 <p>Example 2: wolf, moon, what will be converted to /(wolf| moon| what)/i</p> 104 104 </div> 105 </div>105 </div> 106 106 <?php 107 107 } -
flair-antispam/tags/1.0.2/flair-antispam.php
r2782665 r2783411 3 3 /** 4 4 * Plugin Name: Flair Antispam 5 * Description: Filter and unpublish spam contents (posts/comments)and provides a way to analyze the spam content.5 * Description: Filter and unpublish contents (posts/comments) based of defined words/phrases and provides a way to analyze the spam content. 6 6 * Requires at least: 5.7 7 7 * Tested up to: 6.0 8 * Stable tag: 1.0.09 8 * Requires PHP: 7.0 10 * Version: 1.0. 19 * Version: 1.0.2 11 10 * Author: Nicholas Babu 12 11 * Author URI: https://profiles.wordpress.org/bahson/ … … 103 102 $this->create_entry( $post_id, 'post' ); 104 103 104 // Fires this event throughout the app. 105 do_action('flair_antispam_post', $post); 106 105 107 } else { 106 108 $wpdb … … 131 133 // re-hook this function 132 134 add_action( 'comment_post', array( $this, 'is_spam_comment' ), 10, 2 ); 135 136 // Fires this event throughout the app. 137 do_action('flair_antispam_post', $comment); 133 138 } else { 134 139 $wpdb -
flair-antispam/tags/1.0.2/readme.md
r2782665 r2783411 6 6 * Requires at least: 5.6 7 7 * Tested up to: 6.0 8 * Stable tag: 1.0. 18 * Stable tag: 1.0.2 9 9 * Requires PHP: 7.0 10 10 * License: GPLv2 or later 11 11 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 12 12 13 Filter and unpublish spam contents (posts/comments) and provides a way to analyze the spam content. 13 Filter and unpublish contents (posts/comments) according to defined patterns and provides 14 a way to analyze the unpublished content. 15 14 16 15 17 ## Description 16 18 17 This WordPress plugin provides a spam filter forthe defined patters (words/phrases), and19 This WordPress plugin provides a way to filter content according to the defined patters (words/phrases), and 18 20 sets post status to draft, and comment status to 0 if their contents match the defined words and or phrases. 19 21 20 22 You can filter contents by any rules, and for all roles in your WordPress website/application. 23 24 *USE CASES INCLUDE:* 25 * You run multiple sites associated with multiple brands, and don't want to mix brand names(contents) in the 26 contents of each site (content editor). 27 * Don't want users to use certain words/phrases in posts and comments. 28 21 29 22 30 *** … … 42 50 == Screenshots == 43 51 1. Configuration form example view . 44 == Changelog ==52 == Changelog == 45 53 46 54 = 1.0.0 = 47 55 First version 56 57 = 1.0.2 = 58 Added do_actions, when such content is posted so other plugins can build on that. see docs.md for more. -
flair-antispam/tags/1.0.2/readme.txt
r2782665 r2783411 5 5 Requires at least: 5.7 6 6 Tested up to: 6.0 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Filter and unpublish "spam" contents (posts/comments) and provides a way to analyze the spam content. 12 Filter and unpublish contents (posts/comments) according to defined patterns and provides 13 a way to analyze the unpublished content. 13 14 14 15 == Description == 15 16 16 This WordPress plugin provides a spam filter functionality, forthe defined patters (words/phrases), and17 This WordPress plugin provides a way to filter content according to the defined patters (words/phrases), and 17 18 sets post status to draft, and comment status to 0 if their contents match the defined words and or phrases. 18 19 19 20 You can filter contents by any rules, and for all roles in your WordPress website/application. 21 22 *USE CASES INCLUDE:* 23 * You run multiple sites associated with multiple brands, and don't want to mix brand names in the 24 contents of each site (content editor). 25 * Don't want users to use certain words/phrases in posts and comments. 20 26 21 27 == Installation == … … 43 49 = 1.0.1 = 44 50 Add screenshots 51 52 = 1.0.2 = 53 Added do_actions, when such content is posted so other plugins can build on that. see docs.md for more. -
flair-antispam/trunk/admin/admin.php
r2782661 r2783411 8 8 { 9 9 add_options_page( 10 __('Flair Antispam plugin', "flair-antispam"),11 __('Flair Antispam Config', "flair-antispam"),10 __('Flair Antispam plugin', "flair-antispam"), 11 __('Flair Antispam Config', "flair-antispam"), 12 12 'manage_options', 13 13 'flair-antispam-settings-page', 14 14 'flair_antispam_admin_index', 15 null);15 null); 16 16 } 17 17 … … 19 19 function flair_antispam_settings_init(): void 20 20 { 21 // Setup settings section21 // Setup settings section 22 22 add_settings_section( 23 23 'flair_antispam_settings_section', … … 29 29 // Register form fields 30 30 31 // app_id31 // phrases 32 32 register_setting( 33 33 'flair-antispam-settings-page', … … 54 54 $options = get_option('flair_antispam_settings_phrases'); 55 55 ?> 56 <div class="flair-antispam-settings-phrases">56 <div class="flair-antispam-settings-phrases"> 57 57 <label for="flair_antispam_settings_phrases"> 58 58 Words or phrases to look for, comma separated, no spaces unless you want to include them too. … … 69 69 <div> 70 70 Current pattern according to settings: ' 71 <?php72 $pattern = str_replace(',', '|', $options);73 $pattern = '/('.$pattern.')/i';74 esc_html_e( $pattern, 'flair-antispam' );75 ?> '71 <?php 72 $pattern = str_replace(',', '|', $options); 73 $pattern = '/('.$pattern.')/i'; 74 esc_html_e( $pattern, 'flair-antispam' ); 75 ?> ' 76 76 </div> 77 77 </div> … … 83 83 { 84 84 ?> 85 <div class="wrap">86 <form action="options.php" method="post">85 <div class="wrap"> 86 <form action="options.php" method="post"> 87 87 <?php 88 88 … … 98 98 99 99 ?> 100 </form>100 </form> 101 101 <div class="phrases-example-hints"> 102 102 <p>Example 1: wolf,moon,what will be converted to /(wolf|moon|what)/i</p> 103 103 <p>Example 2: wolf, moon, what will be converted to /(wolf| moon| what)/i</p> 104 104 </div> 105 </div>105 </div> 106 106 <?php 107 107 } -
flair-antispam/trunk/flair-antispam.php
r2782665 r2783411 3 3 /** 4 4 * Plugin Name: Flair Antispam 5 * Description: Filter and unpublish spam contents (posts/comments)and provides a way to analyze the spam content.5 * Description: Filter and unpublish contents (posts/comments) based of defined words/phrases and provides a way to analyze the spam content. 6 6 * Requires at least: 5.7 7 7 * Tested up to: 6.0 8 * Stable tag: 1.0.09 8 * Requires PHP: 7.0 10 * Version: 1.0. 19 * Version: 1.0.2 11 10 * Author: Nicholas Babu 12 11 * Author URI: https://profiles.wordpress.org/bahson/ … … 103 102 $this->create_entry( $post_id, 'post' ); 104 103 104 // Fires this event throughout the app. 105 do_action('flair_antispam_post', $post); 106 105 107 } else { 106 108 $wpdb … … 131 133 // re-hook this function 132 134 add_action( 'comment_post', array( $this, 'is_spam_comment' ), 10, 2 ); 135 136 // Fires this event throughout the app. 137 do_action('flair_antispam_post', $comment); 133 138 } else { 134 139 $wpdb -
flair-antispam/trunk/readme.md
r2782665 r2783411 6 6 * Requires at least: 5.6 7 7 * Tested up to: 6.0 8 * Stable tag: 1.0. 18 * Stable tag: 1.0.2 9 9 * Requires PHP: 7.0 10 10 * License: GPLv2 or later 11 11 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 12 12 13 Filter and unpublish spam contents (posts/comments) and provides a way to analyze the spam content. 13 Filter and unpublish contents (posts/comments) according to defined patterns and provides 14 a way to analyze the unpublished content. 15 14 16 15 17 ## Description 16 18 17 This WordPress plugin provides a spam filter forthe defined patters (words/phrases), and19 This WordPress plugin provides a way to filter content according to the defined patters (words/phrases), and 18 20 sets post status to draft, and comment status to 0 if their contents match the defined words and or phrases. 19 21 20 22 You can filter contents by any rules, and for all roles in your WordPress website/application. 23 24 *USE CASES INCLUDE:* 25 * You run multiple sites associated with multiple brands, and don't want to mix brand names(contents) in the 26 contents of each site (content editor). 27 * Don't want users to use certain words/phrases in posts and comments. 28 21 29 22 30 *** … … 42 50 == Screenshots == 43 51 1. Configuration form example view . 44 == Changelog ==52 == Changelog == 45 53 46 54 = 1.0.0 = 47 55 First version 56 57 = 1.0.2 = 58 Added do_actions, when such content is posted so other plugins can build on that. see docs.md for more. -
flair-antispam/trunk/readme.txt
r2782665 r2783411 5 5 Requires at least: 5.7 6 6 Tested up to: 6.0 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Filter and unpublish "spam" contents (posts/comments) and provides a way to analyze the spam content. 12 Filter and unpublish contents (posts/comments) according to defined patterns and provides 13 a way to analyze the unpublished content. 13 14 14 15 == Description == 15 16 16 This WordPress plugin provides a spam filter functionality, forthe defined patters (words/phrases), and17 This WordPress plugin provides a way to filter content according to the defined patters (words/phrases), and 17 18 sets post status to draft, and comment status to 0 if their contents match the defined words and or phrases. 18 19 19 20 You can filter contents by any rules, and for all roles in your WordPress website/application. 21 22 *USE CASES INCLUDE:* 23 * You run multiple sites associated with multiple brands, and don't want to mix brand names in the 24 contents of each site (content editor). 25 * Don't want users to use certain words/phrases in posts and comments. 20 26 21 27 == Installation == … … 43 49 = 1.0.1 = 44 50 Add screenshots 51 52 = 1.0.2 = 53 Added do_actions, when such content is posted so other plugins can build on that. see docs.md for more.
Note: See TracChangeset
for help on using the changeset viewer.