Advertisement
Guest User

Untitled

a guest
May 25th, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. <?php
  2. /**
  3. * Template Name: One Page
  4. *
  5. * @package WordPress
  6. * @subpackage Oxygen
  7. * @since Oxygen 1.0
  8. */
  9. the_post();
  10.  
  11.  
  12. get_header();
  13.  
  14. $fwc = ffContainer::getInstance();
  15. $postMeta = $fwc->getDataStorageFactory()->createDataStorageWPPostMetas_NamespaceFacade( $post->ID );
  16. $onePage = $postMeta->getOption( 'onepage');// ( $opt->getOption('oxygen_to', 'oxygen_o'));
  17. $onePage = unserialize( base64_decode( $onePage ));
  18. $sectionQuery = ffContainer::getInstance()->getOptionsFactory()->createQuery( $onePage, 'ffComponent_OxygenTheme_OnePageOptions');
  19.  
  20. foreach ( $sectionQuery->get('sections') as $query ) {
  21.  
  22. $GLOBALS['ff-query'] = $query;
  23.  
  24. $variation_type = $query->getVariationType();
  25.  
  26. $variation_sections = array(
  27. 'about',
  28. 'blockquote',
  29. 'call-to-action',
  30. 'contact',
  31. 'features',
  32. 'fun-facts',
  33. 'history',
  34. 'html',
  35. 'map',
  36. 'portfolio',
  37. 'pricing',
  38. 'services',
  39. 'social',
  40. 'team',
  41. 'testimonials',
  42. 'video',
  43. 'why-we',
  44. );
  45.  
  46. if( in_array($variation_type, $variation_sections) ){
  47. $customId = $query->get('custom-id');
  48.  
  49. if( is_object( $customId ) && $customId->get('enable') ) {
  50. $newId = $customId->get('new-id');
  51. $newId = str_replace('#', '', $newId );
  52. echo '<section class="ff-section-id-holder" id="'.$newId.'">';
  53. }
  54.  
  55. get_template_part( 'templates/onePage/sections/' . $variation_type );
  56.  
  57. if( is_object( $customId ) && $customId->get('enable') ) {
  58. echo '</section>';
  59. }
  60. }
  61.  
  62. $variation_home = array(
  63. 'home-menu-only',
  64. 'home-1',
  65. 'home-2',
  66. 'home-3',
  67. 'home-4',
  68. 'home-6',
  69. 'home-7',
  70. 'home-8',
  71. 'home-9',
  72. 'home-10',
  73. );
  74.  
  75. if( in_array($variation_type, $variation_home) ){
  76. //$query->get('custom-id')//->debug_dump();
  77.  
  78.  
  79. get_template_part( 'templates/onePage/home/' . $variation_type );
  80.  
  81.  
  82. }
  83.  
  84. }
  85.  
  86.  
  87. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement