PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.7.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.7.0
2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 1.1.0 All 77 releases
fluent-community / app / Views / headless_page.php

headless_page.php in FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses 2.7.0, at app/Views/headless_page.php

106 lines 5.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (!defined('ABSPATH')) exit; // Exit if accessed directly ?>
2 <?php
3 /**
4 * @var $title string
5 * @var $description string
6 * @var $url string
7 * @var $featured_image string
8 * @var $css_files array
9 * @var $js_files array
10 * @var $js_vars array
11 * @var $scope string
12 */
13 ?>
14 <!DOCTYPE html>
15 <html <?php language_attributes(); ?>>
16 <head>
17 <title><?php echo esc_attr($title); ?></title>
18 <meta charset="<?php bloginfo('charset'); ?>">
19 <meta name="description" content="<?php echo esc_attr($description); ?>">
20 <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0,viewport-fit=cover,interactive-widget=resizes-content"/>
21 <?php
22 if (!empty($load_wp)) :
23 wp_head();
24 else: ?>
25 <meta name="mobile-web-app-capable" content="yes">
26 <meta name="robots" content="noindex">
27 <link rel="icon" type="image/x-icon" href="<?php echo esc_url(get_site_icon_url()); ?>"/>
28 <meta property="og:type" content="website">
29 <meta property="og:url" content="<?php echo esc_url($url); ?>">
30 <meta property="og:site_name" content="<?php bloginfo('name'); ?>">
31 <meta property="og:title" content="<?php echo esc_attr($og_title); ?>">
32 <meta property="og:description" content="<?php echo esc_attr($description); ?>">
33 <?php endif; ?>
34
35 <?php if ($featured_image): ?>
36 <meta property="og:image" content="<?php echo esc_url($featured_image); ?>"/>
37 <?php endif; ?>
38
39 <style>
40 .fluent_com, .fcom_full_layout {
41 display: block;
42 width: 100%;
43 }
44 </style>
45
46 <?php do_action('fluent_community/headless/head_early', $scope); ?>
47
48 <?php foreach ($css_files as $fluentCommunityCssFile): ?>
49 <link rel="stylesheet" href="<?php echo esc_url($fluentCommunityCssFile); ?>?version=<?php echo esc_attr(FLUENT_COMMUNITY_PLUGIN_VERSION); ?>" media="screen"/> <?php // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet ?>
50 <?php endforeach; ?>
51 <?php do_action('fluent_community/headless/head', $scope); ?>
52 </head>
53 <body class="fcom_headless_page fcom_headless_scope_<?php echo esc_attr($scope); ?>">
54
55 <?php if ($layout == 'signup'): ?>
56 <div class="fcom_full_layout fluent_com_auth <?php echo $portal['position'] == 'right' ? ' fcom_auth_page_row_reverse' : ' fcom_auth_page'; ?>">
57 <div class="fcom_layout_side"
58 style="<?php if (!empty($portal['background_image'])) echo 'background-image: url(' . esc_url($portal['background_image']) . ');'; ?>
59 <?php if (!empty($portal['background_color'])) echo 'background-color: ' . esc_attr($portal['background_color']) . ';'; ?>
60 display: <?php echo $portal['hidden'] ? 'none' : 'flex'; ?>">
61 <div class="fcom_welcome">
62 <?php if (!empty($portal['logo'])): ?>
63 <div class="fcom_logo">
64 <a href="<?php echo esc_url(\FluentCommunity\App\Services\Helper::baseUrl()); ?>">
65 <img src="<?php echo esc_url($portal['logo']); ?>" alt="<?php echo esc_attr__('Site logo', 'fluent-community'); ?>">
66 </a>
67 </div>
68 <?php endif; ?>
69 <h2 class="fcom_title" style="color: <?php echo esc_attr(!empty($portal['title_color']) ? $portal['title_color'] : 'var(--fcom_text_color, #606266)'); ?>">
70 <?php echo wp_kses_post($portal['title']); ?>
71 </h2>
72 <div class="fcom_sub_title" style="color: <?php echo esc_attr(!empty($portal['text_color']) ? $portal['text_color'] : 'var(--fcom_text_color, #606266)'); ?>">
73 <p><?php echo wp_kses_post($portal['description']); ?></p>
74 </div>
75 </div>
76 </div>
77 <div class="fcom_layout_main" style="<?php if (!empty($portal['form']['background_image'])): ?>background-image: url(<?php echo esc_url($portal['form']['background_image']); ?>);<?php endif; ?>">
78 <div class="fluent_com fluent_com_auth">
79 <?php do_action('fluent_community/headless/content', $scope); ?>
80 </div>
81 </div>
82 </div>
83 <?php else: ?>
84 <div class="fluent_com">
85 <?php do_action('fluent_community/headless/content', $scope); ?>
86 </div>
87 <?php endif; ?>
88
89 <script>
90 <?php foreach ($js_vars as $fluentCommunityVarKey => $fluentCommunityValues): ?>
91 var <?php echo esc_attr($fluentCommunityVarKey); ?> = <?php echo wp_json_encode($fluentCommunityValues); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
92 <?php endforeach; ?>
93 </script>
94
95 <?php do_action('fluent_community/headless/before_js_loaded', $scope); ?>
96
97 <?php foreach ($js_files as $fluentCommunityFile): ?>
98 <script type="module" src="<?php echo esc_url($fluentCommunityFile); ?>?version=<?php echo esc_attr(FLUENT_COMMUNITY_PLUGIN_VERSION); ?>" defer="defer"></script> <?php // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript ?>
99 <?php endforeach; ?>
100
101 <?php if (!empty($load_wp)) { wp_footer(); } ?>
102
103 <?php do_action('fluent_community/headless/footer', $scope); ?>
104 </body>
105 </html>
106