Changeset 7502
- Timestamp:
- 07/26/2018 12:38:22 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php
r7173 r7502 20 20 add_action( 'admin_notices', array( $this, 'block_new_post_admin_notice' ) ); 21 21 add_filter( 'get_post_metadata', array( $this, 'jetpack_dont_email_post_to_subs' ), 10, 4 ); 22 add_filter( 'publicize_should_publicize_published_post', array( $this, 'jetpack_prevent_publicize' ) ); 22 23 23 24 add_image_size( 'wccsp_image_medium_rectangle', 500, 300 ); … … 397 398 $class = 'notice notice-warning'; 398 399 $message = sprintf( 399 __( '<a href="%s">Coming Soon mode</a> is enabled. Site subscribers will not receive email notifications about published posts. ', 'wordcamporg' ),400 __( '<a href="%s">Coming Soon mode</a> is enabled. Site subscribers will not receive email notifications about published posts. Published posts will not be automatically cross-posted to social media accounts.', 'wordcamporg' ), 400 401 esc_url( $setting_url ) 401 402 ); … … 432 433 } 433 434 435 /** 436 * Disable publicizing posts when Coming Soon mode is on. Note that even if we return false here, when publishing a 437 * post, we will see a message that post has been cross posted in social media accounts. That message is incorrect, 438 * but can only be fixed in JetPack, not here. 439 * 440 * @param bool $should_publicize Whether this post can be publicized or not 441 * 442 * @return bool 443 */ 444 public function jetpack_prevent_publicize( $should_publicize ) { 445 $settings = $GLOBALS['WCCSP_Settings']->get_settings(); 446 447 if ( 'on' === $settings['enabled'] ) { 448 return false; 449 } 450 451 return $should_publicize; 452 } 453 434 454 } // end WordCamp_Coming_Soon_Page.
Note: See TracChangeset
for help on using the changeset viewer.