/** * Sets up the basics of Publicize */ function __construct() { $this->default_message = Publicize_Util::build_sprintf(array(apply_filters('wpas_default_message', $this->default_message), 'title', 'url')); $this->default_prefix = Publicize_Util::build_sprintf(array(apply_filters('wpas_default_prefix', $this->default_prefix), 'url')); $this->default_suffix = Publicize_Util::build_sprintf(array(apply_filters('wpas_default_suffix', $this->default_suffix), 'url')); /** * Filter the capability to change global Publicize connection options. * * All users with this cap can un-globalize all other global connections, and globalize any of their own * Globalized connections cannot be unselected by users without this capability when publishing. * * @module publicize * * @since 2.2.1 * * @param string $this->GLOBAL_CAP default capability in control of global Publicize connection options. Default to edit_others_posts. */ $this->GLOBAL_CAP = apply_filters('jetpack_publicize_global_connections_cap', $this->GLOBAL_CAP); // stage 1 and 2 of 3-stage Publicize. Flag for Publicize on creation, save meta, // then check meta and publicize based on that. stage 3 implemented on wpcom add_action('transition_post_status', array($this, 'flag_post_for_publicize'), 10, 3); add_action('save_post', array(&$this, 'save_meta'), 20, 2); // Connection test callback add_action('wp_ajax_test_publicize_conns', array($this, 'test_publicize_conns')); }
/** * Sets up the basics of Publicize */ function __construct() { $this->default_message = Publicize_Util::build_sprintf(array(apply_filters('wpas_default_message', $this->default_message), 'title', 'url')); $this->default_prefix = Publicize_Util::build_sprintf(array(apply_filters('wpas_default_prefix', $this->default_prefix), 'url')); $this->default_suffix = Publicize_Util::build_sprintf(array(apply_filters('wpas_default_suffix', $this->default_suffix), 'url')); // stage 1 and 2 of 3-stage Publicize. Flag for Publicize on creation, save meta, // then check meta and publicze based on that. stage 3 implemented on wpcom add_action('transition_post_status', array($this, 'flag_post_for_publicize'), 10, 3); add_action('save_post', array(&$this, 'save_meta'), 20, 2); }