Pass individual option groups through filter

This commit is contained in:
Brian Miyaji
2015-01-21 23:53:29 +11:00
parent ce3db85b5f
commit cabc1bc90e
8 changed files with 765 additions and 460 deletions

View File

@@ -36,46 +36,50 @@ class SP_Settings_Staff extends SP_Settings_Page {
*/
public function get_settings() {
return apply_filters( 'sportspress_staff_settings', array(
array( 'title' => __( 'Staff Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'staff_options' ),
return apply_filters( 'sportspress_staff_settings', array_merge(
array(
'title' => __( 'Link', 'sportspress' ),
'desc' => __( 'Link staff', 'sportspress' ),
'id' => 'sportspress_link_staff',
'default' => 'yes',
'type' => 'checkbox',
array( 'title' => __( 'Staff Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'staff_options' ),
),
array(
'title' => __( 'Templates', 'sportspress' ),
'desc' => __( 'Photo', 'sportspress' ),
'id' => 'sportspress_staff_show_photo',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
),
apply_filters( 'sportspress_staff_options', array(
array(
'title' => __( 'Link', 'sportspress' ),
'desc' => __( 'Link staff', 'sportspress' ),
'id' => 'sportspress_link_staff',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Templates', 'sportspress' ),
'desc' => __( 'Photo', 'sportspress' ),
'id' => 'sportspress_staff_show_photo',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
),
array(
'desc' => __( 'Details', 'sportspress' ),
'id' => 'sportspress_staff_show_details',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'end',
),
array(
'title' => __( 'Nationality', 'sportspress' ),
'desc' => __( 'Display national flags', 'sportspress' ),
'id' => 'sportspress_staff_show_flags',
'default' => 'yes',
'type' => 'checkbox',
),
) ),
array(
'desc' => __( 'Details', 'sportspress' ),
'id' => 'sportspress_staff_show_details',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'end',
),
array(
'title' => __( 'Nationality', 'sportspress' ),
'desc' => __( 'Display national flags', 'sportspress' ),
'id' => 'sportspress_staff_show_flags',
'default' => 'yes',
'type' => 'checkbox',
),
array( 'type' => 'sectionend', 'id' => 'staff_options' ),
)); // End staff settings
array( 'type' => 'sectionend', 'id' => 'staff_options' ),
)
) ); // End staff settings
}
}