@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | */ |
15 | 15 | |
16 | 16 | // Exit if accessed directly. |
17 | -if ( ! defined( 'ABSPATH' ) ) { |
|
17 | +if ( ! defined('ABSPATH')) { |
|
18 | 18 | exit; |
19 | 19 | } |
20 | 20 | |
21 | -if ( ! class_exists( 'Auto_Load_Next_Post_Admin_Help' ) ) { |
|
21 | +if ( ! class_exists('Auto_Load_Next_Post_Admin_Help')) { |
|
22 | 22 | |
23 | 23 | class Auto_Load_Next_Post_Admin_Help { |
24 | 24 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @since 1.0.0 |
30 | 30 | */ |
31 | 31 | public function __construct() { |
32 | - add_action( 'current_screen', array( $this, 'add_help_tabs' ), 50 ); |
|
32 | + add_action('current_screen', array($this, 'add_help_tabs'), 50); |
|
33 | 33 | } // END __construct() |
34 | 34 | |
35 | 35 | /** |
@@ -43,97 +43,97 @@ discard block |
||
43 | 43 | $screen = get_current_screen(); |
44 | 44 | $screen_id = $screen ? $screen->id : ''; |
45 | 45 | |
46 | - if ( $screen_id != 'settings_page_auto-load-next-post-settings' ) { |
|
46 | + if ($screen_id != 'settings_page_auto-load-next-post-settings') { |
|
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
50 | - $screen->add_help_tab( array( |
|
50 | + $screen->add_help_tab(array( |
|
51 | 51 | 'id' => 'auto_load_next_post_support_tab', |
52 | - 'title' => esc_html__( 'Help & Support', 'auto-load-next-post' ), |
|
52 | + 'title' => esc_html__('Help & Support', 'auto-load-next-post'), |
|
53 | 53 | 'content' => |
54 | - '<h2>' . esc_html__( 'Help & Support', 'auto-load-next-post' ) . '</h2>' . |
|
54 | + '<h2>'.esc_html__('Help & Support', 'auto-load-next-post').'</h2>'. |
|
55 | 55 | |
56 | - '<p>' . sprintf( __( 'Should you need help understanding, using, or extending %1$s, please %2$sread the documentation%3$s. You will find snippets, tutorials and much more.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="' . esc_url( AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL ) . '" aria-label="' . esc_attr__( 'View Auto Load Next Post documentation', 'auto-load-next-post' ) . '" target="_blank">', '</a>' ) . '</p>' . |
|
56 | + '<p>'.sprintf(__('Should you need help understanding, using, or extending %1$s, please %2$sread the documentation%3$s. You will find snippets, tutorials and much more.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="'.esc_url(AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL).'" aria-label="'.esc_attr__('View Auto Load Next Post documentation', 'auto-load-next-post').'" target="_blank">', '</a>').'</p>'. |
|
57 | 57 | |
58 | - '<p>' . sprintf( __( 'For further assistance with %1$s you can use the %2$scommunity forum%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="'. esc_url( AUTO_LOAD_NEXT_POST_SUPPORT_URL ) . '"aria-label="' . esc_attr__( 'Get support from the community', 'auto-load-next-post' ). '" target="_blank">', '</a>' ) . '</p> ' . |
|
58 | + '<p>'.sprintf(__('For further assistance with %1$s you can use the %2$scommunity forum%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="'.esc_url(AUTO_LOAD_NEXT_POST_SUPPORT_URL).'"aria-label="'.esc_attr__('Get support from the community', 'auto-load-next-post').'" target="_blank">', '</a>').'</p> '. |
|
59 | 59 | |
60 | - '<p>' . sprintf( __( '%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click %2$sTranslate %1$s%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">', '</a>' ) . '</p>' . |
|
60 | + '<p>'.sprintf(__('%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click %2$sTranslate %1$s%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">', '</a>').'</p>'. |
|
61 | 61 | |
62 | - '<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL ) . '" class="button button-primary" aria-label="' . esc_attr__( 'View Auto Load Next Post documentation', 'auto-load-next-post' ) . '" target="_blank">' . esc_html__( 'Documentation', 'auto-load-next-post' ) . '</a> <a href="'. esc_url( AUTO_LOAD_NEXT_POST_SUPPORT_URL ) . '" class="button button-secondary" aria-label="' . esc_attr__( 'Get support from the community', 'auto-load-next-post' ). '" target="_blank">' . esc_html__( 'Community Forum', 'auto-load-next-post' ) . '</a> <a href="' . esc_url( AUTO_LOAD_NEXT_POST_PLUGIN_URL . '#faq' ) . '" class="button button-secondary" target="_blank">' . esc_html__( 'Frequently Asked Questions', 'auto-load-next-post' ) . '</a> <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" class="button button-secondary" target="_blank">' . sprintf( esc_html__( 'Translate %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</a></p>' |
|
63 | - ) ); |
|
62 | + '<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL).'" class="button button-primary" aria-label="'.esc_attr__('View Auto Load Next Post documentation', 'auto-load-next-post').'" target="_blank">'.esc_html__('Documentation', 'auto-load-next-post').'</a> <a href="'.esc_url(AUTO_LOAD_NEXT_POST_SUPPORT_URL).'" class="button button-secondary" aria-label="'.esc_attr__('Get support from the community', 'auto-load-next-post').'" target="_blank">'.esc_html__('Community Forum', 'auto-load-next-post').'</a> <a href="'.esc_url(AUTO_LOAD_NEXT_POST_PLUGIN_URL.'#faq').'" class="button button-secondary" target="_blank">'.esc_html__('Frequently Asked Questions', 'auto-load-next-post').'</a> <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" class="button button-secondary" target="_blank">'.sprintf(esc_html__('Translate %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</a></p>' |
|
63 | + )); |
|
64 | 64 | |
65 | - $screen->add_help_tab( array( |
|
65 | + $screen->add_help_tab(array( |
|
66 | 66 | 'id' => 'auto_load_next_post_theme_selectors_tab', |
67 | - 'title' => __( 'Theme Selectors', 'auto-load-next-post' ), |
|
67 | + 'title' => __('Theme Selectors', 'auto-load-next-post'), |
|
68 | 68 | 'content' => |
69 | - '<h2>' . __( 'Theme Selectors', 'auto-load-next-post' ) . '</h2>' . |
|
70 | - |
|
71 | - '<p>' . sprintf( |
|
72 | - __( 'Theme Selectors allows %s know where to load the content in, which post is being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post' ), |
|
73 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) |
|
74 | - ) . '</p>' . |
|
75 | - |
|
76 | - '<p>' . sprintf( |
|
77 | - __( 'Each theme is different so in order for %1$s to work, the theme selectors must be set according to the theme you currently have active for each section.', 'auto-load-next-post' ), |
|
78 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) |
|
79 | - ) . '</p>' . |
|
80 | - |
|
81 | - '<p>' . sprintf( |
|
82 | - __( 'When %1$s is activated, default theme selectors are set for you. These theme selectors are the most commonly used in any WordPress theme. If they don’t work for your theme then you need to find the matching theme selectors. More information on %2$show to find your theme selectors%3$s.', 'auto-load-next-post' ), |
|
83 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), |
|
84 | - '<a href="' . esc_url( 'https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/theme-selectors.md#how-to-find-your-theme-selectors' ) . '">', |
|
69 | + '<h2>'.__('Theme Selectors', 'auto-load-next-post').'</h2>'. |
|
70 | + |
|
71 | + '<p>'.sprintf( |
|
72 | + __('Theme Selectors allows %s know where to load the content in, which post is being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post'), |
|
73 | + esc_html__('Auto Load Next Post', 'auto-load-next-post') |
|
74 | + ).'</p>'. |
|
75 | + |
|
76 | + '<p>'.sprintf( |
|
77 | + __('Each theme is different so in order for %1$s to work, the theme selectors must be set according to the theme you currently have active for each section.', 'auto-load-next-post'), |
|
78 | + esc_html__('Auto Load Next Post', 'auto-load-next-post') |
|
79 | + ).'</p>'. |
|
80 | + |
|
81 | + '<p>'.sprintf( |
|
82 | + __('When %1$s is activated, default theme selectors are set for you. These theme selectors are the most commonly used in any WordPress theme. If they don’t work for your theme then you need to find the matching theme selectors. More information on %2$show to find your theme selectors%3$s.', 'auto-load-next-post'), |
|
83 | + esc_html__('Auto Load Next Post', 'auto-load-next-post'), |
|
84 | + '<a href="'.esc_url('https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/theme-selectors.md#how-to-find-your-theme-selectors').'">', |
|
85 | 85 | '</a>' |
86 | - ) . '</p>' . |
|
86 | + ).'</p>'. |
|
87 | 87 | |
88 | - '<p>' . sprintf( |
|
89 | - __( 'If the theme you have active supports %s then it will set the theme selectors for you and display a notice on the theme selectors page.', 'auto-load-next-post' ), |
|
90 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) |
|
91 | - ) . '</p>' . |
|
88 | + '<p>'.sprintf( |
|
89 | + __('If the theme you have active supports %s then it will set the theme selectors for you and display a notice on the theme selectors page.', 'auto-load-next-post'), |
|
90 | + esc_html__('Auto Load Next Post', 'auto-load-next-post') |
|
91 | + ).'</p>'. |
|
92 | 92 | |
93 | - '<h3 class="alnp-default-theme-selectors">' . esc_html__( 'Default Theme Selectors', 'auto-load-next-post' ) . '</h3>' . |
|
93 | + '<h3 class="alnp-default-theme-selectors">'.esc_html__('Default Theme Selectors', 'auto-load-next-post').'</h3>'. |
|
94 | 94 | |
95 | - '<ul class="alnp-default-theme-selectors">' . |
|
96 | - '<li><strong>' . esc_html__( 'Content Container', 'auto-load-next-post' ) . '</strong>' . ' <code>main.site-main</code></li>' . |
|
97 | - '<li><strong>' . esc_html__( 'Post Title', 'auto-load-next-post' ) . '</strong>' . ' <code>h1.entry-title</code></li>' . |
|
98 | - '<li><strong>' . esc_html__( 'Post Navigation', 'auto-load-next-post' ) . '</strong>' . ' <code>nav.post-navigation</code></li>' . |
|
99 | - '<li><strong>' . esc_html__( 'Comments Container', 'auto-load-next-post' ) . '</strong>' . ' <code>div#comments</code></li>' . |
|
95 | + '<ul class="alnp-default-theme-selectors">'. |
|
96 | + '<li><strong>'.esc_html__('Content Container', 'auto-load-next-post').'</strong>'.' <code>main.site-main</code></li>'. |
|
97 | + '<li><strong>'.esc_html__('Post Title', 'auto-load-next-post').'</strong>'.' <code>h1.entry-title</code></li>'. |
|
98 | + '<li><strong>'.esc_html__('Post Navigation', 'auto-load-next-post').'</strong>'.' <code>nav.post-navigation</code></li>'. |
|
99 | + '<li><strong>'.esc_html__('Comments Container', 'auto-load-next-post').'</strong>'.' <code>div#comments</code></li>'. |
|
100 | 100 | '</ul>' |
101 | - ) ); |
|
101 | + )); |
|
102 | 102 | |
103 | - $screen->add_help_tab( array( |
|
103 | + $screen->add_help_tab(array( |
|
104 | 104 | 'id' => 'auto_load_next_post_bugs_tab', |
105 | - 'title' => esc_html__( 'Found a bug?', 'auto-load-next-post' ), |
|
105 | + 'title' => esc_html__('Found a bug?', 'auto-load-next-post'), |
|
106 | 106 | 'content' => |
107 | - '<h2>' . esc_html__( 'Found a bug?', 'auto-load-next-post' ) . '</h2>' . |
|
107 | + '<h2>'.esc_html__('Found a bug?', 'auto-load-next-post').'</h2>'. |
|
108 | 108 | |
109 | - '<p>' . sprintf( __( 'If you find a bug within %1$s core you can create a ticket via %2$sGithub issues%4$s. Ensure you read the %3$scontribution guide%4$s prior to submitting your report. To help me solve your issue, please be as descriptive as possible.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" target="_blank">', '<a href="https://github.com/autoloadnextpost/auto-load-next-post/blob/master/CONTRIBUTING.md" target="_blank">', '</a>' ) . '</p>' . |
|
109 | + '<p>'.sprintf(__('If you find a bug within %1$s core you can create a ticket via %2$sGithub issues%4$s. Ensure you read the %3$scontribution guide%4$s prior to submitting your report. To help me solve your issue, please be as descriptive as possible.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" target="_blank">', '<a href="https://github.com/autoloadnextpost/auto-load-next-post/blob/master/CONTRIBUTING.md" target="_blank">', '</a>').'</p>'. |
|
110 | 110 | |
111 | - '<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" class="button button-primary" target="_blank">' . esc_html__( 'Report a bug', 'auto-load-next-post' ) . '</a></p>' |
|
112 | - ) ); |
|
111 | + '<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" class="button button-primary" target="_blank">'.esc_html__('Report a bug', 'auto-load-next-post').'</a></p>' |
|
112 | + )); |
|
113 | 113 | |
114 | - $screen->add_help_tab( array( |
|
114 | + $screen->add_help_tab(array( |
|
115 | 115 | 'id' => 'auto_load_next_post_feedback_tab', |
116 | - 'title' => esc_html__( 'Contribute', 'auto-load-next-post' ), |
|
116 | + 'title' => esc_html__('Contribute', 'auto-load-next-post'), |
|
117 | 117 | 'content' => |
118 | - '<h2>' . esc_html__( 'Contribute', 'auto-load-next-post' ) . '</h2>' . |
|
118 | + '<h2>'.esc_html__('Contribute', 'auto-load-next-post').'</h2>'. |
|
119 | 119 | |
120 | - '<p>' . sprintf( __( 'If you or your company use %1$s, please consider supporting me directly so I can continue maintaining it and keep evolving the project.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' . |
|
120 | + '<p>'.sprintf(__('If you or your company use %1$s, please consider supporting me directly so I can continue maintaining it and keep evolving the project.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'. |
|
121 | 121 | |
122 | - '<p>' . esc_html__( 'You\'ll be helping to ensure I can spend the time not just fixing bugs, adding features or releasing new versions but also keeping the project afloat. Any contribution you make is a big help and is greatly appreciated.', 'auto-load-next-post' ) . '</p>' . |
|
122 | + '<p>'.esc_html__('You\'ll be helping to ensure I can spend the time not just fixing bugs, adding features or releasing new versions but also keeping the project afloat. Any contribution you make is a big help and is greatly appreciated.', 'auto-load-next-post').'</p>'. |
|
123 | 123 | |
124 | - '<p>' . sprintf( __( 'Your review of the plugin is also important as it will help others decide to use %s so please consider leaving a review on WordPress.org', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' . |
|
124 | + '<p>'.sprintf(__('Your review of the plugin is also important as it will help others decide to use %s so please consider leaving a review on WordPress.org', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'. |
|
125 | 125 | |
126 | - '<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_REVIEW_URL ) . '" class="button button-primary" target="_blank" aria-label="' . esc_attr( __( 'Review Auto Load Next Post on WordPress.org', 'auto-load-next-post' ) ) . '">' . esc_html__( 'Leave a Review', 'auto-load-next-post' ) . '</a> <a href="https://sebdumont.xyz/donate/" class="button button-secondary" target="_blank">' . esc_html__( 'Support the Developer', 'auto-load-next-post' ) . '</a></p>' |
|
127 | - ) ); |
|
126 | + '<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_REVIEW_URL).'" class="button button-primary" target="_blank" aria-label="'.esc_attr(__('Review Auto Load Next Post on WordPress.org', 'auto-load-next-post')).'">'.esc_html__('Leave a Review', 'auto-load-next-post').'</a> <a href="https://sebdumont.xyz/donate/" class="button button-secondary" target="_blank">'.esc_html__('Support the Developer', 'auto-load-next-post').'</a></p>' |
|
127 | + )); |
|
128 | 128 | |
129 | 129 | $screen->set_help_sidebar( |
130 | - '<p><strong>' . esc_html__( 'For more information:', 'auto-load-next-post' ) . '</strong></p>' . |
|
130 | + '<p><strong>'.esc_html__('For more information:', 'auto-load-next-post').'</strong></p>'. |
|
131 | 131 | |
132 | - '<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL ) . 'about/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">' . sprintf( esc_html__( 'About %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</a></p>' . |
|
132 | + '<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_STORE_URL).'about/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">'.sprintf(esc_html__('About %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</a></p>'. |
|
133 | 133 | |
134 | - '<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_PLUGIN_URL ) . '" target="_blank">' . esc_html__( 'WordPress.org Project', 'auto-load-next-post' ) . '</a></p>' . |
|
134 | + '<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_PLUGIN_URL).'" target="_blank">'.esc_html__('WordPress.org Project', 'auto-load-next-post').'</a></p>'. |
|
135 | 135 | |
136 | - '<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/" target="_blank">' . esc_html__( 'GitHub Project', 'auto-load-next-post' ) . '</a></p>' |
|
136 | + '<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/" target="_blank">'.esc_html__('GitHub Project', 'auto-load-next-post').'</a></p>' |
|
137 | 137 | ); |
138 | 138 | |
139 | 139 | } // END add_help_tabs() |