publicize = $publicize = new Publicize; add_action( 'init', array( $this, 'init' ) ); } function init() { // Show only to users with the capability required to manage their Publicize connections. if ( ! current_user_can( 'publish_posts' ) ) { return; } // assets (css, js) add_action( 'load-settings_page_sharing', array( &$this, 'load_assets' ) ); add_action( 'admin_head-post.php', array( &$this, 'post_page_metabox_assets' ) ); add_action( 'admin_head-post-new.php', array( &$this, 'post_page_metabox_assets' ) ); // management of publicize (sharing screen, ajax/lightbox popup, and metabox on post screen) add_action( 'pre_admin_screen_sharing', array( &$this, 'admin_page' ) ); add_action( 'post_submitbox_misc_actions', array( &$this, 'post_page_metabox' ) ); } /** * If the ShareDaddy plugin is not active we need to add the sharing settings page to the menu still */ function sharing_menu() { add_submenu_page( 'options-general.php', __( 'Sharing Settings', 'jetpack' ), __( 'Sharing', 'jetpack' ), 'publish_posts', 'sharing', array( &$this, 'management_page' ) ); } /** * Management page to load if Sharedaddy is not active so the 'pre_admin_screen_sharing' action exists. */ function management_page() { ?>

denied_notice(); } ?>

in_jetpack ) { $doc_link = "http://jetpack.com/support/publicize/"; } else { $doc_link = "http://en.support.wordpress.com/publicize/"; } ?>

publicize->get_services( 'all' ); $total_num_of_services = count ( $services ); $service_num = 0;?>
$service ) : $connect_url = $this->publicize->connect_url( $name ); if ( $service_num == ( round ( ( $total_num_of_services / 2 ), 0 ) ) ) echo "
"; $service_num++; ?>
0 ): ?>class="connected" >
publicize->is_enabled( $name ) && $connections = $this->publicize->get_connections( $name ) ) : ?>
    publicize->get_connection_id( $c ); $disconnect_url = $this->publicize->disconnect_url( $name, $id ); $cmeta = $this->publicize->get_connection_meta( $c ); $profile_link = $this->publicize->get_profile_link( $name, $c ); $connection_display = $this->publicize->get_display_name( $name, $c ); $options_nonce = wp_create_nonce( 'options_page_' . $name . '_' . $id ); ?> publicize->show_options_popup( $name, $c ) ): ?>
  • () publicize->GLOBAL_CAP ) ) : ?> × ×
publicize->get_connections( $name ); if ( empty ( $connections ) ) { ?>
GLOBAL_CAP ) ) : ?>


post_author ) ? $GLOBALS['user_ID'] : $post->post_author; $default_prefix = $this->publicize->default_prefix; $default_prefix = preg_replace( '/%([0-9])\$s/', "' + %\\1\$s + '", esc_js( $default_prefix ) ); $default_message = $this->publicize->default_message; $default_message = preg_replace( '/%([0-9])\$s/', "' + %\\1\$s + '", esc_js( $default_message ) ); $default_suffix = $this->publicize->default_suffix; $default_suffix = preg_replace( '/%([0-9])\$s/', "' + %\\1\$s + '", esc_js( $default_suffix ) ); ?> publicize->post_type_is_publicizeable( $post->post_type ) ) return; $user_id = empty( $post->post_author ) ? $GLOBALS['user_ID'] : $post->post_author; $services = $this->publicize->get_services( 'connected' ); $available_services = $this->publicize->get_services( 'all' ); if ( ! is_array( $available_services ) ) $available_services = array(); if ( ! is_array( $services ) ) $services = array(); $active = array(); ?>
0
:
, ', array_map( 'esc_html', $active ) ); ?>