XPressME Integration Kit

Trac

source: trunk/wp-content/plugins/xpressme/xpressme.php @ 99

Last change on this file since 99 was 96, checked in by toemon, 16 years ago

途中経過でインストール、アップデートできなくなってしまっていたバグ修正
イベント通知の部分をFix、(ゲストのモジュールアクセス権限がないと通知できないのは直らない)
ブロックのキャッシュを見直し、キャッシュがない場合と、ブロックオプションが変更された場合にリフレッシュする機能を追加
ブロックキャッシュの更新にてポスト削除時のイベントをDB削除前にとっていたバグを修正。

File size: 2.5 KB
RevLine 
[18]1<?php
2/*
3Plugin Name: Plugin for XPressME
4Plugin URI: http://www.toemon.com
5Description: Plugin for XPressME (custom function,filter,action)
6Author: toemon
7Version: 0.001
8Author URI: http://www.toemon.com
9*/
[19]10require_once('xpressme_class.php');
[75]11
[95]12require_once dirname( __FILE__ ).'/include/custom_functions.php' ;              // XPressME functions for themes
13require_once dirname( __FILE__ ).'/include/xpress_common_functions.php' ;
[46]14
15$xoops_db = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
16$xoops_db->prefix = get_xoops_prefix();
17$xoops_db->tables = array('modules', 'newblocks', 'users');
18
[75]19$XPressME = new XPressME_Class();
[83]20
21require_once dirname( __FILE__ ).'/include/pluggable-override.php' ;
22
[75]23add_action('admin_menu', array(&$XPressME, 'add_option_page'));
24add_action('admin_head', array(&$XPressME, 'add_admin_head'));
25add_filter("upload_dir",array(&$XPressME, 'xpress_upload_filter'),      1);             // Change wp-include/wp_upload_dir()
26if (!$XPressME->is_save_post_revision){
[28]27        remove_action( 'pre_post_update', 'wp_save_post_revision' );                    // Not Save Post Revision
28}
[96]29
30//XOOPS Bloack Cache Refresh
[46]31add_action("comment_post",      "block_cache_refresh");
32add_action("edit_comment",      "block_cache_refresh");
[96]33add_action("wp_set_comment_status","block_cache_refresh"); //wp_delete_comment() at deleted
34add_action("deleted_post",      "block_cache_refresh");
[46]35add_action("publish_post",      "block_cache_refresh");
36add_action("edit_post",         "block_cache_refresh");
37add_action("private_to_published",      "block_cache_refresh");
[96]38add_action("transition_post_status", "block_cache_refresh");
[46]39
[51]40add_action("the_content",       "set_post_views_count");
41
[61]42//XOOPS notifiction
43require_once dirname( __FILE__ ).'/include/notify_functions.php' ;
[91]44add_action("transition_post_status",    "onaction_publish_post_notify" ,10 , 3);
[61]45//      add_action("edit_post", "onaction_edit_post_notify");
46add_action("comment_post",      "onaction_comment_notify");
47//      add_action("approve_comment" , "onaction_comment_apobe_notify");
48add_action("wp_set_comment_status" , "onaction_comment_apobe_notify");
[51]49
[72]50// user data sync  user_sync_to_xoops($user_id)
51require_once dirname( __FILE__ ).'/include/user_sync_xoops.php' ;
52add_action('profile_update', 'user_sync_to_xoops');
53add_action('user_register', 'user_sync_to_xoops');
[32]54//require_once('../include/custom_functions.php');
[88]55
56// SQL debug windows
57add_filter('query', array(&$XPressME, 'xpress_sql_debug'));
58add_action('admin_footer', array(&$XPressME, 'displayDebugLog'));
59add_action('get_footer', array(&$XPressME, 'displayDebugLog'));
[18]60?>
Note: See TracBrowser for help on using the repository browser.