Changeset 929487
- Timestamp:
- 06/10/2014 08:52:50 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
profanityblocker-profanity-filter/trunk/profanity-blocker.php
r929291 r929487 2 2 /* 3 3 Plugin 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. 04 Plugin URI: http://profanity-blocker.com/plugins/wordpress/ 5 Description: ProfanityBlocker is a cloud based service that scans for profane (swearing/abusive) words - giving you greater control of allowed text on your site. 6 Version: 1.1 7 7 Author: AstrizStudios 8 8 Author URI: http://astrizstudios.com 9 9 License: GPL2 10 11 Copyright 2013 AstrizStudios (email : support@profanity-blocker.com) 10 */ 11 12 /* Copyright 2013 AstrizStudios (email : support@profanity-blocker.com) 12 13 13 14 This program is free software; you can redistribute it and/or modify … … 35 36 define('ASTRIZSTUDIOS_PROBLOCK_LINK_SERVICE', 'http://service.profanity-blocker.com/restServer.php'); 36 37 37 Class AstrizStudiosProBlockDefaultOptions38 {39 protected $settings = null;40 41 function __construct()42 {43 $this->settings = array44 (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' => 062 );63 }64 65 public function get()66 {67 return $this->settings;68 }69 }70 71 38 //Make it active as soon as it is activated 72 39 register_activation_hook( __FILE__, 73 40 function() //No calls to other functions, or it will not work, we need to do it right then.. 74 41 { 75 $options = new AstrizStudiosProBlockDefaultOptions(); 76 77 $options = $options->get(); 42 require_once('profanity-blocker-options.php'); 78 43 79 44 add_option("astrizstudios_pro_block_options", $options); … … 93 58 //Even if they do not like the plugin it should have clean uninstall... 94 59 register_uninstall_hook(__FILE__, 'astrizstudios_pro_block_options_uninstal'); 60 95 61 function astrizstudios_pro_block_options_uninstal() 96 62 { … … 104 70 if(__FILE__ != WP_UNINSTALL_PLUGIN) { return; } 105 71 106 $options = new AstrizStudiosProBlockDefaultOptions(); 107 108 $options = $options->get(); 72 require_once('profanity-blocker-options.php'); 109 73 110 74 foreach($options as $option) { delete_option($option); } … … 139 103 if($options === false || empty($options)) 140 104 { 141 142 $options = new AstrizStudiosProBlockDefaultOptions(); 143 144 $options = $options->get(); 105 require_once('profanity-blocker-options.php'); 145 106 } 146 107
Note: See TracChangeset
for help on using the changeset viewer.