Add sanitization to team meta boxes
This commit is contained in:
@@ -45,7 +45,7 @@ class SP_Meta_Box_Team_Columns {
|
|||||||
* Save meta box data
|
* Save meta box data
|
||||||
*/
|
*/
|
||||||
public static function save( $post_id, $post ) {
|
public static function save( $post_id, $post ) {
|
||||||
update_post_meta( $post_id, 'sp_columns', sp_array_value( $_POST, 'sp_columns', array() ) );
|
update_post_meta( $post_id, 'sp_columns', sp_array_value( $_POST, 'sp_columns', array(), 'key' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -124,9 +124,9 @@ class SP_Meta_Box_Team_Details {
|
|||||||
* Save meta box data
|
* Save meta box data
|
||||||
*/
|
*/
|
||||||
public static function save( $post_id, $post ) {
|
public static function save( $post_id, $post ) {
|
||||||
update_post_meta( $post_id, 'sp_url', esc_url( sp_array_value( $_POST, 'sp_url', '' ) ) );
|
update_post_meta( $post_id, 'sp_url', esc_url( sp_array_value( $_POST, 'sp_url', '', 'text' ) ) );
|
||||||
update_post_meta( $post_id, 'sp_redirect', sp_array_value( $_POST, 'sp_redirect', 0 ) );
|
update_post_meta( $post_id, 'sp_redirect', sp_array_value( $_POST, 'sp_redirect', 0, 'int' ) );
|
||||||
update_post_meta( $post_id, 'sp_short_name', esc_attr( sp_array_value( $_POST, 'sp_short_name', '' ) ) );
|
update_post_meta( $post_id, 'sp_short_name', esc_attr( sp_array_value( $_POST, 'sp_short_name', '', 'text' ) ) );
|
||||||
update_post_meta( $post_id, 'sp_abbreviation', esc_attr( sp_array_value( $_POST, 'sp_abbreviation', '' ) ) );
|
update_post_meta( $post_id, 'sp_abbreviation', esc_attr( sp_array_value( $_POST, 'sp_abbreviation', '', 'text' ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class SP_Meta_Box_Team_Lists {
|
|||||||
* Save meta box data
|
* Save meta box data
|
||||||
*/
|
*/
|
||||||
public static function save( $post_id, $post ) {
|
public static function save( $post_id, $post ) {
|
||||||
sp_update_post_meta_recursive( $post_id, 'sp_list', sp_array_value( $_POST, 'sp_list', array() ) );
|
sp_update_post_meta_recursive( $post_id, 'sp_list', sp_array_value( $_POST, 'sp_list', array(), 'int' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class SP_Meta_Box_Team_Staff {
|
|||||||
* Save meta box data
|
* Save meta box data
|
||||||
*/
|
*/
|
||||||
public static function save( $post_id, $post ) {
|
public static function save( $post_id, $post ) {
|
||||||
sp_update_post_meta_recursive( $post_id, 'sp_staff', sp_array_value( $_POST, 'sp_staff', array() ) );
|
sp_update_post_meta_recursive( $post_id, 'sp_staff', sp_array_value( $_POST, 'sp_staff', array(), 'int' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class SP_Meta_Box_Team_Tables {
|
|||||||
* Save meta box data
|
* Save meta box data
|
||||||
*/
|
*/
|
||||||
public static function save( $post_id, $post ) {
|
public static function save( $post_id, $post ) {
|
||||||
sp_update_post_meta_recursive( $post_id, 'sp_table', sp_array_value( $_POST, 'sp_table', array() ) );
|
sp_update_post_meta_recursive( $post_id, 'sp_table', sp_array_value( $_POST, 'sp_table', array(), 'text' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user