|
6 | 6 | exit;
|
7 | 7 | }
|
8 | 8 | require_once ABSPATH . 'wp-admin/includes/admin.php';
|
9 |
| - |
| 9 | +$globalsHelper = vchelper('Globals'); |
| 10 | +$outputHelper = vchelper('Output'); |
10 | 11 | // @codingStandardsIgnoreStart
|
11 | 12 | global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version,
|
12 | 13 | $update_title, $total_update_count, $parent_file, $typenow, $wp_meta_boxes;
|
13 | 14 |
|
14 | 15 | $hookSuffix = $hook_suffix;
|
15 |
| -$wp_meta_boxes = []; |
| 16 | +$globalsHelper->set('wp_meta_boxes', []); |
16 | 17 | if (empty($current_screen)) {
|
17 | 18 | set_current_screen();
|
18 | 19 | }
|
|
21 | 22 | $current_screen->id = $sourceId;
|
22 | 23 | }
|
23 | 24 | // @codingStandardsIgnoreEnd
|
24 |
| -$typenow = get_post_type(); |
| 25 | +$globalsHelper->set('typenow', get_post_type()); |
25 | 26 | /**
|
26 | 27 | * @var $editableLink - link to editable content
|
27 | 28 | */
|
|
35 | 36 | <link rel="profile" href="http://gmpg.org/xfn/11" />
|
36 | 37 | <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
37 | 38 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0" />
|
38 |
| - <title><?php echo sprintf(__('Visual Composer: %s', 'visualcomposer'), get_the_title()); ?></title> |
| 39 | + <title><?php echo sprintf(__('Visual Composer: %s', 'visualcomposer'), esc_html(get_the_title())); ?></title> |
39 | 40 | <link rel="stylesheet"
|
40 | 41 | href="//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic&subset=latin,greek,greek-ext,cyrillic-ext,latin-ext,cyrillic">
|
41 | 42 | <?php
|
|
50 | 51 | if (is_array($extraOutput)) {
|
51 | 52 | foreach ($extraOutput as $output) {
|
52 | 53 | // @codingStandardsIgnoreLine
|
53 |
| - echo $output; |
| 54 | + vcv_print_html($output); |
54 | 55 | }
|
55 | 56 | unset($output);
|
56 | 57 | }
|
57 | 58 | $variables = vcfilter('vcv:editor:variables', [], ['sourceId' => $sourceId]);
|
58 | 59 | if (is_array($variables)) {
|
59 | 60 | foreach ($variables as $variable) {
|
60 | 61 | if (is_array($variable) && isset($variable['key'], $variable['value'])) {
|
61 |
| - $type = isset($variable['type']) ? $variable['type'] : 'variable'; |
62 |
| - evcview('partials/variableTypes/' . $type, $variable); |
| 62 | + $variableType = isset($variable['type']) ? $variable['type'] : 'variable'; |
| 63 | + evcview('partials/variableTypes/' . $variableType, $variable); |
63 | 64 | }
|
64 | 65 | }
|
65 | 66 | unset($variable);
|
|
71 | 72 | $extraOutput = vcfilter('vcv:frontend:body:extraOutput', [], ['sourceId' => $sourceId]);
|
72 | 73 | if (is_array($extraOutput)) {
|
73 | 74 | foreach ($extraOutput as $output) {
|
74 |
| - // @codingStandardsIgnoreLine |
75 |
| - echo $output; |
| 75 | + $outputHelper->printNotEscaped($output); |
76 | 76 | }
|
77 | 77 | unset($output);
|
78 | 78 | }
|
|
90 | 90 | </div>
|
91 | 91 | <iframe class="vcv-layout-iframe"
|
92 | 92 | src="<?php
|
93 |
| - // @codingStandardsIgnoreLine |
94 |
| - echo $editableLink; |
| 93 | + echo esc_url($editableLink); |
95 | 94 | ?>" id="vcv-editor-iframe"
|
96 | 95 | frameborder="0" scrolling="auto"></iframe>
|
97 | 96 | </div>
|
|
129 | 128 | $extraOutput = vcfilter('vcv:frontend:footer:extraOutput', [], ['sourceId' => $sourceId]);
|
130 | 129 | if (is_array($extraOutput)) {
|
131 | 130 | foreach ($extraOutput as $output) {
|
132 |
| - // @codingStandardsIgnoreLine |
133 |
| - echo $output; |
| 131 | + $outputHelper->printNotEscaped($output); |
134 | 132 | }
|
135 | 133 | unset($output);
|
136 | 134 | }
|
|
0 commit comments