-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxpost.php
More file actions
74 lines (60 loc) · 2.49 KB
/
xpost.php
File metadata and controls
74 lines (60 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/*
Plugin Name: Xpost CommunityServer edition
Plugin URI: http://github.com/codeinvain/XpostCS
Description: Allows to crosspost a post to Community Server blogs.
Version: 1.0
Author: Daniel Cohen <daniel@codeinvain.com>
Author URI: http://www.codeinvain.com
Original Author: Jan Gosmann <jan@hyper-world.de>
Original Author URI: http://www.hyper-world.de
*/
/* Copyright 2009 Jan Gosmann (email: jan@hyper-world.de)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* I was told this include is necessary to be compatible with WP3 multiuser. */
require_once ( ABSPATH . WPINC . '/pluggable.php' );
require_once( 'xpost_config.php' );
include_once( 'xpost_options.php' );
include_once( 'xpost_widget.php' );
include_once( 'xpost_post.php' );
include_once( 'xpost_comments.php' );
include_once( 'xpost_xmlrpc.php' );
require_once( ABSPATH.'wp-admin/includes/upgrade.php' );
register_activation_hook( __FILE__, 'install_xpost_cs' );
function install_xpost_cs() {
global $wpdb;
$sql = 'CREATE TABLE '.XPOSTCS_TABLE_NAME.' (
id INT NOT NULL AUTO_INCREMENT,
blogid NVARCHAR(128) NOT NULL,
selected BOOLEAN NOT NULL,
name NVARCHAR(128),
url NVARCHAR(128),
xmlrpc NVARCHAR(128) NOT NULL,
user NVARCHAR(64),
xpost_comments BOOLEAN NOT NULL DEFAULT false,
xpost_community_server BOOLEAN NOT NULL DEFAULT false,
xpost_summary_only BOOLEAN NOT NULL DEFAULT false,
password NVARCHAR(64),
comment NVARCHAR(256),
PRIMARY KEY ( id ) )';
dbDelta( $sql );
$sql = 'CREATE TABLE '.XPOSTCS_POSTS_TABLE_NAME.' (
id INT NOT NULL,
local_postid INT NOT NULL,
remote_postid INT NOT NULL,
PRIMARY KEY ( id, local_postid ) )';
dbDelta( $sql );
add_option( "xpost_db_version", XPOSTCS_DB_VERSION );
}
?>