Advertisement
Guest User

functions.php

a guest
Oct 31st, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 37.61 KB | None | 0 0
  1. <?php
  2. //define('WP_DEBUG', true);
  3. $post_types =array();
  4. $hided_for_current_post_type = false;
  5. $custom_post_type = "case_study";
  6. $single_type_posts = array();//posts types with only one post allowed
  7. $meta_box_fields = array('meta-text','meta-text1','meta-text2','meta-text3','box1_title','box_title','box_title1','box_title2','box_description','client','channel','logistics','news-bolddata','news-innercont','news-subhead','news-highlighthead','news-subcont','box1_link_title','box1_link_url','about_content','case_study_title1',
  8. 'case_study_title2','case_study_content','case_study_button_title','case_study_button_link'
  9. );
  10. $meta_box_files = array('image1','image2','image3','image4','detail_box1_image','box_image','case_study_image');
  11.  
  12.  
  13. function frnt_case_stdy_callback() {
  14.     global $post;
  15.     $id =  $post->ID;
  16.     wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );
  17.     $meta = get_post_meta( $id);
  18.     //print_r($meta);
  19.        
  20.        
  21.     ?>
  22.     <style>
  23.     #post-body-content  {
  24.         width: 85%;
  25.         height: 1200px !important;
  26.         background: #fff
  27.     }
  28.     #box_title1 {
  29.         font-family: "Rock Salt" !important;
  30.     }
  31.     #box_title2 {
  32.    
  33.         font-family: 'Titillium Web', sans-serif;      
  34.         font-size: 2.5em;
  35.         font-weight: 800;
  36.     }
  37.     </style>
  38.     <p>
  39.    
  40.        
  41.            
  42.             <div style="width:100%  !important;height:600px !important;float:left;margin-top:5%">
  43.             <label for="case_study_title1" ><?php _e( 'Title1', 'box_domain' )?></label>
  44.            
  45.             <div style="width:100%;height:200px">
  46.         <input  type="text" style="width:100%;height:300px;float:left !important" name="case_study_title1" id="case_study_title1" value = '<?php if ( isset ( $meta['case_study_title1'] ) ) echo $meta['case_study_title1'][0]; ?>' />
  47.             </div>
  48.               <div style="width:100%  !important;height:600px !important;float:left;margin-top:5%">
  49.             <label for="case_study_title1" ><?php _e( 'Title2', 'box_domain' )?></label>
  50.            
  51.             <div style="width:100%;height:200px">
  52.         <input  type="text" style="width:100%;height:300px;float:left !important" name="case_study_title2" id="case_study_title2" value = '<?php if ( isset ( $meta['case_study_title2'] ) ) echo $meta['case_study_title2'][0]; ?>' />
  53.             </div>
  54.             <div style="width:100%;height:200px">
  55.         <textarea   type="text" style="width:100%;height:300px;float:left !important" name="case_study_content" id="case_study_content"  ><?php if ( isset ( $meta['case_study_content'] ) ) echo $meta['case_study_content'][0]; ?></textarea>
  56.             </div>
  57.  
  58.  
  59.             </div>
  60.  
  61.  
  62.  
  63.        
  64.     </p>
  65.     <?php
  66.  
  67.  
  68.  
  69.  
  70.    
  71. }
  72.  
  73.  
  74. add_action('init', 'init_theme');
  75. add_action( 'after_setup_theme', 'plastec_wp_setup' );
  76.  
  77. function load_custom_fonts() {
  78.     echo "<link href='http://fonts.googleapis.com/css?family=Oswald:400,700|Open+Sans|Dosis|Rock+Salt|Titillium+Web:400,200,200italic,300,300italic,400italic,600italic,600,700,700italic,900|Glegoo' rel='stylesheet' type='text/css'>";
  79. }
  80. function init_theme() {
  81.     global $single_type_posts;
  82.     global $custom_post_type;
  83.     global $hided_for_current_post_type;
  84.     register_pl_main_menu() ;
  85.     register_case_studies();
  86.     register_main_content() ;
  87.     register_front_detail_box1();
  88.     register_front_detail_boxes();
  89.     register_front_bottom_box();
  90.     register_front_casestudy_slider();
  91.     register_services() ;
  92.     register_news() ;
  93.    
  94.     register_footer_about_content();
  95.     add_action('admin_head','load_custom_fonts');
  96.  
  97.     reset_editor('news');//removes default editor
  98.    
  99.     $custom_p_types = array(
  100.         array(
  101.             'post_type_name' => 'main_content',
  102.             'allowed_no_of_posts' => 1
  103.         ) ,
  104.         array(
  105.             'post_type_name' => 'front_detail_box1',
  106.             'allowed_no_of_posts' => 1
  107.         ),
  108.         array(
  109.             'post_type_name' => 'front_detail_boxes',
  110.             'allowed_no_of_posts' => 3
  111.         ),
  112.         array(
  113.             'post_type_name' => 'front_bottom_box',
  114.             'allowed_no_of_posts' => 1
  115.         ),
  116.         array(
  117.             'post_type_name' => 'footer_about_content',
  118.             'allowed_no_of_posts' => 1
  119.         ),
  120.         array(
  121.             'post_type_name' => 'front_casestudy_slider',
  122.             'allowed_no_of_posts' => 3
  123.         )
  124.  
  125.  
  126.  
  127.  
  128.  
  129.     );
  130.    
  131.    
  132.    
  133.    
  134.     foreach($custom_p_types  as $custom_p_type) {
  135.         $p_t_name = $custom_p_type['post_type_name'];
  136.         $p_t_posts = $custom_p_type['allowed_no_of_posts'];
  137.         $post_count = get_posts_count($p_t_name );
  138.         if($post_count>=$p_t_posts) {//if there is one post, dont allow more posts
  139.             array_push($single_type_posts,$p_t_name );
  140.        
  141.         }
  142.  
  143.        
  144.     }
  145.     add_action( 'admin_menu', 'hide_add_new_custom_type' );
  146.     add_action('admin_head', 'hide_add_new_button');
  147.     add_filter( 'post_row_actions', 'hide_trash_option', 10, 1 );
  148.  
  149.    
  150.    
  151.    
  152.    
  153.  
  154. }
  155.  
  156. /*Function to hide addnew button in post type*/
  157.  
  158. function hide_add_new_custom_type()
  159. {
  160.  
  161.     global  $single_type_posts;
  162.     global $submenu;
  163.     // replace my_type with the name of your post type
  164.     foreach($single_type_posts as $custom_post)
  165.         unset($submenu['edit.php?post_type='.$custom_post][10]);//removed hover links 'add new' and 'all posts' for specific post type
  166.    
  167. }
  168. function hide_trash_option() {
  169.     global $single_type_posts;
  170.     global $actions;
  171.     $proceed = false;
  172.     $t_post = get_post_type();
  173.     foreach($single_type_posts as $s_post) {
  174.         if($s_post == $t_post) {
  175.             $proceed = true;
  176.             break;
  177.         }
  178.     }  
  179.     if($proceed) {
  180.         unset( $actions['trash'] );
  181.     }
  182.  
  183.    
  184. }
  185. function hide_add_new_button() {/*removes add new post button for custom post type*/
  186.     global $custom_post_type;
  187.     global $single_type_posts;
  188.     $proceed = false;
  189.     $t_post = get_post_type();
  190.     foreach($single_type_posts as $s_post) {
  191.         if($s_post == $t_post) {
  192.             $proceed = true;
  193.             break;
  194.         }
  195.     }  
  196.     if($proceed) {
  197.   echo '<style type="text/css">
  198.    #favorite-actions {display:none;}
  199.    .add-new-h2{display:none;}
  200.    .tablenav{display:none;}
  201.    </style>';
  202.         }
  203. }
  204.  
  205.  
  206. function get_posts_count($post_type) {
  207.     $count_posts = wp_count_posts( $post_type)->publish;
  208.     return  $count_posts;
  209.    
  210. }
  211. function register_front_casestudy_slider() {
  212.     global $post_types;
  213.     array_push($post_types, 'front_casestudy_slider');
  214.     $labels = array(
  215.         'name' => _x('Home Page Case Study Slider', 'Case studies will appear on case studies page'),
  216.       'add_new' => _x('Add case study', 'case study'),
  217.         'add_new_item' => __('Add case study'),
  218.         'edit_item' => __('Edit case study'),
  219.         'new_item' => __('New case study'),
  220.         'view_item' => __('View case study'),
  221.         'search_items' => __('Search case study'),
  222.         'not_found' =>  __('No case study found'),
  223.         'not_found_in_trash' => __('No case study found in Trash'),
  224.         'parent_item_colon' => ''
  225.     );
  226.  
  227.     $args = array(
  228.         'labels' => $labels,
  229.         'public' => true,
  230.         'publicly_queryable' => true,
  231.         'show_ui' => true,
  232.         'query_var' => true,
  233.         'rewrite' => true,
  234.         'capability_type' => 'post',
  235.         'hierarchical' => false,
  236.         'menu_position' => null,
  237.         'supports' => false
  238.       );
  239.      
  240.     register_post_type( 'front_casestudy_slider' , $args );
  241.    
  242.  
  243.    
  244. }
  245. function register_pl_main_menu() {
  246.      register_nav_menu( 'primary', 'Header Area' );
  247.        $menuname = 'Main Navigation Menu';
  248. $bpmenulocation = 'Header Area  3`  ';
  249. // Does the menu exist already?
  250. $menu_exists = wp_get_nav_menu_object( $menuname );
  251.  
  252. // If it doesn't exist, let's create it.
  253. if( !$menu_exists){
  254.     $menu_id = wp_create_nav_menu($menuname);
  255.  
  256.     // Set up default BuddyPress links and add them to the menu.
  257.     wp_update_nav_menu_item($menu_id, 0, array(
  258.         'menu-item-title' =>  __('Home'),
  259.         'menu-item-classes' => 'home',
  260.         'menu-item-url' => home_url( '/' ),
  261.         'menu-item-status' => 'publish'));
  262.  
  263.     wp_update_nav_menu_item($menu_id, 0, array(
  264.         'menu-item-title' =>  __('Our Services'),
  265.         'menu-item-classes' => 'our-services',
  266.         'menu-item-url' => home_url( '/our-services/' ),
  267.         'menu-item-status' => 'publish'));
  268.  
  269.     wp_update_nav_menu_item($menu_id, 0, array(
  270.         'menu-item-title' =>  __('About Us'),
  271.         'menu-item-classes' => 'about-us',
  272.         'menu-item-url' => home_url( '/about-us/' ),
  273.         'menu-item-status' => 'publish'));
  274.  
  275.     wp_update_nav_menu_item($menu_id, 0, array(
  276.         'menu-item-title' =>  __('Case Studies'),
  277.         'menu-item-classes' => 'case-studies',
  278.         'menu-item-url' => home_url( '/case-studies/' ),
  279.         'menu-item-status' => 'publish'));
  280.  
  281.     wp_update_nav_menu_item($menu_id, 0, array(
  282.         'menu-item-title' =>  __('News'),
  283.         'menu-item-classes' => 'news',
  284.         'menu-item-url' => home_url( '/news/' ),
  285.         'menu-item-status' => 'publish'));
  286.  
  287.     wp_update_nav_menu_item($menu_id, 0, array(
  288.         'menu-item-title' =>  __('Gallery'),
  289.         'menu-item-classes' => 'gallery',
  290.         'menu-item-url' => home_url( '/gallery/' ),
  291.         'menu-item-status' => 'publish'));
  292.        
  293.     wp_update_nav_menu_item($menu_id, 0, array(
  294.         'menu-item-title' =>  __('Contact Us'),
  295.         'menu-item-classes' => 'contact-us',
  296.         'menu-item-url' => home_url( '/contact-us/' ),
  297.         'menu-item-status' => 'publish'));
  298.  
  299.     // Grab the theme locations and assign our newly-created menu
  300.     // to the BuddyPress menu location.
  301.     if( !has_nav_menu( $bpmenulocation ) ){
  302.         $locations = get_theme_mod('nav_menu_locations');
  303.         $locations[$bpmenulocation] = $menu_id;
  304.         set_theme_mod( 'nav_menu_locations', $locations );
  305.     }
  306.      }
  307.      
  308. }
  309.  
  310. function register_my_menu() {
  311.   register_nav_menu('header-menu',__( 'Header Menu' ));
  312.    global $menu;
  313.     global $submenu;
  314.     $menu[5][0] = 'News';
  315.     $submenu['<span class="skimlinks-unlinked">edit.php</span>'][5][0] = 'News Items';
  316.     $submenu['<span class="skimlinks-unlinked">edit.php</span>'][10][0] = 'Add News Item';
  317. }
  318. function register_footer_about_content() {
  319.     global $post_types;
  320.     array_push($post_types, 'footer_about_content');
  321.     $labels = array(
  322.         'name' => _x('Footer About Content', 'Case studies will appear on case studies page'),
  323.       'add_new' => _x('Add content', 'case study'),
  324.         'add_new_item' => __('Add content'),
  325.         'edit_item' => __('Edit content'),
  326.         'new_item' => __('New content'),
  327.         'view_item' => __('View content '),
  328.         'search_items' => __('Search content'),
  329.         'not_found' =>  __('No content found'),
  330.         'not_found_in_trash' => __('No content found in Trash'),
  331.         'parent_item_colon' => ''
  332.     );
  333.  
  334.     $args = array(
  335.         'labels' => $labels,
  336.         'public' => true,
  337.         'publicly_queryable' => true,
  338.         'show_ui' => true,
  339.         'query_var' => true,
  340.         'rewrite' => true,
  341.         'capability_type' => 'post',
  342.         'hierarchical' => false,
  343.         'menu_position' => null,
  344.         'supports' => false
  345.       );
  346.  
  347.     register_post_type( 'footer_about_content' , $args );
  348.    
  349. }
  350. function register_front_detail_box1() {
  351.     global $post_types;
  352.     array_push($post_types, 'front_detail_box1');
  353.     $labels = array(
  354.         'name' => _x('Home Page Detail Box1', 'Case studies will appear on case studies page'),
  355.       'add_new' => _x('Add data', 'case study'),
  356.         'add_new_item' => __('Add data'),
  357.         'edit_item' => __('Edit data'),
  358.         'new_item' => __('New Data'),
  359.         'view_item' => __('View data '),
  360.         'search_items' => __('Search data'),
  361.         'not_found' =>  __('No data found'),
  362.         'not_found_in_trash' => __('No data found in Trash'),
  363.         'parent_item_colon' => ''
  364.     );
  365.  
  366.     $args = array(
  367.         'labels' => $labels,
  368.         'public' => true,
  369.         'publicly_queryable' => true,
  370.         'show_ui' => true,
  371.         'query_var' => true,
  372.         'rewrite' => true,
  373.         'capability_type' => 'post',
  374.         'hierarchical' => false,
  375.         'menu_position' => null,
  376.         'supports' => false
  377.       );
  378.  
  379.     register_post_type( 'front_detail_box1' , $args );
  380.  
  381.    
  382. }
  383.  
  384. function register_front_detail_boxes() {
  385.     global $post_types;
  386.     array_push($post_types, 'front_detail_boxes');
  387.     $labels = array(
  388.         'name' => _x('Home Page Detail Boxes', 'Case studies will appear on case studies page'),
  389.       'add_new' => _x('Add data', 'case study'),
  390.         'add_new_item' => __('Add data'),
  391.         'edit_item' => __('Edit data'),
  392.         'new_item' => __('New Data'),
  393.         'view_item' => __('View data '),
  394.         'search_items' => __('Search data'),
  395.         'not_found' =>  __('No data found'),
  396.         'not_found_in_trash' => __('No data found in Trash'),
  397.         'parent_item_colon' => ''
  398.     );
  399.  
  400.     $args = array(
  401.         'labels' => $labels,
  402.         'public' => true,
  403.         'publicly_queryable' => true,
  404.         'show_ui' => true,
  405.         'query_var' => true,
  406.         'rewrite' => true,
  407.         'capability_type' => 'post',
  408.         'hierarchical' => false,
  409.         'menu_position' => null,
  410.         'supports' => false
  411.       );
  412.  
  413.     register_post_type( 'front_detail_boxes' , $args );
  414.  
  415.    
  416. }
  417.  
  418. function register_front_bottom_box() {
  419.     global $post_types;
  420.     array_push($post_types, 'front_bottom_box');
  421.     $labels = array(
  422.         'name' => _x('Home Page Bottom Box', 'Case studies will appear on case studies page'),
  423.       'add_new' => _x('Add data', 'case study'),
  424.         'add_new_item' => __('Add data'),
  425.         'edit_item' => __('Edit data'),
  426.         'new_item' => __('New Data'),
  427.         'view_item' => __('View data '),
  428.         'search_items' => __('Search data'),
  429.         'not_found' =>  __('No data found'),
  430.         'not_found_in_trash' => __('No data found in Trash'),
  431.         'parent_item_colon' => ''
  432.     );
  433.  
  434.     $args = array(
  435.         'labels' => $labels,
  436.         'public' => true,
  437.         'publicly_queryable' => true,
  438.         'show_ui' => true,
  439.         'query_var' => true,
  440.         'rewrite' => true,
  441.         'capability_type' => 'post',
  442.         'hierarchical' => false,
  443.         'menu_position' => null,
  444.         'supports' => false
  445.       );
  446.  
  447.     register_post_type( 'front_bottom_box' , $args );
  448.  
  449.    
  450. }
  451.  
  452.  
  453. function register_news() {
  454.     global $post_types;
  455.     array_push($post_types, 'news');
  456.     $labels = array(
  457.         'name' => _x('News', 'Case studies will appear on case studies page'),
  458.       'add_new' => _x('Add news', 'case study'),
  459.         'add_new_item' => __('Add news item'),
  460.         'edit_item' => __('Edit news'),
  461.         'new_item' => __('New news item'),
  462.         'view_item' => __('View news '),
  463.         'search_items' => __('Search news'),
  464.         'not_found' =>  __('No news found'),
  465.         'not_found_in_trash' => __('No news found in Trash'),
  466.         'parent_item_colon' => ''
  467.     );
  468.  
  469.     $args = array(
  470.         'labels' => $labels,
  471.         'public' => true,
  472.         'publicly_queryable' => true,
  473.         'show_ui' => true,
  474.         'query_var' => true,
  475.         'rewrite' => true,
  476.         'capability_type' => 'post',
  477.         'hierarchical' => false,
  478.         'menu_position' => null,
  479.         'supports' => array('thumbnail','title','editor')
  480.       );
  481.  
  482.     register_post_type( 'news' , $args );
  483.  
  484.    
  485. }
  486.  
  487.  
  488. function register_services() {
  489.     global $post_types;
  490.     array_push($post_types, 'service');
  491.     $labels = array(
  492.         'name' => _x('Services', 'Case studies will appear on case studies page'),
  493.       'add_new' => _x('Add service', 'case study'),
  494.         'add_new_item' => __('Add new service'),
  495.         'edit_item' => __('Edit service'),
  496.         'new_item' => __('New service'),
  497.         'view_item' => __('View service'),
  498.         'search_items' => __('Search service'),
  499.         'not_found' =>  __('No services found'),
  500.         'not_found_in_trash' => __('No services found in Trash'),
  501.         'parent_item_colon' => ''
  502.     );
  503.  
  504.     $args = array(
  505.         'labels' => $labels,
  506.         'public' => true,
  507.         'publicly_queryable' => true,
  508.         'show_ui' => true,
  509.         'query_var' => true,
  510.         'rewrite' => true,
  511.         'capability_type' => 'post',
  512.         'hierarchical' => false,
  513.         'menu_position' => null,
  514.         'supports' => array('thumbnail','title','editor')
  515.       );
  516.  
  517.     register_post_type( 'service' , $args );
  518.  
  519.    
  520. }
  521.  
  522.  
  523.  
  524.  
  525. function register_case_studies() {
  526.     global $post_types;
  527.     array_push($post_types, 'case_study');
  528.     $labels = array(
  529.         'name' => _x('Case Studies', 'Case studies will appear on case studies page'),
  530.       'add_new' => _x('Add Case Study', 'case study'),
  531.         'add_new_item' => __('Add new case study'),
  532.         'edit_item' => __('Edit case study'),
  533.         'new_item' => __('New case study'),
  534.         'view_item' => __('View case study'),
  535.         'search_items' => __('Search case studies'),
  536.         'not_found' =>  __('No case studies found'),
  537.         'not_found_in_trash' => __('No case studies found in Trash'),
  538.         'parent_item_colon' => ''
  539.     );
  540.  
  541.     $args = array(
  542.         'labels' => $labels,
  543.         'public' => true,
  544.         'publicly_queryable' => true,
  545.         'show_ui' => true,
  546.         'query_var' => true,
  547.         'rewrite' => true,
  548.         'capability_type' => 'post',
  549.         'hierarchical' => false,
  550.         'menu_position' => null,
  551.         'supports' => array('thumbnail','title','editor')
  552.       );
  553.  
  554.     register_post_type( 'case_study' , $args );
  555.  
  556.    
  557. }
  558. function register_main_content() {
  559.     global $post_types;
  560.  
  561.     array_push($post_types, 'main_content');
  562.  
  563.     $labels = array(
  564.         'name' => _x('Home Page Featured Contents', 'The main content will appear in top portion of home page'),
  565.       'add_new' => _x('Add Front Featured Content', 'portfolio item'),
  566.         'add_new_item' => __('Add Front Featured Content'),
  567.         'edit_item' => __('Edit Front Featured Content'),
  568.         'new_item' => __('New Front Featured Content'),
  569.         'view_item' => __('View Front Featured Content'),
  570.         'search_items' => __('Search Front Featured Content'),
  571.         'not_found' =>  __('Nothing found'),
  572.         'not_found_in_trash' => __('Nothing found in Trash'),
  573.         'parent_item_colon' => ''
  574.     );
  575.  
  576.     $args = array(
  577.         'labels' => $labels,
  578.         'public' => true,
  579.         'publicly_queryable' => true,
  580.         'show_ui' => true,
  581.         'query_var' => true,
  582.         'rewrite' => true,
  583.         'capability_type' => 'post',
  584.         'hierarchical' => false,
  585.         'menu_position' => null,
  586.         'supports' => array('thumbnail','editor','title')
  587.       );
  588.  
  589.     register_post_type( 'main_content' , $args );
  590. }
  591.  
  592.  
  593.  
  594. function plastec_wp_setup() {
  595.    
  596.     // This theme uses a custom image size for featured images, displayed on "standard" posts.
  597.     add_theme_support( 'post-thumbnails' );
  598.     set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop
  599.    
  600.     add_theme_support( 'menus' );
  601.    
  602.     programmatically_create_post();
  603.    
  604.  
  605.  
  606.  
  607.  
  608. }
  609.  
  610.  
  611.  
  612. function prfx_custom_meta() {
  613.     add_meta_box( 'prfx_meta', __( 'Featured Title', 'prfx-textdomain' ), 'prfx_meta_callback', 'main_content' );
  614.     add_meta_box( 'case_stdy_meta', __( 'Case Study Details', 'case_stdy_domain' ), 'case_study_callback', 'case_study' );
  615.     add_meta_box( 'news_meta', __( 'News details', 'news_domain' ), 'news_callback', 'news' );
  616.     add_meta_box( 'frnt_detail_box1_meta', __( 'Box Data', 'box_domain' ), 'frnt_detail_bx1_callback', 'front_detail_box1' );
  617.     add_meta_box( 'frnt_detail_boxes_meta', __( 'Box Data', 'box_domain' ), 'frnt_detail_boxes_callback', 'front_detail_boxes' );
  618.     add_meta_box( 'frnt_bottom_box_meta', __( 'Box Data', 'box_domain' ), 'frnt_bottom_box_callback', 'front_bottom_box' );
  619.     add_meta_box( 'footer_about_meta', __( 'Footer About Content', 'box_domain' ), 'footer_about_callback', 'footer_about_content' );
  620.    // add_meta_box( 'front_case_stdy_meta', __( 'Case Study Details', 'prfx-textdomain' ), 'frnt_case_stdy_callback', 'front_casestudy_slider' );
  621.  
  622.  
  623. }
  624. function footer_about_callback() {
  625.     global $post;
  626.     $id =  $post->ID;
  627.     wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );
  628.     $meta = get_post_meta( $id);
  629.     //print_r($meta);
  630.        
  631.        
  632.     ?>
  633.     <style>
  634.     #post-body-content  {
  635.         width: 85%;
  636.         height: 1200px !important;
  637.         background: #fff
  638.     }
  639.     #box_title1 {
  640.         font-family: "Rock Salt" !important;
  641.     }
  642.     #box_title2 {
  643.    
  644.         font-family: 'Titillium Web', sans-serif;      
  645.         font-size: 2.5em;
  646.         font-weight: 800;
  647.     }
  648.     </style>
  649.     <p>
  650.    
  651.        
  652.            
  653.             <div style="width:100%  !important;height:600px !important;float:left;margin-top:5%">
  654.             <label for="box1_link_url" ><?php _e( 'About Content', 'box_domain' )?></label>
  655.            
  656.             <div style="width:100%;height:200px">
  657.         <textarea  type="text" style="width:100%;height:300px;float:left !important" name="about_content" id="about_content"  ><?php if ( isset ( $meta['about_content'] ) ) echo $meta['about_content'][0]; ?></textarea>
  658.             </div>
  659.        
  660.  
  661.  
  662.  
  663.        
  664.     </p>
  665.     <?php
  666.  
  667.  
  668.  
  669.    
  670. }
  671.  
  672.  
  673.  
  674. function frnt_bottom_box_callback() {
  675.     global $post;
  676.     $id =  $post->ID;
  677.     wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );
  678.     $meta = get_post_meta( $id);
  679.     //print_r($meta);
  680.        
  681.        
  682.     ?>
  683.     <style>
  684.     #post-body-content  {
  685.         width: 85%;
  686.         height: 1200px !important;
  687.         background: #fff
  688.     }
  689.     #box_title1 {
  690.         font-family: "Rock Salt" !important;
  691.     }
  692.     #box_title2 {
  693.    
  694.         font-family: 'Titillium Web', sans-serif;      
  695.         font-size: 2.5em;
  696.         font-weight: 800;
  697.     }
  698.     </style>
  699.     <p>
  700.    
  701.        
  702.            
  703.             <div style="width:100%  !important;height:600px !important;float:left;margin-top:5%">
  704.             <label for="box_title1" ><?php _e( 'Title 1', 'box_domain' )?></label>
  705.                   <input type="text" style="width:100%" name="box_title1" id="box_title1" value="<?php if ( isset ( $meta['box_title1'] ) ) echo $meta['box_title1'][0]; ?>"
  706.                   <label for="box_title2" ><?php _e( 'Title 2', 'box_domain' )?></label>
  707.                   <input type="text" style="width:100%" name="box_title2" id="box_title2" value="<?php if ( isset ( $meta['box_title2'] ) ) echo $meta['box_title2'][0]; ?>"        
  708.           <br />
  709.          
  710.             <label for="box1_link_url" ><?php _e( 'Description', 'box_domain' )?></label>
  711.            
  712.             <div style="width:100%;height:200px">
  713.         <textarea  type="text" style="width:100%;height:300px;float:left !important" name="box_description" id="box_description"  ><?php if ( isset ( $meta['box_description'] ) ) echo $meta['box_description'][0]; ?></textarea>
  714.             </div>
  715.        
  716.  
  717.  
  718. <?php// print_r($meta);?>
  719.         <?php// $state = ''; if( isset ( $meta['featured'] ) && $meta['featured'][0] =='checked') $state =  "checked"; ?>
  720.        <!-- <input type="checkbox" <?php echo $state;?>  name="featured"  id="featured" value =' <?php if($state == 'checked') echo "checked";else echo "unchecked" ?>' >-->
  721.        
  722.  
  723.        
  724.     </p>
  725.     <?php
  726.  
  727.  
  728.  
  729.    
  730. }
  731.  
  732.  
  733.  
  734. function frnt_detail_boxes_callback() {
  735.     global $post;
  736.     $id =  $post->ID;
  737.     wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );
  738.     $meta = get_post_meta( $id);
  739.     //print_r($meta);
  740.        
  741.        
  742.     ?>
  743.     <style>
  744.     #post-body-content  {
  745.         width: 85%;
  746.         height: 1200px !important;
  747.         background: #fff
  748.     }
  749.     #box_title {
  750.         font-family: "Rock Salt" !important;
  751.     }
  752.     </style>
  753.     <p>
  754.    
  755.        
  756.            
  757.             <div style="width:100%  !important;height:600px !important;float:left;margin-top:5%">
  758.             <label for="box1_title" ><?php _e( 'Title', 'box_domain' )?></label>
  759.                   <input type="text" style="width:100%" name="box_title" id="box_title" value="<?php if ( isset ( $meta['box_title'] ) ) echo $meta['box_title'][0]; ?>"
  760.         <label for ='detail_box1_image'><?php _e( 'Detail Image ', 'box_domain' )?>
  761.         </label>
  762.          <input type="file" style="width:100%" size = '1000' name="box_image" id="box_image"  />
  763.          <?php if ( isset ( $meta['box_image'] ) ):?>
  764.          <img style="width:300px" src = '<?php echo $meta['box_image'][0]; ?>' />
  765.          <?php endif;?>
  766.           <br />
  767.          
  768.             <label for="box1_link_url" ><?php _e( 'Description', 'box_domain' )?></label>
  769.            
  770.             <div style="width:100%;height:200px">
  771.         <textarea  type="text" style="width:100%;height:300px;float:left !important" name="box_description" id="box_description"  ><?php if ( isset ( $meta['box_description'] ) ) echo $meta['box_description'][0]; ?></textarea>
  772.             </div>
  773.        
  774.  
  775.  
  776. <?php// print_r($meta);?>
  777.         <?php// $state = ''; if( isset ( $meta['featured'] ) && $meta['featured'][0] =='checked') $state =  "checked"; ?>
  778.        <!-- <input type="checkbox" <?php echo $state;?>  name="featured"  id="featured" value =' <?php if($state == 'checked') echo "checked";else echo "unchecked" ?>' >-->
  779.        
  780.  
  781.        
  782.     </p>
  783.     <?php
  784.  
  785.  
  786.  
  787.    
  788. }
  789.  
  790.  
  791.  
  792. function frnt_detail_bx1_callback() {
  793.     global $post;
  794.     $id =  $post->ID;
  795.     wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );
  796.     $meta = get_post_meta( $id);
  797.     //print_r($meta);
  798.        
  799.        
  800.     ?>
  801.     <style>
  802.     #post-body-content  {
  803.         width: 85%;
  804.         height: 1200px !important;
  805.         background: #fff
  806.     }
  807.     #box1_title {
  808.         font-family: "Rock Salt" !important;
  809.     }
  810.     </style>
  811.     <p>
  812.    
  813.        
  814.            
  815.             <div style="width:100%  !important;height:600px !important;float:left;margin-top:5%">
  816.             <label for="box1_title" ><?php _e( 'Title', 'box_domain' )?></label>
  817.                   <input type="text" style="width:100%" name="box1_title" id="box1_title" value="<?php if ( isset ( $meta['box1_title'] ) ) echo $meta['box1_title'][0]; ?>"
  818.         <label for ='detail_box1_image'><?php _e( 'Detail Image ', 'box_domain' )?>
  819.         </label>
  820.          <input type="file" style="width:100%" size = '1000' name="detail_box1_image" id="detail_box1_image"  />
  821.          <?php if ( isset ( $meta['detail_box1_image'] ) ):?>
  822.          <img style="width:300px" src = '<?php echo $meta['detail_box1_image'][0]; ?>' />
  823.          <?php endif;?>
  824.           <br />
  825.             <label for="box1_link_title" ><?php _e( 'Button Link Title ', 'box_domain' )?></label>
  826.         <input type="text" style="width:100%" name="box1_link_title" id="box1_link_title" value="<?php if ( isset ( $meta['box1_link_title'] ) ) echo $meta['box1_link_title'][0]; ?>" />
  827.          
  828.             <label for="box1_link_url" ><?php _e( 'Button Link Url ', 'box_domain' )?></label>
  829.            
  830.             <div style="width:100%;height:200px">
  831.             <label style="width:auto;float:left !important;font-size:1.2em;padding-top:1%;padding-right:1%"><?php echo site_url(); ?>/</label>
  832.         <input type="text" style="width:65%;float:left !important" name="box1_link_url" id="box1_link_url" value="<?php if ( isset ( $meta['box1_link_url'] ) ) echo $meta['box1_link_url'][0]; ?>" />
  833.             </div>
  834.        
  835.  
  836.  
  837. <?php// print_r($meta);?>
  838.         <?php// $state = ''; if( isset ( $meta['featured'] ) && $meta['featured'][0] =='checked') $state =  "checked"; ?>
  839.        <!-- <input type="checkbox" <?php echo $state;?>  name="featured"  id="featured" value =' <?php if($state == 'checked') echo "checked";else echo "unchecked" ?>' >-->
  840.        
  841.  
  842.        
  843.     </p>
  844.     <?php
  845.  
  846.  
  847.  
  848.    
  849. }
  850.  
  851. function case_study_callback() {
  852.     global $post;
  853.     $id =  $post->ID;
  854.     wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );
  855.     $meta = get_post_meta( $id);
  856.     //print_r($meta);
  857.        
  858.     ?>
  859.     <p>
  860.             <label for="client" ><?php _e( 'Client ', 'case_stdy_domain' )?></label>
  861.         <input type="text" style="width:100%" name="client" id="client" value="<?php if ( isset ( $meta['client'] ) ) echo $meta['client'][0]; ?>" />
  862.        
  863.         <label for ='channel'><?php _e( 'Channel ', 'case_stdy_domain' )?>
  864.         </label>
  865.          <input type="text" style="width:100%" name="channel" id="channel" value="<?php if ( isset ( $meta['channel'] ) ) echo $meta['channel'][0]; ?>" />
  866.          
  867.          
  868.         <label for ='logistics'><?php _e( 'Logistics ', 'case_stdy_domain' )?>
  869.         </label>
  870.          <input type="text" style="width:100%" name="logistics" id="logistics" value="<?php if ( isset ( $meta['logistics'] ) ) echo $meta['logistics'][0]; ?>" />
  871.          
  872.          <hr />
  873.         <label for ='image1'><?php _e( 'Image1 ', 'case_stdy_domain' )?>
  874.         </label>
  875.          <input type="file" style="width:100%" size = '1000' name="image1" id="image1"  />
  876.          <img style="width:300px" src = '<?php if ( isset ( $meta['image1'] ) ) echo $meta['image1'][0]; ?>' />
  877.          
  878.          <hr />
  879.         <label for ='image2'><?php _e( 'Image2 ', 'case_stdy_domain' )?>
  880.         </label>
  881.          <input type="file"  size = '1000' style="width:100%" name="image2" id="image2"  />
  882.          <img style="width:300px" src = '<?php if ( isset ( $meta['image2'] ) ) echo $meta['image2'][0]; ?>' />
  883.          
  884.          <hr />
  885.          
  886.         <label for ='image3'><?php _e( 'Image3 ', 'case_stdy_domain' )?>
  887.         </label>
  888.          <input type="file" style="width:100%" name="image3" id="image3"  />
  889.          <img style="width:300px"  size = '1000' src = '<?php if ( isset ( $meta['image3'] ) ) echo $meta['image3'][0]; ?>' />
  890.  
  891.  
  892.  
  893.  
  894. <?php// print_r($meta);?>
  895.         <?php// $state = ''; if( isset ( $meta['featured'] ) && $meta['featured'][0] =='checked') $state =  "checked"; ?>
  896.        <!-- <input type="checkbox" <?php echo $state;?>  name="featured"  id="featured" value =' <?php if($state == 'checked') echo "checked";else echo "unchecked" ?>' >-->
  897.        
  898.  
  899.        
  900.     </p>
  901.  
  902.    
  903. <?php
  904.    
  905. }
  906. function news_callback($post) {
  907.     wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );
  908.     $prfx_stored_meta = get_post_meta( $post->ID );
  909.    // print_r($meta);
  910.     ?>
  911.     <style>
  912.         textarea {
  913.             height:200px;
  914.         }
  915.     </style>
  916.     <p>
  917.         <label for="news-bolddata" ><?php _e( 'Featured  news content ', 'news_domain' )?></label>
  918.         <textarea style="width:100%" name="news-bolddata" id="news-bolddata" ><?php if ( isset ( $prfx_stored_meta['news-bolddata'] ) ) echo $prfx_stored_meta['news-bolddata'][0]; ?> </textarea>
  919.     </p>
  920.  
  921.     <p>
  922.         <label for="news-innercont" ><?php _e( 'News Inner content ', 'news_domain' )?></label>
  923.         <textarea style="width:100%" name="news-innercont" id="news-innercont" ><?php if ( isset ( $prfx_stored_meta['news-innercont'] ) ) echo $prfx_stored_meta['news-innercont'][0]; ?> </textarea>
  924.     </p>
  925.  
  926.     <p>
  927.         <label for="news-subhead" ><?php  _e( 'Subheading: ', 'news_domain' )?></label>
  928.         <input type="text" style="width:100%" name="news-subhead" id="news-subhead" value="<?php if ( isset ( $prfx_stored_meta['news-subhead'] ) ) echo $prfx_stored_meta['news-subhead'][0]; ?>" />
  929.     </p>
  930.     <p>
  931.         <label for="news-highlighthead" ><?php  _e( 'Subheading highlight: ', 'news_domain' )?></label>
  932.         <input type="text" style="width:100%" name="news-highlighthead" id="news-highlighthead" value="<?php if ( isset ( $prfx_stored_meta['news-highlighthead'] ) ) echo $prfx_stored_meta['news-highlighthead'][0]; ?>" />
  933.     </p>
  934.     <p>
  935.         <label for="news-subcont" ><?php _e( 'News sub content ', 'news_domain' )?></label>
  936.         <textarea style="width:100%" name="news-subcont" id="news-subcont" ><?php if ( isset ( $prfx_stored_meta['news-subcont'] ) ) echo $prfx_stored_meta['news-subcont'][0]; ?> </textarea>
  937.     </p>
  938.  
  939.  
  940.  
  941.         <?php
  942.  
  943.    
  944. }
  945. function prfx_meta_callback( $post ) {
  946.     wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );
  947.     $prfx_stored_meta = get_post_meta( $post->ID );
  948.    // print_r($meta);
  949.     ?>
  950.     <style>
  951.         .meta-text {
  952.             width:100%;
  953.             font-family: 'Dosis', sans-serif;
  954.             font-size: 3.2em;
  955.             text-transform:uppercase;
  956.            
  957.         }
  958.         .meta-text1 {
  959.             color: #1fd2d3 !important;
  960.         }
  961.     </style>
  962.     <p>
  963.         <label for="meta-text" ><?php  _e( 'Front page feature title part 1: ', 'prfx-textdomain' )?></label>
  964.         <input type="text" class = 'meta-text' name="meta-text" id="meta-text" value="<?php if ( isset ( $prfx_stored_meta['meta-text'] ) ) echo $prfx_stored_meta['meta-text'][0]; ?>" />
  965.     </p>
  966.  
  967.     <p>
  968.         <label for="meta-text" ><?php _e( 'Front page feature title part 2: ', 'prfx-textdomain' )?></label>
  969.         <input type="text"   class = 'meta-text'  name="meta-text1" id="meta-text1" value="<?php if ( isset ( $prfx_stored_meta['meta-text1'] ) ) echo $prfx_stored_meta['meta-text1'][0]; ?>" />
  970.     </p>
  971.    
  972.     <p>
  973.         <label for="meta-text" ><?php _e( 'Front page feature title part 3: ', 'prfx-textdomain' )?></label>
  974.         <input type="text" class = 'meta-text meta-text1' name="meta-text2" id="meta-text2" value="<?php if ( isset ( $prfx_stored_meta['meta-text2'] ) ) echo $prfx_stored_meta['meta-text2'][0]; ?>" />
  975.     </p>
  976.  
  977.     <p>
  978.         <label for="meta-text" ><?php _e( 'Front page feature title part 4: ', 'prfx-textdomain' )?></label>
  979.         <input type="text" class="meta-text" name="meta-text3" id="meta-text3" value="<?php if ( isset ( $prfx_stored_meta['meta-text3'] ) ) echo $prfx_stored_meta['meta-text3'][0]; ?>" />
  980.     </p>
  981.  
  982.     <?php
  983. }
  984.  
  985.  
  986.  
  987. /**
  988.  * Saves the custom meta input*/
  989.  
  990. function prfx_meta_save( $post_id ) {
  991.                 require_once(ABSPATH . "wp-admin" . '/includes/image.php');
  992. require_once(ABSPATH . "wp-admin" . '/includes/file.php');
  993. require_once(ABSPATH . "wp-admin" . '/includes/media.php');
  994.    
  995.     // Checks save status
  996.    
  997.     global $meta_box_fields;   
  998.     global $meta_box_files;
  999.     $is_autosave = wp_is_post_autosave( $post_id );
  1000.     $is_revision = wp_is_post_revision( $post_id );
  1001.     $is_valid_nonce = ( isset( $_POST[ 'prfx_nonce' ] ) && wp_verify_nonce( $_POST[ 'prfx_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';
  1002.  
  1003.     // Exits script depending on save status
  1004.     if ( $is_autosave || $is_revision || !$is_valid_nonce ) {
  1005.         return;
  1006.     }
  1007.  
  1008.     // Checks for input and sanitizes/saves if needed
  1009.     if(!isset($_POST['featured'])) {
  1010.         $_POST['featured'] = 'unchecked';
  1011.     }  
  1012.     // print_r($_POST);
  1013.    // exit;
  1014.     foreach($meta_box_fields as $meta_box_field) {
  1015.         if( isset( $_POST[ $meta_box_field] ) ) {
  1016.             update_post_meta( $post_id, $meta_box_field, sanitize_text_field( $_POST[ $meta_box_field] ) );
  1017.         }
  1018.  
  1019.        
  1020.     }
  1021.    // exit;
  1022.    // print_r($_FILES);
  1023.     if(!empty( $_FILES )) {
  1024.         foreach($meta_box_files as $meta_box_field) {
  1025.             if( isset( $_FILES[ $meta_box_field] ) ) {
  1026.            
  1027.             if($_FILES[ $meta_box_field] ['size']>0) {
  1028.                 $goal_image_file = wp_upload_bits( $_FILES[$meta_box_field]['name'], null, file_get_contents( $_FILES[$meta_box_field]['tmp_name'] ) );
  1029.  
  1030.                 $attachment_id = media_handle_upload($meta_box_field, $post_id);
  1031.                
  1032.                 //print_r($goal_image_file);
  1033.                  //exit;
  1034.                 if( false == $goal_image_file['error'] ) {
  1035.                 update_post_meta( $post_id,$meta_box_field, $goal_image_file['url'] );
  1036.  
  1037.                 }
  1038.                 }
  1039.                
  1040.                
  1041.             }
  1042.         }
  1043.     }
  1044.  
  1045.    
  1046.  
  1047.  
  1048. }
  1049. add_action( 'save_post', 'prfx_meta_save' );
  1050.  
  1051.  
  1052. function foo_move_deck() {
  1053.     global $post_types;
  1054.  
  1055.  
  1056.     # Get the globals:
  1057.    global $post, $wp_meta_boxes;
  1058.  
  1059.     # Output the "advanced" meta boxes:
  1060.    do_meta_boxes(get_current_screen(), 'advanced',$post);
  1061.  
  1062.     # Remove the initial "advanced" meta boxes:
  1063.    
  1064.     foreach($post_types as $post_type)
  1065.         unset($wp_meta_boxes[$post_type]['advanced']);
  1066.  
  1067. }
  1068.  
  1069. function reset_editor($post_type)
  1070. {
  1071.      global $_wp_post_type_features;
  1072.  
  1073.  
  1074.      $feature = "editor";
  1075.      if ( !isset($_wp_post_type_features[$post_type]) )
  1076.      {
  1077.  
  1078.      }
  1079.      elseif ( isset($_wp_post_type_features[$post_type][$feature]) )
  1080.      unset($_wp_post_type_features[$post_type][$feature]);
  1081. }
  1082.  
  1083. add_action( 'add_meta_boxes', 'prfx_custom_meta' );
  1084.  
  1085. add_action('edit_form_after_title', 'foo_move_deck');
  1086.  
  1087. add_action( 'post_edit_form_tag' , 'post_edit_form_tag' );
  1088.  
  1089. function post_edit_form_tag( ) {
  1090.    echo ' enctype="multipart/form-data"';
  1091. }
  1092.  
  1093.  
  1094. function admin_menu_actions() {
  1095.     //hide_add_new_custom_type('case_study');
  1096.     remove_admin_menu_pages() ;
  1097. }
  1098.  
  1099.  
  1100. add_action( 'admin_menu', 'admin_menu_actions' );
  1101.  
  1102. function remove_admin_menu_pages() {
  1103.     remove_menu_page('edit.php');
  1104.     remove_menu_page('edit-comments.php');
  1105.    
  1106.     remove_menu_page('tools.php');
  1107.     remove_menu_page('upload.php');
  1108.     //remove_menu_page('themes.php');
  1109.  
  1110.  
  1111.      
  1112. }
  1113.  
  1114.  
  1115. /*Creating posts for pages programatically*/
  1116. /*
  1117. $post = array(
  1118.   'post_type' => 'page' ,
  1119.   'page_template'=>'home-template'
  1120.  
  1121. );  */
  1122.  
  1123. // Insert the post into the database
  1124. //wp_insert_post( $post );
  1125.  
  1126.  
  1127. function programmatically_create_post() {
  1128.  
  1129.     // Initialize the page ID to -1. This indicates no action has been taken.
  1130.     $post_id = -1;
  1131.  
  1132.     // Setup the author, slug, and title for the post
  1133.     $author_id = 1;
  1134.     $slug = 'example-post';
  1135.     $title = 'Home page post';
  1136.  
  1137.     // If the page doesn't already exist, then create it
  1138.     if( null == get_page_by_title( $title ) ) {
  1139.  
  1140.         // Set the post ID so that we know the post was created successfully
  1141.        
  1142.         $post_id = wp_insert_post(
  1143.             array(
  1144.                 'comment_status'    =>  'closed',
  1145.                 'ping_status'       =>  'closed',
  1146.                 'post_author'       =>  $author_id,
  1147.                 'post_name'     =>  $slug,
  1148.                 'post_title'        =>  $title,
  1149.                 'post_status'       =>  'publish',
  1150.                 'post_type'     =>  'page|news'
  1151.             )
  1152.         );
  1153.        
  1154.        
  1155.        
  1156.        
  1157.        
  1158.        
  1159.                                // Priority of box in display order
  1160.  
  1161.  
  1162.     // Otherwise, we'll stop
  1163.     } else {
  1164.  
  1165.             // Arbitrarily use -2 to indicate that the page with the title already exists
  1166.             $post_id = -2;
  1167.  
  1168.     } // end if
  1169.  
  1170. } // end programmatically_create_post
  1171. function trusted_page_sup() {
  1172.     if ( isset( $_GET['post'] ) )
  1173.         $post_id = $_GET['post'];
  1174.     elseif ( isset( $_POST['post_ID'] ) )
  1175.         $post_id = $_POST['post_ID'];
  1176.     else
  1177.         $post_id = get_the_ID();
  1178.  
  1179.     if ( ! $post_id )
  1180.         return;
  1181.  
  1182.     if ( 'page' != get_post_type( $post_id ) )
  1183.         return;
  1184.  
  1185.     if ( 'page-template.php' == get_post_meta( $post_id, '_wp_page_template', true ) ) {
  1186.         $tsuppliers2 = new Super_Custom_Post_Meta( 'page' );
  1187.         $tsuppliers2->add_meta_boxes( array(
  1188.             'id' => 'Contact-details',
  1189.             'context' => 'side',
  1190.             'priority'=> 'high',
  1191.             'post-type' => 'page',
  1192.             'fields' => array(
  1193.                 'base' => array('type'=>'select', 'options' => array('vermont','cape town')),
  1194.                 'Address' => array( 'type' => 'textarea' ),
  1195.                 'Tel:' => array('type' => 'text'),
  1196.                 'Fax' => array('type' => 'text'),
  1197.                 'Email' => array('type' => 'text'),
  1198.                 'Website' => array('type' => 'text'),
  1199.             )
  1200.         ) );
  1201.     }
  1202. }
  1203. /*
  1204.     Remove post row actions
  1205.     add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );
  1206.     function remove_row_actions( $actions )
  1207.     {
  1208.         if( get_post_type() === 'post' )
  1209.             unset( $actions['edit'] );
  1210.             unset( $actions['view'] );
  1211.             unset( $actions['trash'] );
  1212.             unset( $actions['inline hide-if-no-js'] );
  1213.             return $actions;
  1214.     }
  1215.  
  1216.    
  1217.    
  1218.    
  1219. */
  1220. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement