[18] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | Plugin Name: Plugin for XPressME
|
---|
| 4 | Plugin URI: http://www.toemon.com
|
---|
| 5 | Description: Plugin for XPressME (custom function,filter,action)
|
---|
| 6 | Author: toemon
|
---|
| 7 | Version: 0.001
|
---|
| 8 | Author URI: http://www.toemon.com
|
---|
| 9 | */
|
---|
[19] | 10 | require_once('xpressme_class.php');
|
---|
[71] | 11 | require_once dirname( __FILE__ ).'/include/pluggable-override.php' ;
|
---|
[46] | 12 | require_once dirname( __FILE__ ).'/include/custom_functions.php' ;
|
---|
| 13 |
|
---|
| 14 |
|
---|
[19] | 15 | $xpessme = new XPressME_Class();
|
---|
[18] | 16 |
|
---|
[46] | 17 |
|
---|
| 18 | $xoops_db = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
|
---|
| 19 | $xoops_db->prefix = get_xoops_prefix();
|
---|
| 20 | $xoops_db->tables = array('modules', 'newblocks', 'users');
|
---|
| 21 |
|
---|
| 22 |
|
---|
[19] | 23 | add_action('admin_menu', array(&$xpessme, 'add_option_page'));
|
---|
| 24 | add_action('admin_head', array(&$xpessme, 'add_admin_head'));
|
---|
| 25 | add_filter("upload_dir",array(&$xpessme, 'xpress_upload_filter'), 1); // Change wp-include/wp_upload_dir()
|
---|
[28] | 26 | if (!$xpressme->is_save_post_revision){
|
---|
| 27 | remove_action( 'pre_post_update', 'wp_save_post_revision' ); // Not Save Post Revision
|
---|
| 28 | }
|
---|
[46] | 29 | add_action("comment_post", "block_cache_refresh");
|
---|
| 30 | add_action("edit_comment", "block_cache_refresh");
|
---|
| 31 | add_action("delete_comment","block_cache_refresh");
|
---|
| 32 | add_action("delete_post", "block_cache_refresh");
|
---|
| 33 | add_action("publish_post", "block_cache_refresh");
|
---|
| 34 | add_action("edit_post", "block_cache_refresh");
|
---|
| 35 | add_action("private_to_published", "block_cache_refresh");
|
---|
| 36 | add_action("wp_set_comment_status" , "block_cache_refresh");
|
---|
| 37 |
|
---|
[51] | 38 | add_action("the_content", "set_post_views_count");
|
---|
| 39 |
|
---|
[61] | 40 | //XOOPS notifiction
|
---|
| 41 | require_once dirname( __FILE__ ).'/include/notify_functions.php' ;
|
---|
| 42 | add_action("private_to_published", "onaction_publish_post_notify");
|
---|
| 43 | // add_action("edit_post", "onaction_edit_post_notify");
|
---|
| 44 | add_action("comment_post", "onaction_comment_notify");
|
---|
| 45 | // add_action("approve_comment" , "onaction_comment_apobe_notify");
|
---|
| 46 | add_action("wp_set_comment_status" , "onaction_comment_apobe_notify");
|
---|
[51] | 47 |
|
---|
[72] | 48 | // user data sync user_sync_to_xoops($user_id)
|
---|
| 49 | require_once dirname( __FILE__ ).'/include/user_sync_xoops.php' ;
|
---|
| 50 | add_action('profile_update', 'user_sync_to_xoops');
|
---|
| 51 | add_action('user_register', 'user_sync_to_xoops');
|
---|
[32] | 52 | //require_once('../include/custom_functions.php');
|
---|
[18] | 53 | ?> |
---|