ID, 'atmswc_designation', true );
$atmswc_email = get_post_meta( $post->ID, 'atmswc_email', true );
$atmswc_web = get_post_meta( $post->ID, 'atmswc_web', true );
$atmswc_biography = get_post_meta( $post->ID, 'atmswc_biography', true );
$atmswc_telephone = get_post_meta( $post->ID, 'atmswc_telephone', true );
$atmswc_address = get_post_meta( $post->ID, 'atmswc_address', true );
// All Show/Hide Details Section
$designation_sh = get_post_meta( $post->ID, 'designation_sh', true );
$email_sh = get_post_meta( $post->ID, 'email_sh', true );
$web_sh = get_post_meta( $post->ID, 'web_sh', true );
$biography_sh = get_post_meta( $post->ID, 'biography_sh', true );
$telephone_sh = get_post_meta( $post->ID, 'telephone_sh', true );
?>
2 && strlen($_POST['atmswc_web']) < 250) {
update_post_meta( $post_id, 'atmswc_web', sanitize_text_field($_POST['atmswc_web']) );
}
#Value check and saves if needed
if( isset( $_POST['atmswc_biography'] ) && strlen($_POST['atmswc_biography']) > 2 && strlen($_POST['atmswc_biography']) < 1500) {
update_post_meta( $post_id, 'atmswc_biography', sanitize_text_field($_POST['atmswc_biography']) );
}
#Value check and saves if needed
if( isset( $_POST['atmswc_telephone'] ) && strlen($_POST['atmswc_telephone']) > 2 && strlen($_POST['atmswc_telephone']) < 16) {
update_post_meta( $post_id, 'atmswc_telephone', sanitize_text_field($_POST['atmswc_telephone']) );
}
#Value check and saves
if( isset( $_POST['designation_sh'] ) ) {
update_post_meta( $post_id, 'designation_sh', '0' );
} else {
update_post_meta( $post_id, 'designation_sh', '1' );
}
#Value check and saves
if( isset( $_POST['email_sh'] ) ) {
update_post_meta( $post_id, 'email_sh', '0' );
} else {
update_post_meta( $post_id, 'email_sh', '1' );
}
#Value check and saves
if( isset( $_POST['web_sh'] ) ) {
update_post_meta( $post_id, 'web_sh', '0' );
} else {
update_post_meta( $post_id, 'web_sh', '1' );
}
#Value check and saves
if( isset( $_POST['biography_sh'] ) ) {
update_post_meta( $post_id, 'biography_sh', '0' );
} else {
update_post_meta( $post_id, 'biography_sh', '1' );
}
#Value check and saves
if( isset( $_POST['telephone_sh'] ) ) {
update_post_meta( $post_id, 'telephone_sh', '0' );
} else {
update_post_meta( $post_id, 'telephone_sh', '1' );
}
// Settings metaboxes value save
#Value check and saves
if( isset( $_POST['atmswc_fb'] ) ) {
update_post_meta( $post_id, 'atmswc_fb', esc_url($_POST['atmswc_fb']) );
}
#Value check and saves
if( isset( $_POST['atmswc_twitter'] ) ) {
update_post_meta( $post_id, 'atmswc_twitter', esc_url($_POST['atmswc_twitter']) );
}
#Value check and saves
if( isset( $_POST['atmswc_gplus'] ) ) {
update_post_meta( $post_id, 'atmswc_gplus', esc_url($_POST['atmswc_gplus']) );
}
#Value check and saves
if( isset( $_POST['atmswc_linkedin'] ) ) {
update_post_meta( $post_id, 'atmswc_linkedin', esc_url($_POST['atmswc_linkedin']) );
}
#Value check and saves
if( isset( $_POST['atmswc_github'] ) ) {
update_post_meta( $post_id, 'atmswc_github', esc_url($_POST['atmswc_github']) );
}
#Value check and saves
if( isset( $_POST['atmswc_behance'] ) ) {
update_post_meta( $post_id, 'atmswc_behance', esc_url($_POST['atmswc_behance']) );
}
#Value check and saves
if( isset( $_POST['atmswc_dribble'] ) ) {
update_post_meta( $post_id, 'atmswc_dribble', esc_url($_POST['atmswc_dribble']) );
}
#Value check and saves
if( isset( $_POST['atmswc_youtube'] ) ) {
update_post_meta( $post_id, 'atmswc_youtube', esc_url($_POST['atmswc_youtube']) );
}
// Options value save
if( isset( $_POST['theme_id'] ) ) {
update_post_meta( $post_id, 'theme_id', sanitize_text_field($_POST['theme_id']) );
}
if( isset( $_POST['opacity_color'] ) ){
update_post_meta( $post_id, 'opacity_color', sanitize_text_field($_POST['opacity_color']) );
}
if( isset( $_POST['opacity'] ) ){
update_post_meta( $post_id, 'opacity', sanitize_text_field($_POST['opacity']) );
}
if( isset( $_POST['bio_text_color'] ) ){
update_post_meta( $post_id, 'bio_text_color', sanitize_text_field($_POST['bio_text_color']) );
}
if( isset( $_POST['bio_fontsize'] ) ){
update_post_meta( $post_id, 'bio_fontsize', sanitize_text_field($_POST['bio_fontsize']) );
}
if( isset( $_POST['designation_color'] ) ){
update_post_meta( $post_id, 'designation_color', sanitize_text_field($_POST['designation_color']) );
}
if( isset( $_POST['designation_fontsize'] ) ){
update_post_meta( $post_id, 'designation_fontsize', sanitize_text_field($_POST['designation_fontsize']) );
}
if( isset( $_POST['telephone_color'] ) ){
update_post_meta( $post_id, 'telephone_color', sanitize_text_field($_POST['telephone_color']) );
}
if( isset( $_POST['telephone_fontsize'] ) ){
update_post_meta( $post_id, 'telephone_fontsize', sanitize_text_field($_POST['telephone_fontsize']) );
}
if( isset( $_POST['email_color'] ) ){
update_post_meta( $post_id, 'email_color', sanitize_text_field($_POST['email_color']) );
}
if( isset( $_POST['email_fontsize'] ) ){
update_post_meta( $post_id, 'email_fontsize', sanitize_text_field($_POST['email_fontsize']) );
}
if( isset( $_POST['web_color'] ) ){
update_post_meta( $post_id, 'web_color', sanitize_text_field($_POST['web_color']) );
}
if( isset( $_POST['web_fontsize'] ) ){
update_post_meta( $post_id, 'web_fontsize', sanitize_text_field($_POST['web_fontsize']) );
}
if( isset( $_POST['bio_social_icon'] ) ){
update_post_meta( $post_id, 'bio_social_icon', sanitize_text_field($_POST['bio_social_icon']) );
}
if( isset( $_POST['bio_social_textcolor'] ) ){
update_post_meta( $post_id, 'bio_social_textcolor', sanitize_text_field($_POST['bio_social_textcolor']) );
}
if( isset( $_POST['bio_social_hcolor'] ) ){
update_post_meta( $post_id, 'bio_social_hcolor', sanitize_text_field($_POST['bio_social_hcolor']) );
}
if( isset( $_POST['bio_social_backcolor'] ) ){
update_post_meta( $post_id, 'bio_social_backcolor', sanitize_text_field($_POST['bio_social_backcolor']) );
}
if( isset( $_POST['bio_social_backhcolor'] ) ){
update_post_meta( $post_id, 'bio_social_backhcolor', sanitize_text_field($_POST['bio_social_backhcolor']) );
}
}
add_action( 'save_post', 'save_meta_value' );
# Custom metabox field end