File Editor
Directories:
.. (Back)
calypsoify
carousel
comment-likes
comments
contact-form
custom-css
custom-post-types
geo-location
google-analytics
infinite-scroll
lazy-images
likes
markdown
masterbar
memberships
minileven
photon
photon-cdn
plugin-search
post-by-email
protect
publicize
pwa
related-posts
search
seo-tools
sharedaddy
shortcodes
simple-payments
site-icon
sitemaps
sso
subscriptions
theme-tools
tiled-gallery
verification-tools
videopress
widget-visibility
widgets
woocommerce-analytics
wordads
wpcom-block-editor
Files:
.eslintrc.js
after-the-deadline.php
carousel.php
comment-likes.php
comments.php
contact-form.php
copy-post.php
custom-content-types.php
custom-css.php
enhanced-distribution.php
geo-location.php
google-analytics.php
gravatar-hovercards.php
infinite-scroll.php
json-api.php
latex.php
lazy-images.php
likes.php
markdown.php
masterbar.php
minileven.php
mobile-push.php
module-extras.php
module-headings.php
module-info.php
monitor.php
notes.php
photon-cdn.php
photon.php
plugin-search.php
post-by-email.php
protect.php
publicize.php
pwa.php
related-posts.php
search.php
seo-tools.php
sharedaddy.php
shortcodes.php
shortlinks.php
sitemaps.php
sso.php
stats.php
subscriptions.php
theme-tools.php
tiled-gallery.php
vaultpress.php
verification-tools.php
videopress.php
widget-visibility.php
widgets.php
wordads.php
wpgroho.js
Create New File
Create
Edit File: publicize.php
<?php /** * Module Name: Publicize * Module Description: Publicize makes it easy to share your site’s posts on several social media networks automatically when you publish a new post. * Sort Order: 10 * Recommendation Order: 7 * First Introduced: 2.0 * Requires Connection: Yes * Auto Activate: No * Module Tags: Social, Recommended * Feature: Engagement * Additional Search Queries: facebook, jetpack publicize, twitter, tumblr, linkedin, social, tweet, connections, sharing, social media, automated, automated sharing, auto publish, auto tweet and like, auto tweet, facebook auto post, facebook posting */ class Jetpack_Publicize { public $in_jetpack = true; function __construct() { global $publicize_ui; $this->in_jetpack = ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'enable_module_configurable' ) ) ? true : false; if ( $this->in_jetpack ) { Jetpack::enable_module_configurable( __FILE__ ); } require_once dirname( __FILE__ ) . '/publicize/publicize.php'; if ( $this->in_jetpack ) require_once dirname( __FILE__ ) . '/publicize/publicize-jetpack.php'; else { require_once dirname( dirname( __FILE__ ) ) . '/mu-plugins/keyring/keyring.php'; require_once dirname( __FILE__ ) . '/publicize/publicize-wpcom.php'; } require_once dirname( __FILE__ ) . '/publicize/ui.php'; $publicize_ui = new Publicize_UI(); $publicize_ui->in_jetpack = $this->in_jetpack; // Jetpack specific checks / hooks if ( $this->in_jetpack ) { // if sharedaddy isn't active, the sharing menu hasn't been added yet $active = Jetpack::get_active_modules(); if ( in_array( 'publicize', $active ) && ! in_array( 'sharedaddy', $active ) ) { add_action( 'admin_menu', array( &$publicize_ui, 'sharing_menu' ) ); } } } } global $publicize_ui; new Jetpack_Publicize; if( ! ( defined( 'IS_WPCOM' ) && IS_WPCOM ) && ! function_exists( 'publicize_init' ) ) { /** * Helper for grabbing a Publicize object from the "front-end" (non-admin) of * a site. Normally Publicize is only loaded in wp-admin, so there's a little * set up that you might need to do if you want to use it on the front end. * Just call this function and it returns a Publicize object. * * @return Publicize Object */ function publicize_init() { global $publicize; if ( ! class_exists( 'Publicize' ) ) { require_once dirname( __FILE__ ) . '/publicize/publicize.php'; } return $publicize; } }
Save Changes
Rename File
Rename