Advertisement
Guest User

PAGE_USER

a guest
Aug 12th, 2016
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.68 KB | None | 0 0
  1.  
  2. <----------------------- HEADER_USER_PAGE.PHP ------------------->
  3.  
  4. <?php
  5. /**
  6. * The Header for Italystrap profile page
  7. *
  8. * Displays all of the <head> section and Main menu
  9. *
  10. * For improve performance replace $lang_attr with lang="xx-XX" when xx_XX is your language (en_EN - de_DE - fr_FR - ecc)
  11. * Otherwise you can use <?php language_attributes(); ?> instead
  12. *
  13. * You can also replace <?php bloginfo( 'charset' ); ?> with "UTF-8" or your charset
  14. * @since ItalyStrap 1.0
  15. */
  16.  
  17. $lang_attr = get_bloginfo('language');
  18. ?>
  19. <!DOCTYPE html>
  20. <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="<?php echo $lang_attr; ?>" prefix="og: http://ogp.me/ns#"> <![endif]-->
  21. <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="<?php echo $lang_attr; ?>" prefix="og: http://ogp.me/ns#"> <![endif]-->
  22. <!--[if IE 8]> <html class="no-js lt-ie9" lang="<?php echo $lang_attr; ?>" prefix="og: http://ogp.me/ns#"> <![endif]-->
  23. <!--[if gt IE 8]><!--> <html class="no-js" lang="<?php echo $lang_attr; ?>" prefix="og: http://ogp.me/ns#"> <!--<![endif]-->
  24.  
  25. <head>
  26. <meta charset="UTF-8" >
  27. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  28. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  29. <!-- acf-form-head -->
  30. <?php acf_form_head(); ?>
  31. <!-- acf-form-head -->
  32. <?php wp_head();?>
  33. <?php wp_footer(); ?>
  34.  
  35. </head>
  36.  
  37. <body <?php body_class( 'fuelux' ); ?> style="background-color: #AEAEAE;">
  38. <div class="blog-wrapper">
  39. <header style="background-color: #5ca4ff;">
  40. <div class="content-wrapper">
  41. <div style="min-height: 70px;">
  42. <div class="row">
  43. <div class="col-xs-12 col-sm-6 col-md-6 col-ld-6">
  44. <span itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
  45. <a href="<?php echo home_url('/'); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home" itemprop="url"><img alt="<?php bloginfo('name'); ?>" src="<?php echo italystrap_logo();?>" style="margin-top: 1.5em;margin-bottom: 1em;height: 70px;"></a>
  46. <meta itemprop="image" content="<?php echo italystrap_logo();?>"/>
  47. <meta itemprop="name" content="<?php bloginfo('name'); ?>"/>
  48. </span>
  49. </div>
  50. <div class="col-xs-12 col-sm-6 col-md-6 col-ld-6" style="margin-top: 1.5em;margin-bottom: 1em;">
  51. <?php if ( ! dynamic_sidebar( 'navigation-right' ) ) : ?>
  52. <?php endif; ?>
  53. </div>
  54. </div><!--#row -->
  55. </div><!-- #div -->
  56. </div><!-- #content-wrapper -->
  57. <div class="clearfix"></div>
  58. <?php
  59. /**
  60. * This it's only a nav container
  61. * .navbar-wrapper style is in _menu.scss css/src/sass
  62. */
  63. ?>
  64. <nav class="navbar-wrapper" role="navigation">
  65. <div itemscope itemtype="http://schema.org/SiteNavigationElement">
  66. <?php
  67. /**
  68. * Modify style for menù with bootstrap style
  69. * @link http://getbootstrap.com/components/#navbar
  70. */
  71. ?>
  72. <div id="navbar" class="navbar navbar-inverse navbar-static-top">
  73. <div class="container inner-wrapper">
  74. <div class="navbar-header">
  75. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  76. <span class="icon-bar"></span>
  77. <span class="icon-bar"></span>
  78. <span class="icon-bar"></span>
  79. </button>
  80. <?php //Recupero i dati per l'intestaizione del menù
  81. $itm = get_field('personalizza');
  82. if ($itm == 'Personalizza Link'):
  83. $int_menu = get_field('html_menu');
  84. echo '' . $int_menu . '' ?>
  85. <? elseif ($itm == 'Linka Pagina'):
  86. $int_menu = get_field('pagina'); ?>
  87. <span itemscope itemtype="http://data-vocabulary.org/Product">
  88. <a class="navbar-brand" href="<?php echo esc_url( get_permalink($int_menu->ID) ); ?>" title="<?php echo $int_menu->post_title; ?>" rel="home" itemprop="category" content=""><span itemprop="name"><?php echo $int_menu->post_title; ?></span></a>
  89. </span>
  90. <?php else: ?>
  91. <span itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
  92. <a class="navbar-brand" href="<?php echo home_url('/'); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home" itemprop="url"><span itemprop="name">Studio AEF</span></a>
  93. </span>
  94. <? endif; ?>
  95. </div>
  96. <?php clean_custom_menu( 'user' ); ?>
  97. </div>
  98. </div>
  99. </div>
  100. </nav>
  101. </header>
  102.  
  103. <div class="container-fluid">
  104. <?php
  105.  
  106. if ( class_exists('ItalyStrapBreadcrumbs') ) {
  107.  
  108. $defaults = array(
  109. 'home' => '<span class="glyphicon glyphicon-home" aria-hidden="true"></span>',
  110. 'open_wrapper' => '<ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">',
  111. 'closed_wrapper' => '</ol>',
  112. 'before_element' => '<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">',
  113. 'before_element_active' => '<li class="active" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">',
  114. 'after_element' => '</li>',
  115. 'wrapper_name' => '<span itemprop="name">',
  116. 'close_wrapper_name' => '</span>'
  117. );
  118.  
  119. new ItalyStrapBreadcrumbs( $defaults );
  120.  
  121. }
  122.  
  123. ?>
  124. </div>
  125.  
  126.  
  127.  
  128. <----------------------- USER_PAGE.PHP -------------->
  129.  
  130. <?php
  131. /*
  132. Template Name: Pagina Utente
  133. Scopo Template: Pagina Utente
  134. */
  135.  
  136. // IMPOSTO IL MODULO DI REGISTRAZIONI COME NECESSARIO PER FAR GIRARE IL TUTTO
  137. require_once( ABSPATH . WPINC . '/registration.php' );
  138. require_once( ABSPATH . WPINC . '/class-phpass.php');
  139.  
  140. print_r($_POST);
  141.  
  142. ?>
  143. <head>
  144. <?php get_header('user_page'); ?>
  145. </head>
  146.  
  147. <body>
  148. <section id="page-user">
  149. <div class="container-fliud">
  150. <?php
  151. // Recupero le informazioni dell'utente corrente.
  152. global $current_user;
  153. get_currentuserinfo();
  154. // recupero il parametro per acf filed
  155. $su = wsl_get_stored_hybridauth_user_profiles_by_user_id( $current_user->ID );
  156. $u_id = 'user_' . $current_user->ID;
  157. $url = site_url( 'wp-json/acf/v2/user/' . $current_user->ID );
  158. ?>
  159.  
  160. <?php if (!empty(get_currentuserinfo()->ID)):
  161.  
  162. while ( have_posts() ) : the_post();
  163. $options = array(
  164. 'post_id' => $u_id,
  165. 'field_groups' => array(4099),
  166. 'honeypot' => true
  167. );
  168.  
  169. acf_form( $options );
  170.  
  171. endwhile;
  172.  
  173. //get_template_part( 'loops/content', 'profile-user');
  174. else:
  175. get_template_part( 'loops/content', 'none');
  176. endif; ?>
  177.  
  178. </div>
  179. </section>
  180.  
  181. <?php //acf_enqueue_uploader(); ?>
  182.  
  183. </body>
  184.  
  185. <footer>
  186. <?php get_footer('user_page'); ?>
  187. </footer>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement