Skip to content

Commit

Permalink
wpcs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
harunollyo committed Jul 18, 2023
1 parent 18865a7 commit 76e8066
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions classes/Options_V2.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public function reset_settings_data() {
wp_send_json_error( tutor_utils()->error_message() );
}

$reset_fields = $return_fields = $return_fields_group = array();
$reset_fields = $return_fields = $return_fields_group = array(); //phpcs:ignore
$reset_page = Input::post( 'reset_page' );
$setting_data = $this->get_setting_fields()['option_fields'][ $reset_page ]['blocks'];

Expand Down Expand Up @@ -400,7 +400,7 @@ public function tutor_option_save() {

do_action( 'tutor_option_save_before' );

$option = (array) tutor_utils()->array_get( 'tutor_option', $_POST, array() );
$option = (array) tutor_utils()->array_get( 'tutor_option', $_POST, array() ); //phpcs:ignore

$option = tutor_utils()->sanitize_recursively( $option, array( 'email_footer_text' ) );

Expand Down Expand Up @@ -482,7 +482,7 @@ public function tutor_option_default_save() {
* @return void
*/
public function load_settings_page() {
extract( $this->get_setting_fields() );
extract( $this->get_setting_fields() ); //phpcs:ignore

if ( ! $template_path ) {
$template_path = tutor()->path . '/views/options/settings.php';
Expand All @@ -508,7 +508,7 @@ public function get_setting_fields() {
$lesson_key = $this->get( 'lesson_permalink_base', 'lessons' );
$course_base = tutor_utils()->get_option( 'course_permalink_base', tutor()->course_post_type );
$course_url = site_url() . '/<code>' . $course_base . '</code>/sample-course';
$lesson_url = site_url() . '/' . $course_base . '/' . 'sample-course/<code>' . $lesson_key . '</code>/sample-lesson/';
$lesson_url = site_url() . '/' . $course_base . '/sample-course/<code>' . $lesson_key . '</code>/sample-lesson/';
$student_url = tutor_utils()->profile_url( 0, false );

$methods_array = array();
Expand Down Expand Up @@ -1531,14 +1531,6 @@ public function get_setting_fields() {
'options' => $pages,
'desc' => __( 'Choose the page for student registration.', 'tutor' ),
),
// TODO
// array(
// 'key' => 'course_permalink_base',
// 'type' => 'text',
// 'label' => __('Course Permalink Base', 'tutor'),
// 'default' => tutor()->course_post_type,
// 'desc' => $course_url,
// ),
array(
'key' => 'lesson_permalink_base',
'type' => 'text',
Expand Down

0 comments on commit 76e8066

Please sign in to comment.