Skip to content

Commit

Permalink
Merge pull request #7488 from Automattic/add/doc-links-to-page-settings
Browse files Browse the repository at this point in the history
Add docs links to the page settings
  • Loading branch information
m1r0 committed Feb 21, 2024
2 parents 429ad33 + 884ae10 commit 5484f86
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
4 changes: 4 additions & 0 deletions changelog/add-doc-links-to-page-settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Add docs links to the page settings
2 changes: 1 addition & 1 deletion includes/class-sensei-settings-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ public function form_field_select( $args ) {
);

if ( isset( $args['data']['description'] ) ) {
echo '<p><span class="description">' . esc_html( $args['data']['description'] ) . '</span></p>' . "\n";
echo '<p><span class="description">' . wp_kses_post( $args['data']['description'] ) . '</span></p>' . "\n";
}
}
}
Expand Down
19 changes: 15 additions & 4 deletions includes/class-sensei-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ public function init_fields() {

$fields['course_page'] = array(
'name' => __( 'Course Archive Page', 'sensei-lms' ),
'description' => __( 'The page to use to display courses. If you leave this blank the default custom post type archive will apply.', 'sensei-lms' ),
'description' => sprintf(
// translators: Placeholder is the docs link.
__( 'The <a href="%s" target="_blank">page</a> to use to display courses. If you leave this blank the default custom post type archive will apply.', 'sensei-lms' ),
'https://senseilms.com/documentation/sensei-pages/#courses'
),
'type' => 'select',
'default' => 0,
'section' => 'default-settings',
Expand All @@ -371,7 +375,11 @@ public function init_fields() {

$fields['my_course_page'] = array(
'name' => __( 'My Courses Page', 'sensei-lms' ),
'description' => __( 'The page to use to display the courses that a user is currently taking as well as the courses a user has complete.', 'sensei-lms' ),
'description' => sprintf(
// translators: Placeholder is the docs link.
__( 'The <a href="%s" target="_blank">page</a> to use to display the courses that a user is currently taking as well as the courses a user has complete.', 'sensei-lms' ),
'https://senseilms.com/documentation/sensei-pages/#my-courses'
),
'type' => 'select',
'default' => 0,
'section' => 'default-settings',
Expand All @@ -381,7 +389,11 @@ public function init_fields() {

$fields['course_completed_page'] = array(
'name' => __( 'Course Completed Page', 'sensei-lms' ),
'description' => __( 'The page that is displayed after a student completes a course.', 'sensei-lms' ),
'description' => sprintf(
// translators: Placeholder is the docs link.
__( 'The <a href="%s" target="_blank">page</a> that is displayed after a student completes a course.', 'sensei-lms' ),
'https://senseilms.com/documentation/sensei-pages/#course-completed'
),
'type' => 'select',
'default' => 0,
'section' => 'default-settings',
Expand Down Expand Up @@ -782,7 +794,6 @@ public function init_fields() {
$fields['email_bcc'] = array(
'name' => __( 'BCC', 'sensei-lms' ),
'description' => __( 'Enter email addresses to BCC on all emails. Separate multiple email addresses with commas.', 'sensei-lms' ),
'type' => 'email_list',
'type' => 'email',
'multiple' => true,
'default' => '',
Expand Down

0 comments on commit 5484f86

Please sign in to comment.