| @@ -1,9 +1,13 @@ | ||
| 1 | +<?php | |
| 2 | +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. | |
| 3 | +defined('ABSPATH') || die('Restricted Access'); | |
| 4 | +?> | |
| 1 | 5 | <div id="acym__wysid__right__toolbar__design" class="cell grid-y acym__wysid__right__toolbar--menu"> |
| 2 | 6 | <p class="cell acym__wysid__right__toolbar__p__open acym__wysid__right__toolbar__p acym__title"> |
| 3 | - <?php echo acym_translation('ACYM_ZONES'); ?> | |
| 7 | + <?php echo esc_html(acym_translation('ACYM_ZONES')); ?> | |
| 4 | 8 | <i class="acymicon-keyboard-arrow-up"></i> |
| 5 | - <?php echo acym_info('ACYM_INTRO_DRAG_ZONE'); ?> | |
| 9 | + <?php acym_info(['textShownInTooltip' => 'ACYM_INTRO_DRAG_ZONE']); ?> | |
| 6 | 10 | </p> |
| 7 | 11 | <div class="acym__wysid__context__modal__container grid-x grid-margin-x grid-margin-y cell xxlarge-up-3 large-up-2 medium-up-1 small-up-1 acym__wysid__right__toolbar__design--show acym__wysid__right__toolbar__zones"> |
| 8 | 12 | <div class="cell acym__wysid__zone__element--new acym__wysid__zone__element--new--1 ui-draggable ui-draggable-handle"> |
| 9 | 13 | <svg version="1.1" x="0px" y="0px" viewBox="0 0 80.8 81" style="enable-background:new 0 0 80.8 81;" xml:space="preserve"> |
| @@ -45,36 +49,36 @@ | ||
| 45 | 49 | </div> |
| 46 | 50 | </div> |
| 47 | 51 | |
| 48 | 52 | <p class="cell acym__wysid__right__toolbar__p__open acym__wysid__right__toolbar__p acym__title"> |
| 49 | - <?php echo acym_translation('ACYM_BLOCKS'); ?> | |
| 53 | + <?php echo esc_html(acym_translation('ACYM_BLOCKS')); ?> | |
| 50 | 54 | <i class="acymicon-keyboard-arrow-up"></i> |
| 51 | - <?php echo acym_info('ACYM_INTRO_DRAG_BLOCK'); ?> | |
| 55 | + <?php acym_info(['textShownInTooltip' => 'ACYM_INTRO_DRAG_BLOCK']); ?> | |
| 52 | 56 | </p> |
| 53 | 57 | <div class="acym__wysid__context__modal__container grid-x grid-margin-x grid-margin-y cell xxlarge-up-3 large-up-2 medium-up-1 small-up-1 acym__wysid__right__toolbar__design--show acym__wysid__right__toolbar__blocks"> |
| 54 | 58 | <div class="grid-x cell acym__wysid__block__element--new acym__wysid__block__element--new--title ui-draggable ui-draggable-handle"> |
| 55 | 59 | <i class="cell acymicon-title"></i> |
| 56 | - <div class="cell"><?php echo acym_translation('ACYM_TITLE'); ?></div> | |
| 60 | + <div class="cell"><?php echo esc_html(acym_translation('ACYM_TITLE')); ?></div> | |
| 57 | 61 | </div> |
| 58 | 62 | <div class="grid-x cell acym__wysid__block__element--new acym__wysid__block__element--new--text ui-draggable ui-draggable-handle"> |
| 59 | 63 | <i class="cell acymicon-format-align-justify"></i> |
| 60 | - <div class="cell"><?php echo acym_translation('ACYM_TEXT'); ?></div> | |
| 64 | + <div class="cell"><?php echo esc_html(acym_translation('ACYM_TEXT')); ?></div> | |
| 61 | 65 | </div> |
| 62 | 66 | <div class="grid-x cell acym__wysid__block__element--new acym__wysid__block__element--new--button ui-draggable ui-draggable-handle"> |
| 63 | 67 | <i class="cell acymicon-crop-16-9"></i> |
| 64 | - <div class="cell"><?php echo acym_translation('ACYM_BUTTON'); ?></div> | |
| 68 | + <div class="cell"><?php echo esc_html(acym_translation('ACYM_BUTTON')); ?></div> | |
| 65 | 69 | </div> |
| 66 | 70 | <div class="grid-x cell acym__wysid__block__element--new acym__wysid__block__element--new--space ui-draggable ui-draggable-handle"> |
| 67 | 71 | <i class="cell acymicon-unfold-more"></i> |
| 68 | - <div class="cell"><?php echo acym_translation('ACYM_SPACE'); ?></div> | |
| 72 | + <div class="cell"><?php echo esc_html(acym_translation('ACYM_SPACE')); ?></div> | |
| 69 | 73 | </div> |
| 70 | 74 | <div class="grid-x cell acym__wysid__block__element--new acym__wysid__block__element--new--picture ui-draggable ui-draggable-handle"> |
| 71 | 75 | <i class="cell acymicon-insert-photo"></i> |
| 72 | - <div class="cell"><?php echo acym_translation('ACYM_IMAGE'); ?></div> | |
| 76 | + <div class="cell"><?php echo esc_html(acym_translation('ACYM_IMAGE')); ?></div> | |
| 73 | 77 | </div> |
| 74 | 78 | <div class="grid-x cell acym__wysid__block__element--new acym__wysid__block__element--new--video ui-draggable ui-draggable-handle"> |
| 75 | 79 | <i class="cell acymicon-play-circle-filled"></i> |
| 76 | - <div class="cell"><?php echo acym_translation('ACYM_VIDEO'); ?></div> | |
| 80 | + <div class="cell"><?php echo esc_html(acym_translation('ACYM_VIDEO')); ?></div> | |
| 77 | 81 | </div> |
| 78 | 82 | <div class="grid-x cell acym__wysid__block__element--new acym__wysid__block__element--new--gif ui-draggable ui-draggable-handle"> |
| 79 | 83 | <i class="cell acymicon-gif"></i> |
| 80 | 84 | <div class="cell">Gif</div> |
| @@ -83,47 +87,61 @@ | ||
| 83 | 87 | <i class="cell acymicon-unsplash"></i> |
| 84 | 88 | <div class="cell">Unsplash</div> |
| 85 | 89 | </div> |
| 86 | 90 | <?php |
| 91 | + // Display content plugins | |
| 87 | 92 | $plugins = acym_trigger('getPossibleIntegrations'); |
| 88 | 93 | |
| 89 | 94 | foreach ($plugins as $onePlugin) { |
| 90 | - $title = empty($onePlugin->title) ? '' : 'title="'.acym_escape($onePlugin->title).'"'; | |
| 95 | + echo '<div data-plugin="'.esc_attr($onePlugin->plugin).'" | |
| 96 | + class="grid-x cell acym__wysid__block__element--new ui-draggable ui-draggable-handle"'; | |
| 97 | + if (!empty($onePlugin->title)) { | |
| 98 | + echo ' title="'.esc_attr($onePlugin->title).'"'; | |
| 99 | + } | |
| 100 | + echo '>'; | |
| 91 | 101 | |
| 92 | - echo '<div '.$title.' data-plugin="'.acym_escape($onePlugin->plugin).'" class="grid-x cell acym__wysid__block__element--new ui-draggable ui-draggable-handle">'; | |
| 93 | - | |
| 94 | 102 | if (empty($onePlugin->icontype) || $onePlugin->icontype === 'img') { |
| 95 | - echo '<img class="cell acym-plugin-icon" src="'.$onePlugin->icon.'" alt="icon"/>'; | |
| 103 | + echo '<img class="cell acym-plugin-icon" src="'.esc_url($onePlugin->icon).'" alt="icon"/>'; | |
| 96 | 104 | } elseif ($onePlugin->icontype === 'raw') { |
| 97 | - echo $onePlugin->icon; | |
| 105 | + echo wp_kses( | |
| 106 | + $onePlugin->icon, | |
| 107 | + [ | |
| 108 | + 'div' => [ | |
| 109 | + 'class' => true, | |
| 110 | + ], | |
| 111 | + 'i' => [ | |
| 112 | + 'class' => true, | |
| 113 | + ], | |
| 114 | + ] | |
| 115 | + ); | |
| 98 | 116 | } |
| 99 | 117 | |
| 100 | - echo '<div class="cell">'.$onePlugin->name.'</div>'; | |
| 118 | + echo '<div class="cell">'.esc_html($onePlugin->name).'</div>'; | |
| 101 | 119 | echo '</div>'; |
| 102 | 120 | } |
| 103 | 121 | ?> |
| 104 | 122 | <div class="grid-x cell acym__wysid__block__element--new acym__wysid__block__element--new--follow ui-draggable ui-draggable-handle"> |
| 105 | 123 | <i class="cell acymicon-facebook"></i> |
| 106 | - <div class="cell"><?php echo acym_translation('ACYM_FOLLOW'); ?></div> | |
| 124 | + <div class="cell"><?php echo esc_html(acym_translation('ACYM_FOLLOW')); ?></div> | |
| 107 | 125 | </div> |
| 108 | 126 | <div class="grid-x cell acym__wysid__block__element--new acym__wysid__block__element--new--separator ui-draggable ui-draggable-handle"> |
| 109 | 127 | <i class="cell acymicon-more-horizontal"></i> |
| 110 | - <div class="cell"><?php echo acym_translation('ACYM_SEPARATOR'); ?></div> | |
| 128 | + <div class="cell"><?php echo esc_html(acym_translation('ACYM_SEPARATOR')); ?></div> | |
| 111 | 129 | </div> |
| 112 | 130 | </div> |
| 113 | 131 | |
| 114 | 132 | <p class="cell acym__wysid__right__toolbar__p__open acym__wysid__right__toolbar__p acym__title"> |
| 115 | - <?php echo acym_translation('ACYM_SAVED_ZONES'); ?> | |
| 133 | + <?php echo esc_html(acym_translation('ACYM_SAVED_ZONES')); ?> | |
| 116 | 134 | <i class="acymicon-keyboard-arrow-up"></i> |
| 117 | - <?php echo acym_info('ACYM_SAVED_ZONES_DESC'); ?> | |
| 135 | + <?php acym_info(['textShownInTooltip' => 'ACYM_SAVED_ZONES_DESC']); ?> | |
| 118 | 136 | </p> |
| 119 | 137 | <div class="acym__wysid__context__modal__container grid-x grid-margin-x grid-margin-y cell xxlarge-up-3 large-up-2 medium-up-1 small-up-1 acym__wysid__right__toolbar__design--show acym__wysid__right__toolbar__saved_zones margin-bottom-2"> |
| 120 | 138 | <?php |
| 121 | 139 | if (empty($data['custom_zones'])) { |
| 122 | - echo '<div id="custom_zones_none_message" class="margin-horizontal-1 margin-bottom-1">'.acym_translation('ACYM_NO_CUSTOM_ZONE').'</div>'; | |
| 140 | + echo '<div id="custom_zones_none_message" class="margin-horizontal-1 margin-bottom-1">'.esc_html(acym_translation('ACYM_NO_CUSTOM_ZONE')).'</div>'; | |
| 123 | 141 | } else { |
| 124 | 142 | foreach ($data['custom_zones'] as $oneZone) { |
| 125 | - echo '<div class="grid-x cell acym__wysid__zone__element--new ui-draggable ui-draggable-handle" data-acym-zone-id="'.$oneZone->id.'">'; | |
| 143 | + echo '<div class="grid-x cell acym__wysid__zone__element--new ui-draggable ui-draggable-handle" data-acym-zone-id="'.esc_attr($oneZone->id).'">'; | |
| 126 | 144 | if (acym_isAdmin()) { |
| 127 | 145 | echo '<i class="acymicon-delete"></i>'; |
| 128 | 146 | } |
| 129 | 147 | if (empty($oneZone->image)) { |
| @@ -128,11 +146,11 @@ | ||
| 128 | 146 | } |
| 129 | 147 | if (empty($oneZone->image)) { |
| 130 | 148 | echo '<i class="cell acymicon-dashboard"></i>'; |
| 131 | 149 | } else { |
| 132 | - echo '<img class="cell saved_zone_image" alt="Logo custom zone" src="'.acym_rootURI().$oneZone->image.'" />'; | |
| 150 | + echo '<img class="cell saved_zone_image" alt="Logo custom zone" src="'.esc_url(acym_rootURI().$oneZone->image).'" />'; | |
| 133 | 151 | } |
| 134 | - echo '<div class="cell">'.$oneZone->name.'</div>'; | |
| 152 | + echo '<div class="cell">'.esc_html($oneZone->name).'</div>'; | |
| 135 | 153 | echo '</div>'; |
| 136 | 154 | } |
| 137 | 155 | } |
| 138 | 156 | ?> |