XPressME Integration Kit

Trac

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

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

xpressmeプラグイン有効化にて、インストール時や一旦無効化後の有効化では、pluggable-override.phpが後出しになるので、関数重複エラーが発生してしまうバグを修正

File size: 2.1 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
[46]12require_once dirname( __FILE__ ).'/include/custom_functions.php' ;
13
14$xoops_db = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
15$xoops_db->prefix = get_xoops_prefix();
16$xoops_db->tables = array('modules', 'newblocks', 'users');
17
[75]18$XPressME = new XPressME_Class();
[78]19if (is_xpress_index_page_call()){
[75]20        require_once dirname( __FILE__ ).'/include/pluggable-override.php' ;
21}
22add_action('admin_menu', array(&$XPressME, 'add_option_page'));
23add_action('admin_head', array(&$XPressME, 'add_admin_head'));
24add_filter("upload_dir",array(&$XPressME, 'xpress_upload_filter'),      1);             // Change wp-include/wp_upload_dir()
25if (!$XPressME->is_save_post_revision){
[28]26        remove_action( 'pre_post_update', 'wp_save_post_revision' );                    // Not Save Post Revision
27}
[46]28add_action("comment_post",      "block_cache_refresh");
29add_action("edit_comment",      "block_cache_refresh");
30add_action("delete_comment","block_cache_refresh");
31add_action("delete_post",       "block_cache_refresh");
32add_action("publish_post",      "block_cache_refresh");
33add_action("edit_post",         "block_cache_refresh");
34add_action("private_to_published",      "block_cache_refresh");
35add_action("wp_set_comment_status" , "block_cache_refresh");
36
[51]37add_action("the_content",       "set_post_views_count");
38
[61]39//XOOPS notifiction
40require_once dirname( __FILE__ ).'/include/notify_functions.php' ;
41add_action("private_to_published",      "onaction_publish_post_notify");
42//      add_action("edit_post", "onaction_edit_post_notify");
43add_action("comment_post",      "onaction_comment_notify");
44//      add_action("approve_comment" , "onaction_comment_apobe_notify");
45add_action("wp_set_comment_status" , "onaction_comment_apobe_notify");
[51]46
[72]47// user data sync  user_sync_to_xoops($user_id)
48require_once dirname( __FILE__ ).'/include/user_sync_xoops.php' ;
49add_action('profile_update', 'user_sync_to_xoops');
50add_action('user_register', 'user_sync_to_xoops');
[32]51//require_once('../include/custom_functions.php');
[18]52?>
Note: See TracBrowser for help on using the repository browser.