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
jetpack / jetpack_vendor / automattic / jetpack-newsletter / src / class-urls.php

class-urls.php in Jetpack – WP Security, Backup, Speed, & Growth 16.3, at jetpack_vendor/automattic/jetpack-newsletter/src/class-urls.php

37 lines 1015 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * URL helper for newsletter settings.
4 *
5 * @package automattic/jetpack-newsletter
6 */
7
8 namespace Automattic\Jetpack\Newsletter;
9
10 /**
11 * A class responsible for generating newsletter settings URLs.
12 */
13 class Urls {
14
15 /**
16 * Get the URL of the Settings tab of the Newsletter page.
17 *
18 * @return string The Settings tab URL.
19 */
20 public static function get_newsletter_settings_url() {
21 // The page's router reads its route and search only from `p`; a top-level `tab` is ignored.
22 return admin_url( 'admin.php?page=' . Settings::ADMIN_PAGE_SLUG . '&p=' . rawurlencode( '/?tab=settings' ) );
23 }
24
25 /**
26 * Get the URL of the Subscribers tab of the Newsletter page.
27 *
28 * @since 0.17.0
29 *
30 * @return string The Subscribers tab URL.
31 */
32 public static function get_subscribers_url() {
33 // The page's router reads its route and search only from `p`; a top-level `tab` is ignored.
34 return admin_url( 'admin.php?page=' . Settings::ADMIN_PAGE_SLUG . '&p=' . rawurlencode( '/?tab=subscribers' ) );
35 }
36 }
37