Completed
Push — add/seo-framework-conflict-og ( 37b773 )
by Jeremy
10:40
created

modules/module-info.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * "Learn More" information blocks for all modules live in this file.
4
 *
5
 * Each module must include 2 functions:
6
 * - The first one creates a button where users can find more information about the module.
7
 * 	It is hooked into `jetpack_learn_more_button_ . $module`
8
 * - The second creates a information block.
9
 * 	It is hooked into `jetpack_module_more_info_ . $module`
10
 */
11
12
/**
13
 *  VaultPress (stub)
14
 */
15
function vaultpress_jetpack_load_more_link() {
16
	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
17
		$vaultpress_url = 'http://vaultpress.com/jetpack-ms/';
18
	} else {
19
		$vaultpress_url = 'http://vaultpress.com/jetpack/';
20
	}
21
22
	echo '<a class="button-secondary more-info-link" href="' . $vaultpress_url . '" target="_blank">' . __( "Learn More", 'jetpack' ) . '</a>';
23
}
24
add_filter( 'jetpack_learn_more_button_vaultpress', 'vaultpress_jetpack_load_more_link' );
25
26
function vaultpress_jetpack_more_info() {
27
	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
28
		$vaultpress_url = 'http://vaultpress.com/jetpack-ms/';
29
	} else {
30
		$vaultpress_url = 'http://vaultpress.com/jetpack/';
31
	}
32
	?>
33
34
	<div class="jp-info-img">
35
		<a href="<?php echo $vaultpress_url?>" target="_blank">
36
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/vaultpress.jpg' ) ?>" alt="<?php esc_attr_e( 'VaultPress', 'jetpack' ) ?>" width="300" height="150" />
37
		</a>
38
	</div>
39
40
<?php	if ( class_exists( 'VaultPress' ) || function_exists( 'vaultpress_contact_service' ) ) : ?>
41
	<p><?php esc_html_e( 'Your WordPress installation is currently being protected with the world&#8217;s best security, backup, and support.', 'jetpack' ); ?></p>
42
	<p><?php printf( _x( 'To check your backups, see any security alerts, or check your VaultPress Vitality, visit your %s.', 'Visit your _VaultPress_dashboard_.', 'jetpack' ), '<a href="https://dashboard.vaultpress.com/" target="_blank">' . esc_html__( 'VaultPress dashboard', 'jetpack' ) . '</a>' ); ?></a></p>
43
<?php	else : ?>
44
	<p><?php esc_html_e( 'With a monthly subscription, the VaultPress plugin will backup your site&#8217;s content, themes, and plugins in real-time, as well as perform regular security scans for common threats and attacks.', 'jetpack' ); ?></p>
45
	<p><?php printf( _x( 'View %s.', 'View _Plans_&_Pricing_. (VaultPress)', 'jetpack' ), '<a href="' . $vaultpress_url . '" target="_blank">' . esc_html__( 'Plans & Pricing', 'jetpack' ) . '</a>' ); ?></a></p>
46
<?php	endif;
47
}
48
add_action( 'jetpack_module_more_info_vaultpress', 'vaultpress_jetpack_more_info' );
49
50
/**
51
 * Gravatar Hovercards
52
 */
53
function grofiles_load_more_link() {
54
	echo '<a class="button-secondary more-info-link" href="http://blog.gravatar.com/2010/10/06/gravatar-hovercards-on-wordpress-com/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
55
}
56
add_filter( 'jetpack_learn_more_button_gravatar-hovercards', 'grofiles_load_more_link' );
57
58
function grofiles_more_info() { ?>
59
	<div class="jp-info-img">
60
		<a href="http://blog.gravatar.com/2010/10/06/gravatar-hovercards-on-wordpress-com/" target="_blank">
61
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/hovercards.jpg' ) ?>" alt="<?php esc_attr_e( 'Gravatar Hovercard', 'jetpack' ) ?>" width="300" height="150" />
62
		</a>
63
	</div>
64
65
	<h5><?php esc_html_e( "What&#8217;s a Hovercard?", 'jetpack' ) ?></h5>
66
	<p><?php esc_html_e( 'Hovercards enhance plain Gravatar images with information about a person: name, bio, pictures, their contact info, and other services.', 'jetpack' ); ?></p>
67
	<p><?php esc_html_e( 'To see hovercards, look at any blog post on your blog that has comments. If the commenter has a hovercard associated with their gravatar, mouse over their image and the hovercard will appear. To turn hovercards off, click the Deactivate button above.', 'jetpack' ); ?></p>
68
<?php
69
}
70
add_action( 'jetpack_module_more_info_gravatar-hovercards', 'grofiles_more_info' );
71
72
/**
73
 * Shortcodes
74
 */
75
function jetpack_shortcodes_load_more_link( $description ) {
76
	echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/shortcodes/" target="_blank">' . esc_html__( 'Learn More' , 'jetpack' ) . '</a>';
77
}
78
add_filter( 'jetpack_learn_more_button_shortcodes', 'jetpack_shortcodes_load_more_link' );
79
80
function jetpack_shortcodes_more_info() { ?>
81
	<div class="jp-info-img">
82
		<a href="http://en.support.wordpress.com/shortcodes/" target="_blank">
83
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/shortcodes.jpg' ) ?>" alt="<?php esc_attr_e( 'Shortcode Embeds', 'jetpack' ) ?>" width="300" height="150" />
84
		</a>
85
	</div>
86
87
	<p><?php esc_html_e( 'Shortcodes allow you to easily and safely embed media from other places in your site. With just one simple code, you can tell WordPress to embed YouTube, Flickr, and other media.', 'jetpack' ) ?></p>
88
	<p><?php esc_html_e( 'Enter a shortcode directly into the Post/Page editor to embed media. For specific instructions follow the links below.', 'jetpack' ) ?></p>
89
	<?php
90
	$codes = array( 'archives' => 'http://support.wordpress.com/archives-shortcode/',
91
		'bandcamp' => 'http://en.support.wordpress.com/audio/bandcamp/',
92
		'blip.tv' => 'http://support.wordpress.com/videos/bliptv/',
93
		'cartodb' => 'https://en.support.wordpress.com/cartodb-embeds/',
94
		'codepen' => 'https://en.support.wordpress.com/codepen-embeds/',
95
		'dailymotion' => 'http://support.wordpress.com/videos/dailymotion/',
96
		'facebook' => 'http://en.support.wordpress.com/facebook-integration/facebook-embeds/',
97
		'flickr' => 'http://support.wordpress.com/videos/flickr-video/',
98
		'gist' => 'http://en.support.wordpress.com/gist/',
99
		'googlemaps' => 'http://support.wordpress.com/google-maps/',
100
		'googleplus' => 'https://en.support.wordpress.com/google-plus-embeds/',
101
		'houzz' => 'https://en.support.wordpress.com/houzz-embeds/',
102
		'instagram' => 'https://en.support.wordpress.com/instagram/instagram-images/',
103
		'jetpack_subscription_form' => 'http://jetpack.com/support/subscriptions/#shortcode',
104
		'medium' => '',
105
		'mixcloud' => 'https://en.support.wordpress.com/mixcloud-audio-player/',
106
		'polldaddy' => 'http://support.polldaddy.com/wordpress-shortcodes/',
107
		'presentation' => 'http://en.support.wordpress.com/presentations/',
108
		'recipes' => 'http://en.support.wordpress.com/recipes/',
109
		'scribd' => 'http://support.wordpress.com/scribd/',
110
		'slideshare' => 'http://support.wordpress.com/slideshows/slideshare/',
111
		'slideshow' => 'http://en.support.wordpress.com/slideshows/',
112
		'soundcloud' => 'http://support.wordpress.com/audio/soundcloud-audio-player/',
113
		'ted' => 'http://en.support.wordpress.com/videos/ted-talks/',
114
		'twitchtv' => 'https://en.support.wordpress.com/videos/twitch-tv-shortcode/',
115
		'twitter-timeline' => 'http://en.support.wordpress.com/widgets/twitter-timeline-widget/#embedding-with-a-shortcode',
116
		// 'upcomingevents' => 'http://en.support.wordpress.com/widgets/upcoming-events/#events-list-shortcode',
117
		'vimeo' => 'http://support.wordpress.com/videos/vimeo/',
118
		'vine' => 'http://en.support.wordpress.com/videos/vine/',
119
		'wufoo' => 'https://en.support.wordpress.com/wufoo/',
120
		'youtube' => 'http://support.wordpress.com/videos/youtube/',
121
	);
122
123
	$codes['wpvideo (VideoPress)'] = 'http://en.support.wordpress.com/videopress/';
124
125
	$available = '';
126
	foreach ( $codes as $code => $url ) {
127
		$available[] = '<a href="' . $url . '" target="_blank">[' . $code . ']</a>';
128
129
	}
130
	?>
131
	<p><?php echo wp_sprintf( esc_html__( 'Available shortcodes are: %l.', 'jetpack' ), $available ); ?></p>
132
<?php
133
}
134
add_action( 'jetpack_module_more_info_shortcodes', 'jetpack_shortcodes_more_info' );
135
136
/**
137
 * Shortlinks
138
 */
139
function wpme_load_more_link( $description ) {
140
	echo '<a class="button-secondary more-info-link" href="http://wp.me/sf2B5-shorten" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
141
}
142
add_filter( 'jetpack_learn_more_button_shortlinks', 'wpme_load_more_link' );
143
144
function wpme_more_info() { ?>
145
	<div class="jp-info-img">
146
		<a href="http://wp.me/sf2B5-shorten" target="_blank">
147
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/shortlinks.jpg' ) ?>" alt="<?php esc_attr_e( 'WP.me Shortlinks', 'jetpack' ) ?>" width="300" height="150" />
148
		</a>
149
	</div>
150
151
	<p><?php esc_html_e( "Instead of typing or copy-pasting long URLs, you can now get a short and simple link to your posts and pages. This uses the super compact wp.me domain name, and gives you a unique URL you can use that will be safe and reliable.", 'jetpack' ) ?></p>
152
	<p><?php esc_html_e( "It&#8217;s perfect for use on Twitter, Facebook, and cell phone text messages where every character counts.", 'jetpack' ) ?></p>
153
	<p><?php esc_html_e( "To use shortlinks, go to any already published post (or publish something new!). A &#8220;Get Shortlink&#8221; button will be visible under the Post title. When you click it, a dialog box will appear with the shortlink and you can copy and paste to Twitter, Facebook or wherever your heart desires.", 'jetpack' ) ?></p>
154
<?php
155
}
156
add_action( 'jetpack_module_more_info_shortlinks', 'wpme_more_info' );
157
158
/**
159
 * Site Stats
160
 */
161
function stats_load_more_link( $description ) {
162
	echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/stats/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
163
}
164
add_filter( 'jetpack_learn_more_button_stats', 'stats_load_more_link' );
165
166
function stats_more_info() { ?>
167
	<div class="jp-info-img">
168
		<a href="http://en.support.wordpress.com/stats/" target="_blank">
169
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/stats.jpg' ) ?>" alt="<?php esc_attr_e( 'Site Stats', 'jetpack' ) ?>" width="300" height="150" />
170
		</a>
171
	</div>
172
173
	<p><?php esc_html_e( 'There are many plugins and services that provide statistics, but data can be overwhelming. Site Stats makes the most popular metrics easy to understand through a clear and attractive interface.', 'jetpack' ) ?></p>
174
	<p><?php printf( __( 'You can <a href="%s">view your stats dashboard here</a>.', 'jetpack' ), admin_url( 'admin.php?page=stats' ) ); ?></p>
175
<?php
176
}
177
add_action( 'jetpack_module_more_info_stats', 'stats_more_info' );
178
179
/**
180
 * Publicize
181
 */
182
function publicize_load_more_link( $description ) {
183
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/publicize/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
184
}
185
add_filter( 'jetpack_learn_more_button_publicize', 'publicize_load_more_link' );
186
187
function publicize_more_info() { ?>
188
	<div class="jp-info-img">
189
		<a href="http://en.support.wordpress.com/publicize/" target="_blank">
190
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/publicize.jpg' ) ?>" alt="<?php esc_attr_e( 'Publicize', 'jetpack' ) ?>" width="328" height="123" />
191
		</a>
192
	</div>
193
194
	<p><?php esc_html_e( 'Publicize allows you to connect your blog to popular social networking sites and automatically share new posts with your friends.	 You can make a connection for just yourself or for all users on your blog.', 'jetpack' ) ?></p>
195
	<p><?php esc_html_e( 'Publicize allows you to share your posts on Facebook, Twitter, Tumblr, Google+, Path, and Linkedin.', 'jetpack' ); ?></p>
196
197
<?php	if ( 'jetpack_module_more_info_connected_publicize' == current_filter() ) : ?>
198
199
	<p><?php printf( __( 'Manage your <a href="%s">Publicize settings</a>.', 'jetpack' ), menu_page_url( 'sharing', false ) ); ?>
200
201
<?php	endif; ?>
202
203
	<p>&rarr; <a href="http://jetpack.com/support/publicize/" target="_blank"><?php esc_html_e( 'More information on using Publicize.', 'jetpack' ); ?></a></p>
204
<?php
205
}
206
add_action( 'jetpack_module_more_info_publicize', 'publicize_more_info' );
207
208
/**
209
 * Notifications
210
 */
211
function notes_load_more_link( $description ) {
212
	echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/notifications/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
213
}
214
add_filter( 'jetpack_learn_more_button_notes', 'notes_load_more_link' );
215
216
function notes_more_info() { ?>
217
	<div class="jp-info-img">
218
		<a href="http://support.wordpress.com/notifications/" target="_blank">
219
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/notes.jpg' ) ?>" alt="<?php esc_attr_e( 'Notifications', 'jetpack' ) ?>" width="300" height="150" />
220
		</a>
221
	</div>
222
223
	<p><?php esc_html_e( 'Keep up with the latest happenings on all your WordPress sites and interact with other WordPress.com users.', 'jetpack' ) ?></p>
224
	<p><?php printf( __( 'You can view your notifications in the Toolbar and <a href="%s" target="_blank">on WordPress.com</a>.', 'jetpack' ), 'http://wordpress.com/#!/notifications/' ); ?></p>
225
<?php
226
}
227
add_filter( 'jetpack_module_more_info_notes', 'notes_more_info' );
228
229
/**
230
 * LaTeX
231
 */
232
function latex_load_more_link( $description ) {
233
	echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/latex/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
234
}
235
add_filter( 'jetpack_learn_more_button_latex', 'latex_load_more_link' );
236
237
function latex_more_info() { ?>
238
	<div class="jp-info-img">
239
		<a href="http://support.wordpress.com/latex/" target="_blank">
240
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/beautifulmath.jpg' ) ?>" alt="<?php esc_attr_e( 'LaTeX', 'jetpack' ) ?>" width="300" height="150" />
241
		</a>
242
	</div>
243
244
	<p><?php printf( esc_html__( '%s is a powerful markup language for writing complex mathematical equations, formulas, etc.', 'jetpack' ), '<a href="http://www.latex-project.org/" target="_blank"><img src="//s0.wp.com/latex.php?latex=%5CLaTeX&amp;bg=transparent&amp;fg=000&amp;s=-1" alt="LaTeX logo" title="LaTeX" style="vertical-align: -25%" /></a>' ); ?></p>
245
	<p><?php printf( esc_html__( 'Jetpack combines the power of %s and the simplicity of WordPress to give you the ultimate in math blogging platforms.', 'jetpack' ), '<img src="//s0.wp.com/latex.php?latex=%5CLaTeX&amp;bg=transparent&amp;fg=000&amp;s=-1" alt="LaTeX logo" title="LaTeX" style="vertical-align: -25%" />' ); ?></p>
246
	<p><?php printf( __( 'Use <code>$latex your latex code here$</code> or <code>[latex]your latex code here[/latex]</code> to include %s in your posts and comments. There are <a href="%s" target="_blank">all sorts of options</a> available.', 'jetpack' ), '<img src="//s0.wp.com/latex.php?latex=%5CLaTeX&amp;bg=transparent&amp;fg=000&amp;s=-1" alt="LaTeX logo" title="LaTeX" style="vertical-align: -25%" />', 'http://support.wordpress.com/latex/' ); ?></p>
247
	<p><?php esc_html_e( 'Wow, that sounds nerdy.', 'jetpack' ) ?></p>
248
<?php
249
}
250
add_action( 'jetpack_module_more_info_latex', 'latex_more_info' );
251
252
/**
253
 * Sharing
254
 */
255
function sharedaddy_load_more_link( $description ) {
256
	echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/sharing/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
257
}
258
add_filter( 'jetpack_learn_more_button_sharedaddy', 'sharedaddy_load_more_link' );
259
260
function sharedaddy_more_info() { ?>
261
	<div class="jp-info-img">
262
		<embed type="application/x-shockwave-flash" src="http://s0.videopress.com/player.swf?v=1.02" height="190" wmode="transparent" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=WV0JOwY2"></embed>
263
	</div>
264
	<p><?php esc_html_e( 'Share your posts with Twitter, Facebook, and a host of other services. You can configure services to appear as icons, text, or both. Some services have additional options to display smart buttons, such as Twitter, which will update the number of times the post has been shared.', 'jetpack' ); ?></p>
265
266
	<p><?php
267
		if ( is_multisite() ) {
268
			esc_html_e( 'The following services are included: Twitter, Facebook, Reddit, PressThis, Digg, LinkedIn, Google +1, Print, and Email.' , 'jetpack' );
269
		} else {
270
			esc_html_e( 'The following services are included: Twitter, Facebook, Reddit, Digg, LinkedIn, Google +1, Print, and Email.' , 'jetpack' );
271
		}
272
	?></p>
273
274
	<?php
275
	if ( class_exists( 'Sharing_Admin' ) ) {
276
		?>
277
278
		<p><?php printf( __( 'To configure your sharing settings, go to the Settings &rarr; <a href="%s">Sharing</a> menu.', 'jetpack' ), 'options-general.php?page=sharing' ); ?></p>
279
		<p><?php esc_html_e( 'Drag and drop sharing services into the enabled section to have them show up on your site, and drag them into the hidden section to have them hidden behind a button.', 'jetpack' ); ?>
280
281
		<?php
282
	}
283
	?>
284
285
	<p><?php printf( __( 'Full details can be found on the <a href="%s" target="_blank">Sharing support page</a>. This video also gives a swish run-down of how to use the Sharing feature. Watch it in HD for extra snazz!', 'jetpack' ), 'http://support.wordpress.com/sharing/' ); ?></p>
286
<?php
287
}
288
add_action( 'jetpack_module_more_info_sharedaddy', 'sharedaddy_more_info' );
289
290
/**
291
 * After The Deadline
292
 */
293
function jpatd_load_more_link( $description ) {
294
	echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/proofreading/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
295
}
296
add_filter( 'jetpack_learn_more_button_after-the-deadline', 'jpatd_load_more_link' );
297
298 View Code Duplication
function jpatd_more_info() { ?>
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
299
	<div class="jp-info-img">
300
		<a href="http://en.support.wordpress.com/proofreading/" target="_blank">
301
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/spelling.jpg' ) ?>" alt="<?php esc_attr_e( 'Spelling and Grammar', 'jetpack' ) ?>" width="300" height="150" />
302
		</a>
303
	</div>
304
305
	<p><?php printf( __( "The <a href='%s' target='_blank'>After&nbsp;the&nbsp;Deadline</a> Proofreading service improves your writing by using artificial intelligence to find your errors and offer smart suggestions.", 'jetpack' ), 'http://www.afterthedeadline.com/' ); ?></p>
306
	<p><?php printf( __( 'After the Deadline provides a number of <a href="%s">customization options</a>, which you can edit in your profile.', 'jetpack' ), esc_url( get_edit_profile_url( get_current_user_id() ) ) . '#atd' ); ?></p>
307
<?php
308
}
309
add_action( 'jetpack_module_more_info_after-the-deadline', 'jpatd_more_info' );
310
311
/**
312
 * Extra Sidebar Widgets
313
 */
314
function jetpack_widgets_load_more_link( $description ) {
315
	echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/widgets/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
316
}
317
add_filter( 'jetpack_learn_more_button_widgets', 'jetpack_widgets_load_more_link' );
318
319
function jetpack_widgets_more_info() { ?>
320
	<div class="jp-info-img">
321
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/widgets.jpg' ) ?>" alt="<?php esc_attr_e( 'Widgets Screenshot', 'jetpack' ) ?>" width="300" height="150" />
322
	</div>
323
324
	<p><?php printf( __( '<strong>The Twitter Widget</strong> shows your latest tweets within a sidebar on your theme.', 'jetpack' ) ); ?></p>
325
	<p><?php printf( __( '<strong>The Facebook Like Box Widget</strong> shows your Facebook Like Box within a sidebar on your theme.', 'jetpack' ) ); ?></p>
326
	<p><?php printf( __( '<strong>The Google+ Badge Widget</strong> allows you to display information about a person, a page, or a community from Google+.', 'jetpack' ) ); ?></p>
327
	<p><?php printf( __( '<strong>The Image Widget</strong> lets you easily add images to a sidebar on your theme.', 'jetpack' ) ); ?></strong> <?php esc_html_e( '', 'jetpack' ) ?></p>
328
	<p><?php printf( __( '<strong>The Gravatar Widget</strong> allows you to pull in your Gravatar image along with some of your Gravatar profile data.', 'jetpack' ) ); ?></p>
329
	<p><?php printf( __( '<strong>The Gallery Widget</strong> provides you with a simple way to display a photo gallery or slideshow in your blog’s sidebar. Requires the Tiled Gallery module.', 'jetpack' ) ); ?></p>
330
	<p><?php printf( __( '<strong>The Display WordPress Posts Widget</strong> lets you display up to ten recent posts from another WordPress.com blog, or a self-hosted WordPress site with Jetpack enabled.', 'jetpack' ) ); ?></p>
331
	<p><?php printf( __( '<strong>The Social Media Icons Widget</strong> lets you add icons for the most popular social networks to your sidebar or other widget area.', 'jetpack' ) ); ?></p>
332
	<p><?php printf( __( '<strong>The Contact Info Widget</strong> helps you display important information about your business. The widget allows you to show your business on a map, as well as your opening hours and contact information.', 'jetpack' ) ); ?></p>
333
	<p><?php printf( __( '<strong>The Goodreads Widget</strong> lets you display your Goodreads Shelf in your sidebar.', 'jetpack' ) ); ?></p>
334
	<!--<p><?php printf( __( '<strong>The Upcoming Events Widget</strong> allows you to use an iCalendar link to display a list of events on your site.', 'jetpack' ) ); ?></p>-->
335
336
	<p><?php esc_html_e( 'Each of these widgets has a number of customization options.', 'jetpack' ); ?>  <?php printf( __( 'To use the widgets, go to Appearance &#8594; <a href="%s">Widgets</a>. Drag them into one of your sidebars and configure away.', 'jetpack' ), admin_url( 'widgets.php' ) ); ?></p>
337
<?php
338
}
339
add_action( 'jetpack_module_more_info_widgets', 'jetpack_widgets_more_info' );
340
341
/**
342
 * Subscriptions
343
 */
344
function jetpack_subscriptions_load_more_link() {
345
	echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/following/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
346
}
347
add_action( 'jetpack_learn_more_button_subscriptions', 'jetpack_subscriptions_load_more_link' );
348
349
function jetpack_subscriptions_more_info() { ?>
350
	<div class="jp-info-img">
351
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/subscriptions.jpg' ) ?>" alt="<?php esc_attr_e( 'Subsriptions Screenshot', 'jetpack' ) ?>" width="300" height="150" />
352
	</div>
353
354
	<p><?php esc_html_e( 'Easily allow any visitor to subscribe to all of your posts via email through a widget in your blog&#8217;s sidebar.  Every time you publish a post, WordPress.com will send a notification to all your subscribers.', 'jetpack' ); ?></p>
355
	<p><?php esc_html_e( 'When leaving comments, your visitors can also subscribe to a post&#8217;s comments to keep up with the conversation.', 'jetpack' ); ?></p>
356
357
	<p><?php printf(
358
		__( 'To use the Subscriptions widget, go to Appearance &#8594; <a href="%s">Widgets</a>. Drag the widget labeled &#8220;Blog Subscriptions (Jetpack)&#8221; into one of your sidebars and configure away.', 'jetpack' ),
359
		admin_url( 'widgets.php' )
360
	); ?></p>
361
	<p><?php printf(
362
		__( 'You can also make changes to your Subscription settings at the bottom of the <a href="%s">Discussion Settings</a> page.', 'jetpack' ),
363
		admin_url( 'options-discussion.php#jetpack-subscriptions-settings' )
364
	); ?></p>
365
	<p><?php printf(
366
		__( 'To customize the emails sent from your blog to your followers, check the settings at the bottom of the <a href="%s">Reading Settings</a> page.', 'jetpack' ),
367
		admin_url( 'options-reading.php#follower-settings' )
368
	); ?></p>
369
<?php
370
}
371
add_action( 'jetpack_module_more_info_subscriptions', 'jetpack_subscriptions_more_info' );
372
373
/**
374
 * Enhanced Distribution
375
 */
376
function jetpack_enhanced_distribution_more_link() {
377
	echo '<a class="button-secondary more-info-link" href="http://en.wordpress.com/firehose/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
378
}
379
add_action( 'jetpack_learn_more_button_enhanced-distribution', 'jetpack_enhanced_distribution_more_link' );
380
381
function jetpack_enhanced_distribution_more_info() { ?>
382
	<p><?php esc_html_e( 'Jetpack will automatically take the great published content from your blog or website and share it instantly with third party services like search engines, increasing your reach and traffic.', 'jetpack' ); ?></p>
383
<?php
384
}
385
add_action( 'jetpack_module_more_info_enhanced-distribution', 'jetpack_enhanced_distribution_more_info' );
386
387
388
/**
389
 * Protect
390
 */
391
function jetpack_protect_more_link() {
392
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/protect/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
393
}
394
add_action( 'jetpack_learn_more_button_protect', 'jetpack_protect_more_link' );
395
396
function jetpack_protect_more_info() { ?>
397
	<p><?php esc_html_e( 'Protect is a cloud-powered brute force attack prevention tool. We leverage the millions of WordPress sites to identify and block malicious IPs.
398
399
Protect tracks failed login attempts across all Jetpack-connected sites using the Protect module.  If any single IP has too many failed attempts in a short period of time, they are blocked from logging in to any site with this plugin installed.
400
401
Protect is derived from BruteProtect, and will disable BruteProtect on your site if it is currently enabled.', 'jetpack' ); ?></p><?php
402
}
403
404
add_action( 'jetpack_module_more_info_protect', 'jetpack_protect_more_info' );
405
406
/**
407
 * JSON API
408
 */
409
function jetpack_json_api_more_link() {
410
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/json-api/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
411
}
412
add_action( 'jetpack_learn_more_button_json-api', 'jetpack_json_api_more_link' );
413
414
function jetpack_json_api_more_info() { ?>
415
	<p><?php esc_html_e( 'Jetpack will allow you to authorize applications and services to securely connect to your blog and allow them to use your content in new ways and offer you new functionality.', 'jetpack' ); ?>
416
417
	<p><?php _e( "Developers can use WordPress.com's <a href='http://developer.wordpress.com/docs/oauth2/' target='_blank'>OAuth2</a> authentication system and <a href='http://developer.wordpress.com/docs/api/' target='_blank'>WordPress.com REST API</a> to manage and access your site's content.", 'jetpack' ); ?></p>
418
419
<?php
420
}
421
add_action( 'jetpack_module_more_info_json-api', 'jetpack_json_api_more_info' );
422
423
424
/**
425
 * Contact Form
426
 */
427
function jetpack_contact_form_learn_more_button() {
428
	echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/contact-form/" target="_blank">' . __( 'Learn More', 'jetpack' ) . '</a>';
429
}
430
add_action( 'jetpack_learn_more_button_contact-form', 'jetpack_contact_form_learn_more_button' );
431
432
function jetpack_contact_form_more_info() {
433
	echo '<div class="jp-info-img">';
434
	echo '<a href="http://support.wordpress.com/contact-form/" target="_blank">';
435
	echo '<img class="jp-info-img" src="' . plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/contactform.jpg' ) . '" alt="' . esc_attr__( 'Contact Form', 'jetpack' ) . '" width="300" height="150" />';
436
	echo '</a>';
437
	echo '</div>';
438
439
	echo '<p>';
440
	_e( 'A contact form is a great way to offer your readers the ability to get in touch, without giving out your personal email address.', 'jetpack' );
441
	echo '</p>';
442
443
	echo '<p>';
444
	printf(
445
		__( 'Each contact form can easily be customized to fit your needs. When a user submits your contact form, the feedback will be filtered through <a href="http://akismet.com/" target="_blank">Akismet</a> (if it is <a href="%s">active on your site</a>) to make sure it’s not spam. Any legitimate feedback will then be emailed to you, and added to your feedback management area.', 'jetpack' ),
446
		admin_url( 'plugin-install.php?tab=search&s=akismet' )
447
	);
448
	echo '</p>';
449
}
450
add_action( 'jetpack_module_more_info_contact-form', 'jetpack_contact_form_more_info' );
451
452
453
/**
454
 * Comments
455
 */
456
function jetpack_comments_learn_more_button() {
457
	echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
458
}
459
add_action( 'jetpack_learn_more_button_comments', 'jetpack_comments_learn_more_button' );
460
461
function jetpack_comments_more_info() {
462
?>
463
	<div class="jp-info-img">
464
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/comments.jpg' ) ?>" alt="<?php esc_attr_e( 'Comments Screenshot', 'jetpack' ) ?>" width="300" height="150" />
465
	</div>
466
467
	<p><?php esc_html_e( 'Comments enables your visitors to use their WordPress.com, Twitter, or Facebook accounts when commenting on your site.', 'jetpack' ); ?></p>
468
469
	<p><?php printf(
470
		__( "Jetpack tries to match your site's color scheme automatically, but you can make manual adjustments at the bottom of the <a href='%s'>Discussion Settings</a> page.", 'jetpack' ),
471
		admin_url( 'options-discussion.php#jetpack-comments-settings' )
472
	); ?></p>
473
<?php
474
}
475
add_action( 'jetpack_module_more_info_comments', 'jetpack_comments_more_info' );
476
477
/**
478
 * Carousel
479
 */
480
function jetpack_carousel_learn_more_button() {
481
	echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
482
}
483
add_action( 'jetpack_learn_more_button_carousel', 'jetpack_carousel_learn_more_button' );
484
485
function jetpack_carousel_more_info() {
486
?>
487
	<div class="jp-info-img">
488
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/carousel.jpg' ) ?>" alt="<?php esc_attr_e( 'Gallery Carousel Screenshot', 'jetpack' ) ?>" width="300" height="188" />
489
	</div>
490
491
	<p><?php esc_html_e( 'With Carousel active, any standard WordPress galleries you have embedded in posts or pages will launch a gorgeous full-screen photo browsing experience with comments and EXIF metadata.', 'jetpack' ); ?></p>
492
<?php
493
}
494
add_action( 'jetpack_module_more_info_carousel', 'jetpack_carousel_more_info' );
495
496
/**
497
 * Custom CSS
498
 */
499
function jetpack_custom_css_more_button() {
500
	echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
501
}
502
add_action( 'jetpack_learn_more_button_custom-css', 'jetpack_custom_css_more_button' );
503
504 View Code Duplication
function jetpack_custom_css_more_info() { ?>
505
	<div class="jp-info-img">
506
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/custom-css.jpg' ) ?>" alt="<?php esc_attr_e( 'Custom CSS', 'jetpack' ) ?>" width="300" height="150" />
507
	</div>
508
509
	<p><?php esc_html_e( "The Custom CSS editor gives you the ability to add to or replace your theme's CSS, all while supplying syntax coloring, auto-indentation, and immediate feedback on the validity of the CSS you're writing.", 'jetpack' ); ?></p>
510
511
	<?php if ( Jetpack::is_module_active( 'custom-css' ) ) : ?>
512
513
		<p><?php printf( __( 'To use the CSS editor, go to Appearance &#8594; <a href="%s">Edit CSS</a>.', 'jetpack' ), admin_url( 'themes.php?page=editcss' ) ); ?></p>
514
515
	<?php else : ?>
516
517
		<p><?php esc_html_e( 'After activating this module, find the editor in Appearance &#8594; Edit CSS.', 'jetpack' ); ?></p>
518
519
	<?php endif;
520
}
521
add_action( 'jetpack_module_more_info_custom-css', 'jetpack_custom_css_more_info' );
522
523
/**
524
 * Mobile Theme
525
 */
526
function jetpack_minileven_more_button() {
527
	echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
528
}
529
add_action( 'jetpack_learn_more_button_minileven', 'jetpack_minileven_more_button' );
530
531
function jetpack_minileven_more_info() { ?>
532
	<div class="jp-info-img">
533
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/mobile-theme.jpg' ) ?>" alt="<?php esc_attr_e( 'Mobile Theme', 'jetpack' ) ?>" width="300" height="150" />
534
	</div>
535
536
	<p><?php esc_html_e( "There's a good chance that visitors to your site will be using a smartphone, and it's important to provide them with a great reading experience while on the small screen.", 'jetpack' ); ?></p>
537
	<p><?php esc_html_e( "Jetpack's mobile theme is optimized for small screens. It uses the header image, background, and widgets from your current theme for a great custom look. Post format support is included, so your photos and galleries will look fantastic on a smartphone.", 'jetpack' ); ?></p>
538
	<p><?php esc_html_e( 'Visitors on iPhone, Android, Windows Phone, and other mobile devices will automatically see the mobile theme, with the option to view the full site. You can enable or disable the mobile theme by clicking the "Activate" or "Deactive" button above.', 'jetpack' ); ?></p>
539
<?php
540
}
541
add_action( 'jetpack_module_more_info_minileven', 'jetpack_minileven_more_info' );
542
543
/**
544
 * Infinite Scroll
545
 */
546
function jetpack_infinite_scroll_more_button() {
547
	echo '<a class="button more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
548
}
549
add_action( 'jetpack_learn_more_button_infinite-scroll', 'jetpack_infinite_scroll_more_button' );
550
551
function jetpack_infinite_scroll_more_info() {
552
	$support_text = sprintf( __( 'If you are a theme author, you can learn about adding support for Infinite Scroll at <a href="%1$s" target="_blank">%1$s</a>.', 'jetpack' ), 'http://jetpack.com/support/infinite-scroll/' );
553
554
	?>
555
556
	<?php if ( ! Jetpack::is_active() || ( Jetpack::is_active() && current_theme_supports( 'infinite-scroll' ) ) ) : ?>
557
		<p><?php esc_html_e( 'When you write great content, all you really want is people to find it, right?', 'jetpack' ); ?></p>
558
559
		<p><?php esc_html_e( "With the Infinite Scroll module and a supported theme, that's exactly what happens. Instead of the old way of navigating down a page by scrolling and then clicking a link to get to the next page, waiting for a page refresh&mdash;the document model of the web&mdash;infinite scrolling pulls the next set of posts automatically into view when the reader approaches the bottom of the page, more like an application.", 'jetpack' ); ?></p>
560
561
	<?php else : ?>
562
		<p><?php echo esc_html( sprintf( __( "At this time, your theme, %s, doesn't support Infinite Scroll. Unlike other Jetpack modules, Infinite Scroll needs information from your theme to function properly.", 'jetpack' ), ( function_exists( 'wp_get_theme' ) ? wp_get_theme()->Name : get_current_theme() ) ) ); ?></p>
563
564
		<p><?php esc_html_e( "Until your theme supports Infinite Scroll, you won't be able to activate this module.", 'jetpack' ); ?></p>
565
566
		<?php
567
568
		if ( current_user_can( 'update_themes' ) ) :
569
			ob_start();
570
			theme_update_available( function_exists( 'wp_get_theme' ) ? wp_get_theme() : (object) get_theme( get_current_theme() ) );
571
			$theme_update_available = ob_get_clean();
572
573
			if ( ! empty( $theme_update_available ) ) : ?>
574
				<p><?php printf( __( 'There is an update available for your theme. You may wish to check if this update adds Infinite Scroll support by visiting the <a href="%s">WordPress Updates</a> page.', 'jetpack' ), esc_url( admin_url( 'update-core.php' ) ) ); ?></p>
575
			<?php else : ?>
576
				<p><?php echo $support_text; ?></p>
577
			<?php endif; ?>
578
		<?php else : ?>
579
			<p><?php echo $support_text; ?></p>
580
		<?php endif; ?>
581
	<?php endif;
582
}
583
add_action( 'jetpack_module_more_info_infinite-scroll', 'jetpack_infinite_scroll_more_info' );
584
585
/**
586
 * Post by Email
587
 */
588
function jetpack_post_by_email_more_link() {
589
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/post-by-email/" target="_blank">' . __( 'Learn More', 'jetpack' ) . '</a>';
590
}
591
add_action( 'jetpack_learn_more_button_post-by-email', 'jetpack_post_by_email_more_link' );
592
593 View Code Duplication
function jetpack_post_by_email_more_info() { ?>
594
	<div class="jp-info-img">
595
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/post-by-email.jpg' ) ?>" alt="<?php esc_attr_e( 'Post by Email', 'jetpack' ) ?>" width="300" height="115" />
596
	</div>
597
598
	<p><?php esc_html_e( 'Post by Email is a way of publishing posts on your blog by email. Any email client can be used to send the email, allowing you to publish quickly and easily from devices such as cell phones.', 'jetpack' ); ?></p>
599
600
	<p><?php printf( __( 'Manage your Post By Email address from your <a href="%s">profile settings</a>.', 'jetpack' ), esc_url( get_edit_profile_url( get_current_user_id() ) . '#post-by-email' ) ); ?>
601
602
	<p>&rarr; <a href="http://jetpack.com/support/post-by-email/" target="_blank"><?php esc_html_e( 'More information on sending emails, attachments, and customizing your posts.', 'jetpack' ); ?></a></p>
603
604
<?php
605
}
606
add_action( 'jetpack_module_more_info_post-by-email', 'jetpack_post_by_email_more_info' );
607
608
/**
609
 * Photon
610
 */
611
function jetpack_photon_more_link() {
612
	echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
613
}
614
add_action( 'jetpack_learn_more_button_photon', 'jetpack_photon_more_link' );
615
616
function jetpack_photon_more_info() { ?>
617
	<p><?php esc_html_e( "Give your site a boost by loading images in posts from the WordPress.com content delivery network. We cache your images and serve them from our super-fast network, reducing the burden on your Web host with the click of a button.", 'jetpack' ); ?></p>
618
<?php
619
}
620
add_action( 'jetpack_module_more_info_photon', 'jetpack_photon_more_info' );
621
622
/**
623
 * Tiled Galleries
624
 */
625
function jetpack_tiled_gallery_more_link() {
626
	echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
627
}
628
add_action( 'jetpack_learn_more_button_tiled-gallery', 'jetpack_tiled_gallery_more_link' );
629
630 View Code Duplication
function jetpack_tiled_gallery_more_info() { ?>
631
	<div class="jp-info-img">
632
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/tiled-gallery.jpg' ) ?>" alt="<?php esc_attr_e( 'Tiled Galleries', 'jetpack' ) ?>" width="300" height="150" />
633
	</div>
634
635
	<p><?php esc_html_e( 'Create elegant magazine-style mosaic layouts for your photos without having to use an external graphic editor.', 'jetpack' ); ?></p>
636
	<p><?php printf( __( 'When adding a gallery to your post, you now have the option to select a layout style for your images. We\'ve added support for Rectangular, Square, and Circular galleries. By default, galleries will continue to display using the standard thumbnail grid layout. To make the rectangular layout the default for all of your site\'s galleries, head over to <a href="%s">Settings &rarr; Media</a> and check the box next to "Display all your gallery pictures in a cool mosaic."', 'jetpack' ), admin_url( 'options-media.php' ) ); ?></p>
637
	<p><em><?php esc_html_e( 'Note: Images in tiled galleries require extra-special processing, so they will be served from WordPress.com\'s CDN even if the Photon module is disabled.', 'jetpack' ); ?></em></p>
638
<?php
639
}
640
add_action( 'jetpack_module_more_info_tiled-gallery', 'jetpack_tiled_gallery_more_info' );
641
642
/**
643
 * Likes
644
 */
645
function jetpack_likes_more_link() {
646
	echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
647
}
648
add_action( 'jetpack_learn_more_button_likes', 'jetpack_likes_more_link' );
649
650
function jetpack_likes_more_info() { ?>
651
652
	<div class="jp-info-img">
653
		<a href="http://jetpack.com/support/likes/" target="_blank">
654
			<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/likes.jpg' ) ?>" alt="<?php esc_attr_e( 'Likes', 'jetpack' ) ?>" width="323" height="69" />
655
		</a>
656
	</div>
657
658
	<p><?php esc_html_e( 'Likes allow your readers to show their appreciation for your posts and other published content using their WordPress.com accounts. Your readers will then be able to review their liked posts from WordPress.com.', 'jetpack' ) ?></p>
659
	<p><?php esc_html_e( 'Displayed below your posts will be how many people have liked your posts and the Gravatars of those who have liked them.', 'jetpack' ); ?></p>
660
	<?php if ( current_user_can( 'jetpack_manage_modules' ) ) : ?>
661
	<p><?php esc_html_e( 'You can turn Likes on by following these steps:', 'jetpack' ); ?></p>
662
	<ol>
663
		<li><?php esc_html_e( 'Make sure the module is activated by clicking on "Activate" at the bottom of this page.', 'jetpack' ); ?></li>
664
		<li><?php esc_html_e( 'Go to Settings > Sharing in your Dashboard.', 'jetpack' ); ?></li>
665
		<li><?php esc_html_e( 'Ensure that "WordPress.com Likes are…" is set to "On for all posts"', 'jetpack' ); ?></li>
666
	</ol>
667
	<?php endif; ?>
668
	<p>&rarr; <a href="http://jetpack.com/support/likes/" target="_blank"><?php esc_html_e( 'More information on using Likes.', 'jetpack' ); ?></a></p>
669
670
<?php
671
}
672
add_action( 'jetpack_module_more_info_likes', 'jetpack_likes_more_info' );
673
674
/**
675
 * Omnisearch
676
 */
677
function jetpack_omnisearch_more_link() {
678
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/omnisearch/" target="_blank">' . __( 'Learn More', 'jetpack' ) . '</a>';
679
}
680
add_action( 'jetpack_learn_more_button_omnisearch', 'jetpack_omnisearch_more_link' );
681
682
function jetpack_omnisearch_more_info() { ?>
683
684
	<p><?php esc_html_e( 'Search once, get results from everything! Currently supports searching posts, pages, comments, media, and plugins.', 'jetpack' ); ?></p>
685
686
	<p><?php esc_html_e( 'Omnisearch plays nice with other plugins by letting other providers offer results as well.', 'jetpack' ); ?></p>
687
688
	<?php if( class_exists( 'Jetpack_Omnisearch' ) && current_user_can( 'edit_posts' ) ): ?>
689
		<?php echo Jetpack_Omnisearch::get_omnisearch_form(); ?>
690
	<?php endif; ?>
691
692
<?php
693
}
694
add_action( 'jetpack_module_more_info_omnisearch',  'jetpack_omnisearch_more_info' );
695
696
/**
697
 * Widget Visibility
698
 */
699
function jetpack_widget_visibility_more_link() {
700
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/widget-visibility/" target="_blank">' . __( 'Learn More', 'jetpack' ) . '</a>';
701
}
702
add_action( 'jetpack_learn_more_button_widget-visibility', 'jetpack_widget_visibility_more_link' );
703
704
function jetpack_widget_visibility_more_info() { ?>
705
	<p><?php esc_html_e( 'Control which pages your widgets appear on with Widget Visibility.', 'jetpack' ); ?></p>
706
	<p><?php esc_html_e( 'To control visibility, expand the widget and click the Visibility button next to the Save button, and then, choose a set of visibility options.', 'jetpack' ); ?></p>
707
	<p><?php esc_html_e( 'For example, if you wanted the Archives widget to only appear on category archives and error pages, choose "Show" from the first dropdown and then add two rules: "Page is 404 Error Page" and "Category is All Category Pages."', 'jetpack' ); ?></p>
708
	<p><?php esc_html_e( 'You can also hide widgets based on the current page. For example, if you don\'t want the Archives widget to appear on search results pages, choose "Hide" and "Page is Search results."', 'jetpack' ); ?></p>
709
<?php
710
}
711
add_action( 'jetpack_module_more_info_widget-visibility',  'jetpack_widget_visibility_more_info' );
712
713
/**
714
 * VideoPress
715
 */
716
function jetpack_videopress_more_link() {
717
	echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
718
}
719
add_action( 'jetpack_learn_more_button_videopress', 'jetpack_videopress_more_link' );
720
721
function jetpack_videopress_more_info() { ?>
722
	<p><?php printf(
723
		__( 'With the VideoPress module you can easily upload videos to your WordPress site and embed them in your posts and pages. This module requires a WordPress.com account with an active <a href="%1$s" target="_blank">VideoPress subscription</a>. Once you have purchased a VideoPress subscription, <a href="%2$s">click here to configure VideoPress</a>.', 'jetpack' ),
724
		'http://store.wordpress.com/premium-upgrades/videopress/',
725
		Jetpack::admin_url( 'page=jetpack&configure=videopress' )
726
	); ?></p>
727
<?php
728
}
729
add_action( 'jetpack_module_more_info_videopress', 'jetpack_videopress_more_info' );
730
731
/**
732
 * SSO
733
 */
734
function jetpack_sso_more_link() {
735
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/sso/" target="_blank">' . __( 'Learn More', 'jetpack' ) . '</a>';
736
}
737
add_action( 'jetpack_learn_more_button_sso', 'jetpack_sso_more_link' );
738
739
function jetpack_sso_more_info() { ?>
740
741
	<p><?php esc_html_e( 'With Single Sign On, your users will be able to log in to or register for your WordPress site with the same credentials they use on WordPress.com.  It\'s safe and secure.' , 'jetpack' ); ?></p>
742
	<p><?php esc_html_e( 'Once enabled, a "Log in with WordPress.com" option will be added to your existing log in form.' , 'jetpack' ); ?></p>
743
744
<?php
745
}
746
add_action( 'jetpack_module_more_info_sso',  'jetpack_sso_more_info' );
747
748
/**
749
 * Monitor
750
 */
751
function jetpack_monitor_more_link() {
752
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/monitor/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
753
}
754
add_action( 'jetpack_learn_more_button_monitor', 'jetpack_monitor_more_link' );
755
756
function jetpack_monitor_more_info() { ?>
757
758
	<p><?php esc_html_e( 'Nobody likes downtime, and that\'s why Jetpack Monitor is on the job, keeping tabs on your site by checking it every five minutes. As soon as any downtime is detected, you will receive an email notification alerting you to the issue. That way you can act quickly, to get your site back online again!', 'jetpack' ); ?>
759
760
	<p><?php esc_html_e( 'We’ll also let you know as soon as your site is up and running, so you can keep an eye on total downtime.', 'jetpack'); ?></p>
761
762
<?php
763
}
764
add_action( 'jetpack_module_more_info_monitor', 'jetpack_monitor_more_info' );
765
766
/**
767
 * Related Posts
768
 */
769
function jetpack_related_posts_more_button() {
770
	echo '<a class="button more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
771
}
772
add_action( 'jetpack_learn_more_button_related-posts', 'jetpack_related_posts_more_button' );
773
774
function jetpack_related_posts_more_info() {
775
	$template = <<<EOT
776
		<div class="jp-info-img">
777
			<a href="http://jetpack.com/support/related-posts/" target="_blank">
778
				<img class="jp-info-img" src="%s" alt="%s" width="300" height="98" />
779
			</a>
780
		</div>
781
782
		<p>%s</p>
783
		<p>&rarr; <a href="http://jetpack.com/support/related-posts/" target="_blank">%s</a></p>
784
		<hr />
785
		<p><a href="%s#sync-related-posts">%s</a></p>
786
EOT;
787
	printf(
788
		$template,
789
		plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/related-posts.jpg' ),
790
		esc_attr__( 'Related Posts', 'jetpack' ),
791
		esc_html__( '"Related Posts" shows additional relevant links from your site under your posts. If the feature is enabled, links appear underneath your Sharing Buttons and WordPress.com Likes (if you’ve turned these on).', 'jetpack' ),
792
		esc_html__( 'More information on using Related Posts.', 'jetpack' ),
793
		esc_url( Jetpack::admin_url( array( 'page' => 'jetpack-debugger' ) ) ),
794
		esc_html__( 'This feature uses the WordPress.com infrastructure and requires that your public content be mirrored there. If you see intermittent issues only affecting certain posts, request a reindex of your posts.', 'jetpack' )
795
	);
796
}
797
add_action( 'jetpack_module_more_info_related-posts', 'jetpack_related_posts_more_info' );
798
799
/**
800
 * Markdown
801
 */
802
function jetpack_markdown_more_link() {
803
	echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/markdown/" target="_blank">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
804
}
805
add_action( 'jetpack_learn_more_button_markdown', 'jetpack_markdown_more_link' );
806
807
function jetpack_markdown_more_info() { ?>
808
	<p><?php esc_html_e( 'Markdown lets you compose posts and comments with links, lists, and other styles using regular characters and punctuation marks. Markdown is used by writers and bloggers who want a quick and easy way to write rich text, without having to take their hands off the keyboard, and without learning a lot of complicated codes and shortcuts.', 'jetpack' ); ?></p>
809
810
<?php
811
}
812
add_action( 'jetpack_module_more_info_markdown', 'jetpack_markdown_more_info' );
813
814
/**
815
 * Site Verification Tools
816
 */
817
function jetpack_verification_tools_more_link() {
818
	echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/webmaster-tools/" target="_blank">' . __( 'Learn More', 'jetpack' ) . '</a>';
819
}
820
add_action( 'jetpack_learn_more_button_verification-tools', 'jetpack_verification_tools_more_link' );
821
822
function jetpack_verification_tools_more_info() { ?>
823
	<p><?php esc_html_e( 'Use these tools to verify that you own/control your website with other external services like Google, Bing and Pinterest.', 'jetpack' ); ?></p>
824
	<p><?php printf( __( "Verifying your site allows you to access advanced features on these other services (e.g. Webmaster tools, Google Search Console, or getting a verified badge). We'll just add an invisible %s tag to the source code of your homepage.", 'jetpack' ), '<code>meta</code>' ); ?></p>
825
<?php
826
}
827
add_action( 'jetpack_module_more_info_verification-tools', 'jetpack_verification_tools_more_info' );
828
829
/**
830
 * Custom Content Types
831
 */
832
function jetpack_custom_content_types_more_link() {
833
	echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/portfolios/" target="_blank">' . __( 'Learn More', 'jetpack' ) . '</a>';
834
}
835
add_action( 'jetpack_learn_more_button_custom-content-types', 'jetpack_custom_content_types_more_link' );
836
837
function jetpack_custom_content_types_more_info() { ?>
838
839
	<div class="jp-info-img">
840
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/custom-content-types.jpg' ) ?>" alt="<?php esc_attr_e( 'Custom Content Type', 'jetpack' ) ?>" width="300" height="150" />
841
	</div>
842
843
	<p><?php esc_html_e( 'Organize and display different types of content on your site, such as Portfolio Projects and Testimonials. These content types are separate from Posts and Pages.', 'jetpack' ); ?></p>
844
845
	<?php if ( Jetpack::is_module_active( 'custom-content-types' ) ) : ?>
846
847
		<p><?php printf( __( 'To enable a custom content type, head over to <a href="%s">Settings &rarr; Writing &rarr; Your Custom Content Types</a> and activate either "Portfolio Projects” or “Testimonials” by checking the corresponding checkbox. You can now add projects and testimonials under the new "Portfolio” and “Testimonials” menu items in your sidebar.', 'jetpack' ), admin_url( 'options-writing.php#cpt-options' ) ); ?></p>
848
849
		<p><?php
850
			/* translators: all variables are URLs */
851
			printf(
852
				__(
853
					'Once added, your custom content will be visible on your website at <a href="%1$s">%1$s</a> or <a href="%2$s">%2$s</a>, or you may add them with <a href="%3$s" target="_blank">shortcodes</a>.',
854
					'jetpack'
855
				),
856
				get_site_url() . '/portfolio/',
857
				get_site_url() . '/testimonial/',
858
				'http://jetpack.com/support/custom-content-types/'
859
			);
860
		?></p>
861
862
	<?php else : ?>
863
864
			<p><?php esc_html_e( 'Once activated, you can selectively activate the content types you need at Settings &rarr; Writing &rarr; Your Custom Content Types.', 'jetpack'); ?></p>
865
866
            <p><?php echo wp_kses( sprintf( __( 'Full details can be found on the <a href="%s" title="Custom Content Types support page" target="_blank">Custom Content Types support page</a>.', 'jetpack' ), 'https://jetpack.com/support/custom-content-types/' ), array( 'a' => array( 'href' => true, 'title' => true, 'target' => true ) ) ); ?></p>
867
868
	<?php endif;
869
}
870
add_action( 'jetpack_module_more_info_custom-content-types', 'jetpack_custom_content_types_more_info' );
871
872
/**
873
 * Site Icon
874
 */
875
function jetpack_site_icon_more_link() {
876
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/site-icon" target="_blank">' . __( 'Learn More', 'jetpack' ) . '</a>';
877
}
878
add_action( 'jetpack_learn_more_button_site-icon', 'jetpack_site_icon_more_link' );
879
880
function jetpack_custom_site_icon() { ?>
881
882
	<div class="jp-info-img">
883
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/site-icon.png' ) ?>" alt="<?php esc_attr_e( 'Site Icon', 'jetpack' ) ?>" width="300" height="150" />
884
	</div>
885
886
	<p><?php esc_html_e( 'Site Icon lets you create an icon for your site. This icon will be used as favicon, mobile icon, and Tile on Windows 8 computers.', 'jetpack' ); ?></p>
887
	<p><?php printf( __( 'To add a new icon to your site, head over to <a href="%s">Settings &rarr; General &rarr; Site Icon</a>, and upload an icon.', 'jetpack' ), admin_url( 'options-general.php#site-icon' ) ); ?></p>
888
889
<?php
890
}
891
add_action( 'jetpack_module_more_info_site-icon', 'jetpack_custom_site_icon' );
892
893
/**
894
 * Manage
895
 */
896
function jetpack_manage_more_link() {
897
	echo '<a class="button-secondary more-info-link" href="http://jetpack.com/support/site-management/" target="_blank">' . __( 'Learn More', 'jetpack' ) . '</a>';
898
}
899
add_action( 'jetpack_learn_more_button_manage', 'jetpack_manage_more_link' );
900
901 View Code Duplication
function jetpack_custom_jetpack_manage() { ?>
902
903
	<div class="jp-info-img">
904
		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/manage.jpg' ) ?>" alt="<?php esc_attr_e( 'Manage all of your WordPress sites, self-hosted or not, from WordPress.com', 'jetpack' ) ?>" width="300" height="150" />
905
	</div>
906
907
	<p><em><?php esc_html_e( 'Enabling Manage allows you to update your self-hosted WordPress sites along with any WordPress.com sites you have, all in one simple dashboard.', 'jetpack' ); ?></em></p>
908
	<p><strong><?php _e( 'Plugins', 'jetpack' ); ?></strong><br />
909
		<?php printf( __( 'Now you can update plugins, set plugins to automatically update, and activate or deactivate plugins on a per-site basis or in bulk from <a href="%s" target="_blank">wordpress.com/plugins</a>.', 'jetpack' ), 'https://wordpress.com/plugins' ); ?></p>
910
911
	<p><strong><?php _e( 'Themes', 'jetpack' ); ?></strong><br />
912
		<?php printf( __( 'List your installed themes, search, and activate them from <a href="%s" target="_blank">wordpress.com/design</a>.', 'jetpack' ), 'https://wordpress.com/design' ); ?></p>
913
914
	<p><strong><?php _e( 'Menus', 'jetpack' ); ?></strong><br />
915
		<?php printf( __( 'Create a new menu for your site, or edit existing menus from <a href="%s" target="_blank">wordpress.com/menus</a>.', 'jetpack' ), 'https://wordpress.com/menus' ); ?></p>
916
917
<?php
918
}
919
add_action( 'jetpack_module_more_info_manage', 'jetpack_custom_jetpack_manage' );
920
921
// XML Sitemap: START
922
function jetpack_xml_sitemap_more_info() { ?>
923
	<p><?php esc_html_e( 'This module creates two XML sitemap files that list the URLs of posts and pages in your site with important information about each one. This files can be accessed by search engines like Google or Bing so they can crawl and understand your site.', 'jetpack' ); ?></p>
924
	<?php if ( '0' == get_option( 'blog_public' ) ) : ?>
925
		<p><strong><?php esc_html_e( 'Your site is currently set to discourage search engines from indexing it so the sitemap will not be accessible.', 'jetpack' ); ?></strong></p>
926
	<?php else :
927
		if ( get_option( 'permalink_structure' ) ) {
928
			/** This filter is documented in modules/sitemaps/sitemaps.php */
929
			$sitemap_url = apply_filters( 'jetpack_sitemap_location', home_url( '/sitemap.xml' ) );
930
			/** This filter is documented in modules/sitemaps/sitemaps.php */
931
			$news_sitemap_url = apply_filters( 'jetpack_news_sitemap_location', home_url( '/news-sitemap.xml' ) );
932
		} else {
933
			/** This filter is documented in modules/sitemaps/sitemaps.php */
934
			$sitemap_url = apply_filters( 'jetpack_sitemap_location', home_url( '/?jetpack-sitemap=true' ) );
935
			/** This filter is documented in modules/sitemaps/sitemaps.php */
936
			$news_sitemap_url = apply_filters( 'jetpack_news_sitemap_location', home_url( '/?jetpack-news-sitemap=true' ) );
937
		}
938
		if ( Jetpack::is_module_active( 'sitemaps' ) ) : ?>
939
			<p><?php esc_html_e( 'Your sitemaps are accessible at:', 'jetpack' ); ?></p>
940
		<?php else : ?>
941
			<p><?php esc_html_e( 'After activating the module, your sitemaps will be accessible at:', 'jetpack' ); ?></p>
942
		<?php endif; ?>
943
		<ul>
944
			<li>
945
				<?php /* translators: the placeholder is an URL of a sitemap */ ?>
946
				<?php printf( __( '<a href="%1$s" target="_blank">%1$s</a>&nbsp&#150; a standard sitemap for use with any search engine;', 'jetpack' ), esc_url( $sitemap_url ) ); ?>
947
			</li>
948
			<li>
949
				<?php /* translators: the placeholder is an URL of a sitemap */ ?>
950
				<?php printf( __( '<a href="%1$s" target="_blank">%1$s</a>&nbsp;&#150; a sitemap specially tailored for Google News.', 'jetpack' ), esc_url( $news_sitemap_url ) ); ?>
951
			</li>
952
		</ul>
953
	<?php endif; ?>
954
	<p>&rarr; <a href="http://jetpack.com/support/sitemaps/" target="_blank"><?php esc_html_e( 'More information on Sitemaps.', 'jetpack' ); ?></a></p>
955
<?php
956
}
957
add_action( 'jetpack_module_more_info_sitemaps', 'jetpack_xml_sitemap_more_info' );
958
// XML Sitemap: STOP
959