PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-ui.php +2 -94 16.2 → 16.3 View file →
@@ -12,9 +12,9 @@
12 12 use Automattic\Jetpack\Publicize\Publicize_Utils as Utils;
13 13 use Automattic\Jetpack\Status\Host;
14 14
15 15 /**
16 - * Only user facing pieces of Publicize are found here.
16 + * Classic editor integration: the Publicize metabox on the post screen, and its assets.
17 17 */
18 18 class Publicize_UI {
19 19 /**
20 20 * Contains an instance of class 'Publicize' which loads Keyring, sets up services, etc.
@@ -23,9 +23,9 @@
23 23 */
24 24 public $publicize;
25 25
26 26 /**
27 - * URL to Sharing settings page in wordpress.com
27 + * URL of the admin page where Publicize connections are managed.
28 28 *
29 29 * @var string
30 30 */
31 31 protected $publicize_settings_url = '';
@@ -57,101 +57,9 @@
57 57 // Assets (css, js).
58 58 add_action( 'admin_head-post.php', array( $this, 'post_page_metabox_assets' ) );
59 59 add_action( 'admin_head-post-new.php', array( $this, 'post_page_metabox_assets' ) );
60 60
61 - // Management of publicize (sharing screen, ajax/lightbox popup, and metabox on post screen).
62 61 add_action( 'post_submitbox_misc_actions', array( $this, 'post_page_metabox' ) );
63 - }
64 -
65 - /**
66 - * If the ShareDaddy plugin is not active we need to add the sharing settings page to the menu still
67 - *
68 - * @deprecated 0.42.3
69 - */
70 - public function sharing_menu() {
71 - add_submenu_page(
72 - 'options-general.php',
73 - esc_html__( 'Sharing Settings', 'jetpack-publicize-pkg' ),
74 - esc_html__( 'Sharing', 'jetpack-publicize-pkg' ),
75 - 'publish_posts',
76 - 'sharing',
77 - array( $this, 'wrapper_admin_page' )
78 - );
79 - }
80 -
81 - /**
82 - * Add admin page with wrapper.
83 - *
84 - * @deprecated 0.42.3
85 - */
86 - public function wrapper_admin_page() {
87 - if ( class_exists( 'Jetpack_Admin_Page' ) ) {
88 - \Jetpack_Admin_Page::wrap_ui( array( $this, 'management_page' ) );
89 - }
90 - }
91 -
92 - /**
93 - * Management page to load if Sharedaddy is not active so the 'pre_admin_screen_sharing' action exists.
94 - *
95 - * @deprecated 0.42.3
96 - */
97 - public function management_page() {
98 - ?>
99 - <div class="wrap">
100 - <div class="icon32" id="icon-options-general"><br /></div>
101 - <h1><?php esc_html_e( 'Sharing Settings', 'jetpack-publicize-pkg' ); ?></h1>
102 -
103 - <?php
104 - /** This action is documented in modules/sharedaddy/sharing.php */
105 - do_action( 'pre_admin_screen_sharing' );
106 - ?>
107 - </div>
108 - <?php
109 - }
110 -
111 - /**
112 - * Styling for the sharing screen and popups
113 - * JS for the options and switching
114 - *
115 - * @deprecated 0.42.3
116 - */
117 - public function load_assets() {
118 - if ( class_exists( 'Jetpack_Admin_Page' ) ) {
119 - \Jetpack_Admin_Page::load_wrapper_styles();
120 - }
121 - }
122 -
123 - /**
124 - * Lists the current user's publicized accounts for the blog
125 - * looks exactly like Publicize v1 for now, UI and functionality updates will come after the move to keyring
126 - *
127 - * @deprecated 0.42.3
128 - */
129 - public function admin_page() {
130 - ?>
131 - <h2 id="publicize"><?php esc_html_e( 'Jetpack Social', 'jetpack-publicize-pkg' ); ?></h2>
132 - <p><?php esc_html_e( 'Connect social media services to automatically share new posts.', 'jetpack-publicize-pkg' ); ?></p>
133 - <h4>
134 - <?php
135 - printf(
136 - wp_kses(
137 - /* translators: %s is the link to the Publicize page in Calypso */
138 - __( "We've made some updates to Jetpack Social. Please visit the <a href='%s' class='jptracks' data-jptracks-name='legacy_publicize_settings'>WordPress.com sharing page</a> to manage your Jetpack Social connections or use the button below.", 'jetpack-publicize-pkg' ),
139 - array(
140 - 'a' => array(
141 - 'href' => array(),
142 - 'class' => array(),
143 - 'data-jptracks-name' => array(),
144 - ),
145 - )
146 - ),
147 - esc_url( $this->publicize->publicize_connections_url() )
148 - );
149 - ?>
150 - </h4>
151 -
152 - <a href="<?php echo esc_url( $this->publicize->publicize_connections_url() ); ?>" class="button button-primary jptracks" data-jptracks-name='legacy_publicize_settings'><?php esc_html_e( 'Jetpack Social Settings', 'jetpack-publicize-pkg' ); ?></a>
153 - <?php
154 62 }
155 63
156 64 /**
157 65 * CSS for styling the publicize message box and counter that displays on the post page.