Plugin Directory

Changeset 929487


Ignore:
Timestamp:
06/10/2014 08:52:50 AM (12 years ago)
Author:
AstrizStudios
Message:

Updating the SVN repo with screenshots and fixing the trunk structure.
Adding profanity-blocker-options.php file since we have noticed that the class did not initialize properly every time during the installation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • profanityblocker-profanity-filter/trunk/profanity-blocker.php

    r929291 r929487  
    22/*
    33Plugin Name: ProfanityBlocker - Profanity Filter
    4 Plugin URI: http://profanity-blocker.com/
    5 Description: ProfanityBlocker is a cloud based service that scans for profane words - giving you control.
    6 Version: 1.0
     4Plugin URI: http://profanity-blocker.com/plugins/wordpress/
     5Description: ProfanityBlocker is a cloud based service that scans for profane (swearing/abusive) words - giving you greater control of allowed text on your site.
     6Version: 1.1
    77Author: AstrizStudios
    88Author URI: http://astrizstudios.com
    99License: GPL2
    10 
    11 Copyright 2013  AstrizStudios  (email : support@profanity-blocker.com)
     10*/
     11
     12/*  Copyright 2013  AstrizStudios  (email : support@profanity-blocker.com)
    1213
    1314    This program is free software; you can redistribute it and/or modify
     
    3536define('ASTRIZSTUDIOS_PROBLOCK_LINK_SERVICE', 'http://service.profanity-blocker.com/restServer.php');
    3637
    37 Class AstrizStudiosProBlockDefaultOptions
    38 {
    39     protected $settings = null;
    40 
    41     function __construct()
    42     {
    43         $this->settings = array
    44         (
    45             'userkey'               =>  '',
    46             'user_pub_key'          =>  '',
    47             'connecting'            =>  'use_rest_post',
    48             'filter_wp_posts'       =>  1,
    49             'filter_wp_comments'    =>  1,
    50             'filter_wp_userinfo'    =>  1,
    51             'filter_wp_categories'  =>  1,
    52             'filter_bp_activity'    =>  1,
    53             'filter_bp_member'      =>  1,
    54             'filter_bp_group'       =>  1,
    55             'filter_bp_xprofile'    =>  1,
    56             'filter_bp_messages'    =>  1,
    57             'filter_check_emails'   =>  1,
    58             'filter_check_phone'    =>  1,
    59             'filter_check_links'    =>  1,
    60             'bp_runs'               =>  0,
    61             'bb_runs'               =>  0
    62         );
    63     }
    64 
    65     public function get()
    66     {
    67         return $this->settings;
    68     }
    69 }
    70 
    7138//Make it active as soon as it is activated
    7239register_activation_hook( __FILE__,
    7340                            function() //No calls to other functions, or it will not work, we need to do it right then..
    7441                            {
    75                                 $options = new AstrizStudiosProBlockDefaultOptions();
    76 
    77                                 $options = $options->get();
     42                                require_once('profanity-blocker-options.php');
    7843
    7944                                add_option("astrizstudios_pro_block_options", $options);
     
    9358//Even if they do not like the plugin it should have clean uninstall...
    9459register_uninstall_hook(__FILE__, 'astrizstudios_pro_block_options_uninstal');
     60
    9561function astrizstudios_pro_block_options_uninstal()
    9662{
     
    10470    if(__FILE__ != WP_UNINSTALL_PLUGIN)         { return; }
    10571
    106     $options = new AstrizStudiosProBlockDefaultOptions();
    107 
    108     $options = $options->get();
     72    require_once('profanity-blocker-options.php');
    10973   
    11074    foreach($options as $option)                { delete_option($option); }
     
    139103    if($options === false || empty($options))
    140104    {
    141 
    142         $options = new AstrizStudiosProBlockDefaultOptions();
    143 
    144         $options = $options->get();
     105        require_once('profanity-blocker-options.php');
    145106    }
    146107
Note: See TracChangeset for help on using the changeset viewer.