-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnsync-push.php
More file actions
42 lines (33 loc) · 1.79 KB
/
nsync-push.php
File metadata and controls
42 lines (33 loc) · 1.79 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
<?php
/*
Plugin Name: Nsync Push
Plugin URI: http://github.com/ubc/nsync-push
Description: Nsync Push allows you to push content to a different site.
Version: 1.1
Author: ctlt
Author URI:
License: GPLv2 or later.
*/
if ( !defined('ABSPATH') )
die('-1');
define( 'NSYNC_PUSH_DIR_PATH', plugin_dir_path( __FILE__ ) );
define( 'NSYNC_PUSH_BASENAME', plugin_basename(__FILE__) );
define( 'NSYNC_PUSH_DIR_URL', plugins_url( '' , NSYNC_PUSH_BASENAME ) );
require( 'lib/class.nsync-push.php' );
require( 'lib/class.nsync-posts.php' );
$nsync_currently_published_to = array();
// add_action( 'init', array( 'Nsync', 'init' ) );
add_action( 'admin_init', array( 'Nsync_Push', 'admin_init' ) );
// add_action( 'admin_print_styles-options-writing.php', array( 'Nsync', 'writing_script_n_style' ) );
// add_action( 'wp_ajax_nsync_lookup_site', array( 'Nsync', 'ajax_lookup_site' ) );
add_action( 'admin_print_styles-post-new.php', array( 'Nsync_Push', 'post_to_script_n_style' ) );
add_action( 'admin_print_styles-post.php', array( 'Nsync_Push', 'post_to_script_n_style' ) );
add_action( 'post_submitbox_misc_actions', array( 'Nsync_Push', 'user_select_site') );
add_action( 'save_post', array( 'Nsync_Posts', 'save_postdata') , 10, 2 );
add_action( 'wp_trash_post', array( 'Nsync_Posts', 'trash_or_untrash_post' ), 10, 1 );
add_action( 'untrash_post', array( 'Nsync_Posts', 'trash_or_untrash_post' ), 10, 1 );
add_filter( 'post_row_actions' , array( 'Nsync_Posts', 'posts_display_sync' ), 10, 2);
add_filter( 'post_updated_messages',array( 'Nsync_Posts', 'update_message' ) );
add_filter('the_content', array( 'Nsync_Posts', 'nsync_post_edit_single_post'));
add_filter('post_link', array('Nsync_Posts', 'nsync_post_link'), 10, 3);
add_action('get_header', array('Nsync_Posts', 'nsync_shortlink'), 10, 1);