Guest User

Untitled

a guest
Jul 21st, 2016
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.72 KB | None | 0 0
  1. <?php
  2. /************ Home slider meta post ****************/
  3. add_action('admin_init','quality_init');
  4. function quality_init()
  5. {
  6.  
  7. add_meta_box('home_slider_meta', 'Description', 'quality_meta_slider', 'quality_slider', 'normal', 'high');
  8. add_meta_box('home_service_meta', 'featured Service', 'quality_meta_service', 'quality_service', 'normal', 'high');
  9. add_meta_box('home_portfolio_meta', 'Custom Portfolio Details', 'quality_meta_portfolio', 'quality_portfolio', 'normal', 'high');
  10. add_meta_box('home_portfolio_meta_details', 'Portfolio Featured Details', 'quality_meta_portfolio_details', 'quality_portfolio', 'normal', 'high');
  11.  
  12. add_meta_box('quality_page', 'Page Info', 'page_layout_meta', 'page', 'normal', 'high');
  13. add_meta_box('quality_post', 'Post Info', 'post_layout_meta', 'post', 'normal', 'high');
  14. add_meta_box('quality_testimonilas', 'Description', 'quality_meta_testimonial', 'quality_testimonial', 'normal', 'high');
  15. add_meta_box('quality_team', 'Detail', 'quality_meta_team', 'quality_team', 'normal', 'high');
  16. add_meta_box('quality_clientstrip', 'Detail', 'quality_meta_client', 'quality_clientstrip', 'normal', 'high');
  17.  
  18. add_action('save_post','quality_meta_save');
  19. }
  20. function post_layout_meta()
  21. {
  22. global $post ;
  23. $post_description =sanitize_text_field( get_post_meta( get_the_ID(), 'post_description', true ));
  24. $content_post_layout=sanitize_text_field( get_post_meta( get_the_ID(), 'content_post_layout', true ));
  25. if(!$content_post_layout) { $content_post_layout= "fullwidth"; }
  26. ?>
  27. <p><label><?php _e('Post Description','quality');?></label></p>
  28. <p><input class="inputwidth" name="post_description" id="post_description" style="width: 480px" placeholder="Enter post description " type="text" value="<?php if (!empty($post_description)) echo esc_attr($post_description);?>"></input></p>
  29. <p>
  30. <input id="radio1" <?php if($content_post_layout == "fullwidth") { echo "checked"; } ?> type="radio" name="content_post_layout" value="fullwidth">
  31. <label for="radio1" <?php if($content_post_layout == "fullwidth") { echo "checked"; } ?> ><img src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/full-width.png"></label>
  32. <input id="radio2" <?php if($content_post_layout == "fullwidth_left") { echo "checked"; } ?> type="radio" name="content_post_layout" value="fullwidth_left">
  33. <label for="radio2" <?php if($content_post_layout == "fullwidth_left") { echo "checked"; } ?> ><img src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/left-sidebar.png"></label>
  34. <input id="radio3" <?php if($content_post_layout == "fullwidth_right") { echo "checked"; } ?> type="radio" name="content_post_layout" value="fullwidth_right">
  35. <label for="radio3" <?php if($content_post_layout == "fullwidth_right") { echo "checked"; } ?> ><img src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/right-sidebar1.png"></label>
  36. </p>
  37. <?php
  38. }
  39. function page_layout_meta()
  40. {
  41. global $post ;
  42. $page_description =sanitize_text_field( get_post_meta( get_the_ID(), 'page_description', true ));
  43. $content_page_layout=sanitize_text_field( get_post_meta( get_the_ID(), 'content_page_layout', true ));
  44. if(!$content_page_layout) { $content_page_layout= "fullwidth"; }
  45. ?>
  46. <p><label><?php _e('Page Description','quality');?></label></p>
  47. <p><input class="inputwidth" name="page_description" id="page_description" style="width: 480px" placeholder="Enter page description " type="text" value="<?php if (!empty($page_description)) echo esc_attr($page_description);?>"> </input></p>
  48. <p><label><?php _e('Page Layout','quality');?></label></p>
  49. <p>
  50. <input id="radio1" <?php if($content_page_layout == "fullwidth") { echo "checked"; } ?> type="radio" name="content_page_layout" value="fullwidth">
  51. <label for="radio1" <?php if($content_page_layout == "fullwidth") { echo "checked"; } ?> ><img src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/full-width.png"></label>
  52. <input id="radio2" <?php if($content_page_layout == "fullwidth_left") { echo "checked"; } ?> type="radio" name="content_page_layout" value="fullwidth_left">
  53. <label for="radio2" <?php if($content_page_layout == "fullwidth_left") { echo "checked"; } ?> ><img src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/left-sidebar.png"></label>
  54. <input id="radio3" <?php if($content_page_layout == "fullwidth_right") { echo "checked"; } ?> type="radio" name="content_page_layout" value="fullwidth_right">
  55. <label for="radio3" <?php if($content_page_layout == "fullwidth_right") { echo "checked"; } ?> ><img src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/right-sidebar1.png"></label>
  56. <p/>
  57. <?php
  58. }
  59.  
  60. // code for slider banner description
  61. function quality_meta_slider()
  62. { global $post ;
  63. $slider_title = sanitize_text_field( get_post_meta( get_the_ID(), 'slider_title', true ));
  64. $slider_description = sanitize_text_field( get_post_meta( get_the_ID(), 'slider_description', true ));
  65. $slider_button_text = sanitize_text_field( get_post_meta( get_the_ID(), 'slider_button_text', true ));
  66. $slider_button_link = sanitize_text_field( get_post_meta( get_the_ID(), 'slider_button_link', true ));
  67. $slider_button_target = sanitize_text_field( get_post_meta( get_the_ID(), 'slider_button_target', true ));
  68. ?>
  69. <p><label><?php _e('Slider Title','quality');?></label></p>
  70. <p><input class="inputwidth" name="slider_title" id="slider_title" style="width: 480px" placeholder="Enter slider title " type="text" value="<?php if (!empty($slider_title)) echo esc_attr($slider_title);?>"> </input></p>
  71. <p><h4 class="heading"><?php _e('Slider Description','quality'); ?> </h4>
  72. <p><input class="inputwidth" name="slider_description" id="slider_description" style="width: 480px" placeholder="Enter the slider description" type="text" value="<?php if (!empty($slider_description)) echo esc_attr($slider_description);?>"> </input></p>
  73. <p><h4 class="heading"><?php _e('Slider Button Text','quality'); ?> </h4>
  74. <p><input class="inputwidth" name="slider_button_text" id="slider_button_text" style="width: 480px" placeholder="Enter the slider Button Text" type="text" value="<?php if (!empty($slider_button_text)) echo esc_attr($slider_button_text);?>"> </input></p>
  75. <p><h4 class="heading"><?php _e('Slider button Link','quality');?></h4>
  76. <p><input type="checkbox" id="slider_button_target" name="slider_button_target" <?php if($slider_button_target) echo "checked"; ?> ><?php _e('Open link in a new window/tab','quality'); ?></p>
  77. <p><input class="inputwidth" name="slider_button_link" id="slider_button_link" style="width: 480px" placeholder="Enter the slider button link" type="text" value="<?php if (!empty($slider_button_link)) echo esc_attr($slider_button_link);?>"> </input></p>
  78. <?php
  79. }
  80.  
  81. // code for service description
  82. function quality_meta_service()
  83. { global $post ;
  84.  
  85. $service_icon_image =sanitize_text_field( get_post_meta( get_the_ID(), 'service_icon_image', true ));
  86. $meta_service_link =sanitize_text_field( get_post_meta( get_the_ID(), 'meta_service_link', true ));
  87. $meta_service_target =sanitize_text_field( get_post_meta( get_the_ID(), 'meta_service_target', true ));
  88. $service_description_text =sanitize_text_field( get_post_meta( get_the_ID(), 'service_description_text', true ));
  89. $service_readmore_text =sanitize_text_field( get_post_meta( get_the_ID(), 'service_readmore_text', true ));
  90.  
  91. ?>
  92. <p><h4 class="heading"><?php _e('Service Icon (Using Font Awesome icons name) like: fa-rub .','quality');?> <label style="margin-left:10px;"><a target="_blank" href="http://fontawesome.io/icons/"> <?php _e('Get your fontawesome icons.','quality') ;?></a></label></h4>
  93. <p><input class="inputwidth" name="service_icon_image" id="service_icon_image" style="width: 480px" placeholder="Enter the fontawesome icon" type="text" value="<?php if (!empty($service_icon_image)) echo esc_attr($service_icon_image);?>"> </input></p>
  94. <p><h4 class="heading"><?php _e('Service Link','quality'); ?></h4>
  95. <p><input type="checkbox" id="meta_service_target" name="meta_service_target" <?php if($meta_service_target) echo "checked"; ?> ><?php _e('Open link in a new window/tab','quality'); ?></p>
  96. <p><input class="inputwidth" name="meta_service_link" id="meta_service_link" style="width: 480px" placeholder="Enter the service link" type="text" value="<?php if (!empty($meta_service_link)) echo esc_attr($meta_service_link);?>"> </input></p>
  97. <p><h4 class="heading"><?php _e('Service Description','quality'); ?></h4>
  98. <p><textarea name="service_description_text" id="service_description_text" style="width: 480px; height: 56px; padding: 0px;" placeholder="Enter Description for your service" rows="3" cols="10" ><?php if (!empty($service_description_text)) echo esc_textarea( $service_description_text ); ?></textarea></p>
  99. <p><h4 class="heading"><?php _e('Service Read More Text','quality'); ?></h4>
  100. <p><input class="inputwidth" name="service_readmore_text" id="service_readmore_text" style="width: 480px" placeholder="Enter the service Read More text" type="text" value="<?php if (!empty($service_readmore_text)) echo esc_attr($service_readmore_text);?>"> </input></p>
  101.  
  102.  
  103. <?php }
  104.  
  105. // code for project description
  106. function quality_meta_portfolio()
  107. { global $post ;
  108. $meta_project_target =sanitize_text_field( get_post_meta( get_the_ID(), 'meta_project_target', true ));
  109. $portfolio_project_summary =sanitize_text_field( get_post_meta( get_the_ID(), 'portfolio_project_summary', true ));
  110. $meta_project_link =sanitize_text_field( get_post_meta( get_the_ID(), 'meta_project_link', true ));
  111.  
  112. ?>
  113. <p><h4 class="heading"><?php _e('Portfolio / Project Link','quality');?></h4>
  114. <p><input class="inputwidth" name="meta_project_link" id="meta_project_link" style="width: 480px" placeholder="Enter the project / portfolio link" type="text" value="<?php if (!empty($meta_project_link)) echo esc_attr($meta_project_link);?>"> </input></p>
  115. <p><input type="checkbox" id="meta_project_target" name="meta_project_target" <?php if($meta_project_target) echo "checked"; ?> ><?php _e('Open link in a new window/tab','quality'); ?></p>
  116. <p><h4 class="heading"><?php _e('Page Info','quality');?></h4>
  117. <p><input class="inputwidth" name="portfolio_project_summary" id="portfolio_project_summary" style="width: 480px" placeholder="Enter the single line page info" type="text" value="<?php if (!empty($portfolio_project_summary)) echo esc_attr($portfolio_project_summary);?>"> </input></p>
  118.  
  119. <?php }
  120. function quality_meta_portfolio_details()
  121. { global $post ;
  122. $portfolio_client_project_title =sanitize_text_field( get_post_meta( get_the_ID(), 'portfolio_client_project_title', true ));
  123. $portfolio_project_visit_site =sanitize_text_field( get_post_meta( get_the_ID(), 'portfolio_project_visit_site', true ));
  124. $portfolio_project_button_text =sanitize_text_field( get_post_meta( get_the_ID(), 'portfolio_project_button_text', true ));
  125. $meta_button_link =sanitize_text_field( get_post_meta( get_the_ID(), 'meta_button_link', true ));
  126. $meta_button_target =sanitize_text_field( get_post_meta( get_the_ID(), 'meta_button_target', true ));
  127. ?>
  128. <p><h4 class="heading"><?php _e('Your clients','quality');?></h4>
  129. <p><input class="inputwidth" name="portfolio_client_project_title" id="portfolio_client_project_title" style="width: 480px" placeholder="Enter the client title, For example: Webriti" type="text" value="<?php if (!empty($portfolio_client_project_title)) echo esc_attr($portfolio_client_project_title);?>"> </input></p>
  130. <p><h4 class="heading"><?php _e('Visit Website URL','quality');?></h4>
  131. <p><input class="inputwidth" name="portfolio_project_visit_site" id="portfolio_project_visit_site" style="width: 480px" placeholder="Enter visit site url, For example: : http://webriti.com" type="text" value="<?php if (!empty($portfolio_project_visit_site)) echo esc_attr($portfolio_project_visit_site);?>"> </input></p>
  132. <p><h4 class="heading"><?php _e('Button Text','quality');?></h4>
  133. <p><input class="inputwidth" name="portfolio_project_button_text" id="portfolio_project_button_text" style="width: 480px" placeholder="Enter the button text" type="text" value="<?php if (!empty($portfolio_project_button_text)) echo esc_attr($portfolio_project_button_text);?>"> </input></p>
  134. <p><h4 class="heading"><?php _e('Button Link','quality');?></h4>
  135. <p><input class="inputwidth" name="meta_button_link" id="meta_button_link" style="width: 480px" placeholder="Enter the button link" type="text" value="<?php if (!empty($meta_button_link)) echo esc_attr($meta_button_link);?>"> </input></p>
  136. <p><input type="checkbox" id="meta_button_target" name="meta_button_target" <?php if($meta_button_target) echo "checked"; ?> ><?php _e('Open link in a new window/tab','quality'); ?></p>
  137. <?php
  138. }
  139. //Meta boxes for testimonials*/
  140. function quality_meta_testimonial()
  141. { global $post ;
  142. $description_meta_save=sanitize_text_field( get_post_meta( get_the_ID(), 'description_meta_save', true ));
  143. $author_designation_meta_save=sanitize_text_field( get_post_meta( get_the_ID(), 'author_designation_meta_save', true ));
  144. ?>
  145. <p><label><?php _e('Testimonial Description','quality');?></label> </p>
  146. <p><textarea name="description_meta_save" id="description_meta_save" style="width: 480px; height: 56px; padding: 0px;" placeholder="Enter Desc for your Testimonial" rows="3" cols="10" ><?php if (!empty($description_meta_save)) echo esc_textarea( $description_meta_save ); ?></textarea></p>
  147. <p><label><?php _e('Testimonial Author Designation','quality');?></label></p>
  148. <p><input class="inputwidth" name="author_designation_meta_save" id="author_designation_meta_save" style="width: 480px;" placeholder="Author Designation" type="text" value="<?php if (!empty($author_designation_meta_save)) echo esc_attr($author_designation_meta_save);?>"></input></p>
  149. <?php
  150. }
  151.  
  152. function quality_meta_team()
  153. {
  154. global $post;
  155. $designation_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'designation_meta_save', true ));
  156. $description_meta_save = get_post_meta( get_the_ID(), 'description_meta_save', true );
  157. $fb_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'fb_meta_save', true ));
  158. $fb_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'fb_meta_save_chkbx', true ));
  159. $twt_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'twt_meta_save', true ));
  160. $twt_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'twt_meta_save_chkbx', true ));
  161. $lnkd_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'lnkd_meta_save', true ));
  162. $lnkd_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'lnkd_meta_save_chkbx', true ));
  163. $google_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'google_meta_save', true ));
  164. $google_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'google_meta_save_chkbx', true ));
  165. ?>
  166. <p><h4 class="heading"><?php _e('Members Designation','quality');?></h4></p>
  167. <p><input class="inputwidth" name="designation_meta_save" id="designation_meta_save" style="width: 480px" placeholder="Enter Member's Designation Here" type="text" value="<?php if (!empty($designation_meta_save)) echo esc_attr($designation_meta_save);?>"></input></p>
  168. <p><h4 class="heading"><?php _e('Role Description','quality');?></h4></p>
  169. <p><textarea name="description_meta_save" id="description_meta_save" style="width: 480px; height: 56px; padding: 0px;" placeholder="Describe the Roles for the member(Use max-word 140)" rows="3" cols="10" ><?php if (!empty($description_meta_save)) echo esc_textarea( $description_meta_save ); ?></textarea></p>
  170. <p><h4 class="heading"><span><?php _e('Social Media Setting','quality');?></span></h4>
  171. <p><h4 class="heading"><label><?php _e('Facebook','quality');?></label></h4>
  172. <input style="width:80%;padding: 10px;" name="fb_meta_save" id="fb_meta_save" placeholder="Enter Your Fb's URL in https formate" value="<?php if(!empty($fb_meta_save)) echo esc_attr($fb_meta_save); ?>"/>
  173. <input type="checkbox" name="fb_meta_save_chkbx" value="1"<?php if(isset($fb_meta_save_chkbx)) checked($fb_meta_save_chkbx,'1') ; ?> /></p>
  174. <p><h4 class="heading"><?php _e('Twitter Url','quality')?></h4>
  175. <p><input style="width:80%; padding: 10px;" name="twt_meta_save" id="twt_meta_save" placeholder="Enter Your Twitter's URL in https formate" value="<?php if(!empty($twt_meta_save)) echo esc_attr($twt_meta_save); ?>"/>
  176. <input type="checkbox" name="twt_meta_save_chkbx" value="1"<?php if(isset($twt_meta_save_chkbx)) checked($twt_meta_save_chkbx,'1') ; ?> /></p>
  177.  
  178. <p><h4 class="heading"><label><?php _e('LinkedIn Url','quality');?></label></h4>
  179. <input style="width:80%;padding: 10px;" name="lnkd_meta_save" id="lnkd_meta_save" placeholder="Enter Your LinkedIn's URL in https formate" value="<?php if(!empty($lnkd_meta_save)) echo esc_attr($lnkd_meta_save); ?>"/>
  180. <input type="checkbox" name="lnkd_meta_save_chkbx" value="1" <?php if(isset($lnkd_meta_save_chkbx)) checked($lnkd_meta_save_chkbx,'1') ; ?> /></p>
  181.  
  182. <p><h4 class="heading"><label><?php _e('Google Url','quality');?></label></h4>
  183. <input style="width:80%; padding: 10px;" name="google_meta_save" id="google_meta_save" placeholder="Enter Your Google's URL in https formate" value="<?php if(!empty($google_meta_save)) echo esc_attr($google_meta_save); ?>"/>
  184. <input type="checkbox" name="google_meta_save_chkbx" value="1" <?php if(isset($google_meta_save_chkbx)) checked($google_meta_save_chkbx,'1') ; ?> /></p>
  185.  
  186. <?php
  187. }
  188. function quality_meta_client()
  189. {
  190. global $post;
  191. $client_link = sanitize_text_field( get_post_meta( get_the_ID(), 'clientstrip_link', true ));
  192. $meta_client_target =sanitize_text_field( get_post_meta( get_the_ID(), 'meta_client_target', true ));
  193. ?>
  194. <p><h4 class="heading"><?php _e('Enter URL link','quality');?></h4>
  195. <p><input class="inputwidth" name="client_link" id="client_link" style="width: 480px" placeholder="Enter url link Here" type="text" value="<?php if (!empty($client_link)) echo esc_attr($client_link);?>"></input></p>
  196. <p><input type="checkbox" id="meta_client_target" name="meta_client_target" <?php if($meta_client_target) echo "checked"; ?> > <?php _e('Open link in a new tab','quality'); ?></p>
  197.  
  198.  
  199. <p><label><?php _e('Upload Client image using Feature Image.Best fit scenario is using 130 X 130 px image.','quality'); ?></label></p>
  200. <?php
  201. }
  202.  
  203.  
  204.  
  205. function quality_meta_save($post_id)
  206. {
  207. if((defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) || (defined('DOING_AJAX') && DOING_AJAX) || isset($_REQUEST['bulk_edit']))
  208. return;
  209.  
  210. if ( ! current_user_can( 'edit_page', $post_id ) )
  211. { return ; }
  212. if(isset($_POST['post_ID']))
  213. {
  214. $post_ID = $_POST['post_ID'];
  215. $post_type=get_post_type($post_ID);
  216. if($post_type=='quality_slider'){
  217. update_post_meta($post_ID, 'slider_title', sanitize_text_field($_POST['slider_title']));
  218. update_post_meta($post_ID, 'slider_description', sanitize_text_field($_POST['slider_description']));
  219. update_post_meta($post_ID, 'slider_button_text', sanitize_text_field($_POST['slider_button_text']));
  220. update_post_meta($post_ID, 'slider_button_link', sanitize_text_field($_POST['slider_button_link']));
  221. update_post_meta($post_ID, 'slider_button_target', sanitize_text_field($_POST['slider_button_target']));
  222. }
  223. else if($post_type=='quality_service'){
  224. update_post_meta($post_ID, 'service_icon_image', sanitize_text_field($_POST['service_icon_image']));
  225. update_post_meta($post_ID, 'meta_service_link', sanitize_text_field($_POST['meta_service_link']));
  226. update_post_meta($post_ID, 'meta_service_target', sanitize_text_field($_POST['meta_service_target']));
  227. update_post_meta($post_ID, 'service_description_text', sanitize_text_field($_POST['service_description_text']));
  228. update_post_meta($post_ID, 'service_readmore_text', sanitize_text_field($_POST['service_readmore_text']));
  229.  
  230. }
  231. else if($post_type=='quality_portfolio'){
  232. update_post_meta($post_ID, 'portfolio_client_project_title', sanitize_text_field($_POST['portfolio_client_project_title']));
  233. update_post_meta($post_ID, 'meta_project_target', sanitize_text_field($_POST['meta_project_target']));
  234. update_post_meta($post_ID, 'meta_project_link', sanitize_text_field($_POST['meta_project_link']));
  235. update_post_meta($post_ID, 'portfolio_project_visit_site', sanitize_text_field($_POST['portfolio_project_visit_site']));
  236. update_post_meta($post_ID, 'portfolio_project_button_text', sanitize_text_field($_POST['portfolio_project_button_text']));
  237. update_post_meta($post_ID, 'portfolio_project_summary', sanitize_text_field($_POST['portfolio_project_summary']));
  238. update_post_meta($post_ID, 'meta_button_target', sanitize_text_field($_POST['meta_button_target']));
  239. update_post_meta($post_ID, 'meta_button_link', sanitize_text_field($_POST['meta_button_link']));
  240.  
  241. }
  242. else if($post_type=='page'){
  243. update_post_meta($post_ID, 'page_description', sanitize_text_field($_POST['page_description']));
  244. update_post_meta($post_ID, 'content_page_layout', sanitize_text_field($_POST['content_page_layout']));
  245. }
  246. elseif($post_type=='post'){
  247. update_post_meta($post_ID, 'post_description', sanitize_text_field($_POST['post_description']));
  248. update_post_meta($post_ID, 'content_post_layout', sanitize_text_field($_POST['content_post_layout']));
  249. }
  250. else if($post_type=='quality_testimonial') {
  251. update_post_meta($post_ID, 'description_meta_save', sanitize_text_field($_POST['description_meta_save']));
  252. update_post_meta($post_ID, 'author_designation_meta_save', sanitize_text_field($_POST['author_designation_meta_save']));
  253. }
  254. else if($post_type=='quality_team') {
  255. update_post_meta($post_ID, 'designation_meta_save', sanitize_text_field($_POST['designation_meta_save']));
  256. update_post_meta($post_ID, 'description_meta_save', $_POST['description_meta_save']);
  257. update_post_meta($post_ID, 'fb_meta_save', sanitize_text_field($_POST['fb_meta_save']));
  258. update_post_meta($post_ID, 'fb_meta_save_chkbx', sanitize_text_field($_POST['fb_meta_save_chkbx']));
  259. update_post_meta($post_ID, 'twt_meta_save', sanitize_text_field($_POST['twt_meta_save']));
  260. update_post_meta($post_ID, 'twt_meta_save_chkbx', sanitize_text_field($_POST['twt_meta_save_chkbx']));
  261. update_post_meta($post_ID, 'lnkd_meta_save', sanitize_text_field($_POST['lnkd_meta_save']));
  262. update_post_meta($post_ID, 'lnkd_meta_save_chkbx', sanitize_text_field($_POST['lnkd_meta_save_chkbx']));
  263. update_post_meta($post_ID, 'google_meta_save', sanitize_text_field($_POST['google_meta_save']));
  264. update_post_meta($post_ID, 'google_meta_save_chkbx', sanitize_text_field($_POST['google_meta_save_chkbx']));
  265. }
  266. elseif($post_type=='quality_clientstrip'){
  267. update_post_meta($post_ID, 'clientstrip_link', sanitize_text_field($_POST['client_link']));
  268. update_post_meta($post_ID, 'meta_client_target', sanitize_text_field($_POST['meta_client_target']));
  269. }
  270.  
  271.  
  272. }
  273. }
  274. ?>
Add Comment
Please, Sign In to add comment