Plugin Directory

Changeset 2783411


Ignore:
Timestamp:
09/12/2022 01:02:44 PM (4 years ago)
Author:
bahson
Message:

Update to version 1.0.2 from GitHub

Location:
flair-antispam
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • flair-antispam/tags/1.0.2/admin/admin.php

    r2782661 r2783411  
    88{
    99    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"),
    1212        'manage_options',
    1313        'flair-antispam-settings-page',
    1414        'flair_antispam_admin_index',
    15             null);
     15        null);
    1616}
    1717
     
    1919function flair_antispam_settings_init(): void
    2020{
    21     // Setup settings section
     21    // Setup settings section
    2222    add_settings_section(
    2323        'flair_antispam_settings_section',
     
    2929    // Register form fields
    3030
    31     // app_id
     31    // phrases
    3232    register_setting(
    3333        'flair-antispam-settings-page',
     
    5454    $options = get_option('flair_antispam_settings_phrases');
    5555    ?>
    56     <div class="flair-antispam-settings-phrases">
     56    <div class="flair-antispam-settings-phrases">
    5757        <label for="flair_antispam_settings_phrases">
    5858            Words or phrases to look for, comma separated, no spaces unless you want to include them too.
     
    6969        <div>
    7070            Current pattern according to settings: '
    71             <?php
    72                 $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            ?> '
    7676        </div>
    7777    </div>
     
    8383{
    8484    ?>
    85     <div class="wrap">
    86         <form action="options.php" method="post">
     85    <div class="wrap">
     86        <form action="options.php" method="post">
    8787            <?php
    8888
     
    9898
    9999            ?>
    100         </form>
     100        </form>
    101101        <div class="phrases-example-hints">
    102102            <p>Example 1: wolf,moon,what will be converted to /(wolf|moon|what)/i</p>
    103103            <p>Example 2: wolf, moon, what will be converted to /(wolf| moon| what)/i</p>
    104104        </div>
    105     </div>
     105    </div>
    106106    <?php
    107107}
  • flair-antispam/tags/1.0.2/flair-antispam.php

    r2782665 r2783411  
    33/**
    44 * 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.
    66 * Requires at least: 5.7
    77 * Tested up to: 6.0
    8  * Stable tag: 1.0.0
    98 * Requires PHP:      7.0
    10  * Version:           1.0.1
     9 * Version:           1.0.2
    1110 * Author:            Nicholas Babu
    1211 * Author URI:        https://profiles.wordpress.org/bahson/
     
    103102                    $this->create_entry( $post_id, 'post' );
    104103
     104                    // Fires this event throughout the app.
     105                    do_action('flair_antispam_post', $post);
     106
    105107                } else {
    106108                    $wpdb
     
    131133                    // re-hook this function
    132134                    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);
    133138                } else {
    134139                    $wpdb
  • flair-antispam/tags/1.0.2/readme.md

    r2782665 r2783411  
    66* Requires at least: 5.6
    77* Tested up to: 6.0
    8 * Stable tag: 1.0.1
     8* Stable tag: 1.0.2
    99* Requires PHP: 7.0
    1010* License: GPLv2 or later
    1111* License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1212
    13 Filter and unpublish spam contents (posts/comments) and provides a way to analyze the spam content.
     13Filter and unpublish contents (posts/comments) according to defined patterns and provides
     14a way to analyze the unpublished content.
     15
    1416
    1517## Description
    1618
    17 This WordPress plugin provides a spam filter for the defined patters (words/phrases), and
     19This WordPress plugin provides a way to filter content according to the defined patters (words/phrases), and
    1820sets post status to draft, and comment status to 0 if their contents match the defined words and or phrases.
    1921
    2022You 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
    2129
    2230***
     
    4250== Screenshots ==
    43511. Configuration form example view ![Configuration form example view](/assets/screenshot-1.png).
    44 == Changelog ==
     52   == Changelog ==
    4553
    4654= 1.0.0 =
    4755First version
     56
     57= 1.0.2 =
     58Added 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  
    55Requires at least: 5.7
    66Tested up to: 6.0
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 7.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 Filter and unpublish "spam" contents (posts/comments) and provides a way to analyze the spam content.
     12Filter and unpublish contents (posts/comments) according to defined patterns and provides
     13a way to analyze the unpublished content.
    1314
    1415== Description ==
    1516
    16 This WordPress plugin provides a spam filter functionality, for the defined patters (words/phrases), and
     17This WordPress plugin provides a way to filter content according to the defined patters (words/phrases), and
    1718sets post status to draft, and comment status to 0 if their contents match the defined words and or phrases.
    1819
    1920You 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
     24contents of each site (content editor).
     25* Don't want users to use certain words/phrases in posts and comments.
    2026
    2127== Installation ==
     
    4349= 1.0.1 =
    4450Add screenshots
     51
     52= 1.0.2 =
     53Added 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  
    88{
    99    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"),
    1212        'manage_options',
    1313        'flair-antispam-settings-page',
    1414        'flair_antispam_admin_index',
    15             null);
     15        null);
    1616}
    1717
     
    1919function flair_antispam_settings_init(): void
    2020{
    21     // Setup settings section
     21    // Setup settings section
    2222    add_settings_section(
    2323        'flair_antispam_settings_section',
     
    2929    // Register form fields
    3030
    31     // app_id
     31    // phrases
    3232    register_setting(
    3333        'flair-antispam-settings-page',
     
    5454    $options = get_option('flair_antispam_settings_phrases');
    5555    ?>
    56     <div class="flair-antispam-settings-phrases">
     56    <div class="flair-antispam-settings-phrases">
    5757        <label for="flair_antispam_settings_phrases">
    5858            Words or phrases to look for, comma separated, no spaces unless you want to include them too.
     
    6969        <div>
    7070            Current pattern according to settings: '
    71             <?php
    72                 $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            ?> '
    7676        </div>
    7777    </div>
     
    8383{
    8484    ?>
    85     <div class="wrap">
    86         <form action="options.php" method="post">
     85    <div class="wrap">
     86        <form action="options.php" method="post">
    8787            <?php
    8888
     
    9898
    9999            ?>
    100         </form>
     100        </form>
    101101        <div class="phrases-example-hints">
    102102            <p>Example 1: wolf,moon,what will be converted to /(wolf|moon|what)/i</p>
    103103            <p>Example 2: wolf, moon, what will be converted to /(wolf| moon| what)/i</p>
    104104        </div>
    105     </div>
     105    </div>
    106106    <?php
    107107}
  • flair-antispam/trunk/flair-antispam.php

    r2782665 r2783411  
    33/**
    44 * 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.
    66 * Requires at least: 5.7
    77 * Tested up to: 6.0
    8  * Stable tag: 1.0.0
    98 * Requires PHP:      7.0
    10  * Version:           1.0.1
     9 * Version:           1.0.2
    1110 * Author:            Nicholas Babu
    1211 * Author URI:        https://profiles.wordpress.org/bahson/
     
    103102                    $this->create_entry( $post_id, 'post' );
    104103
     104                    // Fires this event throughout the app.
     105                    do_action('flair_antispam_post', $post);
     106
    105107                } else {
    106108                    $wpdb
     
    131133                    // re-hook this function
    132134                    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);
    133138                } else {
    134139                    $wpdb
  • flair-antispam/trunk/readme.md

    r2782665 r2783411  
    66* Requires at least: 5.6
    77* Tested up to: 6.0
    8 * Stable tag: 1.0.1
     8* Stable tag: 1.0.2
    99* Requires PHP: 7.0
    1010* License: GPLv2 or later
    1111* License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1212
    13 Filter and unpublish spam contents (posts/comments) and provides a way to analyze the spam content.
     13Filter and unpublish contents (posts/comments) according to defined patterns and provides
     14a way to analyze the unpublished content.
     15
    1416
    1517## Description
    1618
    17 This WordPress plugin provides a spam filter for the defined patters (words/phrases), and
     19This WordPress plugin provides a way to filter content according to the defined patters (words/phrases), and
    1820sets post status to draft, and comment status to 0 if their contents match the defined words and or phrases.
    1921
    2022You 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
    2129
    2230***
     
    4250== Screenshots ==
    43511. Configuration form example view ![Configuration form example view](/assets/screenshot-1.png).
    44 == Changelog ==
     52   == Changelog ==
    4553
    4654= 1.0.0 =
    4755First version
     56
     57= 1.0.2 =
     58Added 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  
    55Requires at least: 5.7
    66Tested up to: 6.0
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 7.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 Filter and unpublish "spam" contents (posts/comments) and provides a way to analyze the spam content.
     12Filter and unpublish contents (posts/comments) according to defined patterns and provides
     13a way to analyze the unpublished content.
    1314
    1415== Description ==
    1516
    16 This WordPress plugin provides a spam filter functionality, for the defined patters (words/phrases), and
     17This WordPress plugin provides a way to filter content according to the defined patters (words/phrases), and
    1718sets post status to draft, and comment status to 0 if their contents match the defined words and or phrases.
    1819
    1920You 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
     24contents of each site (content editor).
     25* Don't want users to use certain words/phrases in posts and comments.
    2026
    2127== Installation ==
     
    4349= 1.0.1 =
    4450Add screenshots
     51
     52= 1.0.2 =
     53Added 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.