Version Description
- 17/01/2022 =
- Fixed: Security fixes regarding sanitization and escaping
Download this release
Release Info
Developer | raldea89 |
Plugin | Image Photo Gallery Final Tiles Grid |
Version | 3.5.3 |
Comparing to | |
See all releases |
Code changes from version 3.5.2 to 3.5.3
- FinalTilesGalleryLite.php +206 -174
- admin/add-gallery.php +153 -152
- admin/edit-gallery.php +73 -72
- admin/include/edit-gallery.php +65 -65
- admin/include/fields.php +2 -2
- admin/include/image-list.php +2 -2
- admin/include/tinymce-galleries.php +7 -7
- admin/overview.php +10 -10
- lib/gallery-class.php +3 -3
- readme.txt +5 -1
FinalTilesGalleryLite.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Plugin Name: Final Tiles Grid Gallery - Image Gallery
|
5 |
* Description: Wordpress Plugin for creating responsive image galleries.
|
6 |
-
* Version: 3.5.
|
7 |
* Author: WPChill
|
8 |
* Author URI: https://wpchill.com
|
9 |
* Tested up to: 5.8
|
@@ -25,7 +25,7 @@
|
|
25 |
* Original Author: https://profiles.wordpress.org/greentreealbs/
|
26 |
*
|
27 |
*/
|
28 |
-
define( "FTGVERSION", "3.5.
|
29 |
// Create a helper function for easy SDK access.
|
30 |
|
31 |
if ( !function_exists( 'ftg_fs' ) ) {
|
@@ -567,7 +567,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
567 |
//Delete gallery
|
568 |
public function delete_gallery()
|
569 |
{
|
570 |
-
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
571 |
$this->FinalTilesdb->deleteGallery( intval( $_POST['id'] ) );
|
572 |
}
|
573 |
return array();
|
@@ -577,8 +577,9 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
577 |
{
|
578 |
|
579 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
580 |
-
$id = $_POST['galleryId'];
|
581 |
-
$config =
|
|
|
582 |
$this->FinalTilesdb->update_config( $id, $config );
|
583 |
}
|
584 |
|
@@ -589,9 +590,10 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
589 |
{
|
590 |
|
591 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
592 |
-
$id = $_POST['galleryId'];
|
593 |
$gallery = $this->FinalTilesdb->getGalleryConfig( $id );
|
594 |
-
echo $gallery ;
|
|
|
595 |
}
|
596 |
|
597 |
exit;
|
@@ -599,9 +601,13 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
599 |
|
600 |
public function get_image_size_url()
|
601 |
{
|
|
|
602 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
603 |
-
|
|
|
|
|
604 |
}
|
|
|
605 |
exit;
|
606 |
}
|
607 |
|
@@ -610,7 +616,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
610 |
{
|
611 |
|
612 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
613 |
-
$sourceId = intval( $_POST['id'] );
|
614 |
$g = $this->FinalTilesdb->getGalleryById( $sourceId, true );
|
615 |
$g['name'] .= " (copy)";
|
616 |
$this->FinalTilesdb->addGallery( $g );
|
@@ -858,64 +864,78 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
858 |
|
859 |
public function delete_image()
|
860 |
{
|
|
|
861 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
862 |
-
|
863 |
-
|
|
|
864 |
}
|
865 |
}
|
|
|
866 |
wp_die();
|
867 |
}
|
868 |
|
869 |
public function assign_filters()
|
870 |
{
|
|
|
871 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
|
|
|
|
872 |
|
873 |
-
if ( $_POST['source'] == 'posts' ) {
|
874 |
-
foreach ( explode( ",", $
|
875 |
-
update_post_meta(
|
876 |
}
|
877 |
} else {
|
878 |
-
foreach ( explode( ",", $
|
879 |
-
$result = $this->FinalTilesdb->editImage( $id, array(
|
880 |
-
"filters" => sanitize_text_field( $
|
881 |
) );
|
882 |
}
|
883 |
}
|
884 |
|
885 |
}
|
|
|
886 |
wp_die();
|
887 |
}
|
888 |
|
889 |
public function toggle_visibility()
|
890 |
{
|
|
|
891 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
892 |
-
|
|
|
893 |
$image = $this->FinalTilesdb->getImage( $id );
|
894 |
-
$this->FinalTilesdb->editImage( $id, array(
|
895 |
"hidden" => ( $image->hidden == 'T' ? 'F' : 'T' ),
|
896 |
) );
|
897 |
}
|
898 |
}
|
|
|
899 |
wp_die();
|
900 |
}
|
901 |
|
902 |
public function assign_group()
|
903 |
{
|
|
|
904 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
|
|
|
|
905 |
|
906 |
-
if ( $_POST['source'] == 'posts' ) {
|
907 |
-
foreach ( explode( ",", $
|
908 |
-
update_post_meta( intval( $id ), 'ftg_group', sanitize_text_field( $
|
909 |
}
|
910 |
} else {
|
911 |
-
foreach ( explode( ",", $
|
912 |
$result = $this->FinalTilesdb->editImage( $id, array(
|
913 |
-
"group" => sanitize_text_field( $
|
914 |
) );
|
915 |
}
|
916 |
}
|
917 |
|
918 |
}
|
|
|
919 |
wp_die();
|
920 |
}
|
921 |
|
@@ -923,8 +943,9 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
923 |
{
|
924 |
|
925 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
926 |
-
$gid = intval( $_POST['galleryId'] );
|
927 |
-
$enc_images =
|
|
|
928 |
$images = json_decode( $enc_images );
|
929 |
$result = $this->FinalTilesdb->addImages( $gid, $images );
|
930 |
header( "Content-type: application/json" );
|
@@ -963,7 +984,8 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
963 |
{
|
964 |
|
965 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
966 |
-
$
|
|
|
967 |
header( "Content-type: application/json" );
|
968 |
|
969 |
if ( $result === false ) {
|
@@ -982,10 +1004,11 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
982 |
require_once 'lib/gallery-class.php';
|
983 |
|
984 |
if ( check_admin_referer( 'finaltilesgallery', 'finaltilesgallery' ) ) {
|
985 |
-
$gid = intval( $_POST[
|
986 |
$images = $this->FinalTilesdb->getImagesByGalleryId( $gid, 0, 0 );
|
987 |
$FinalTilesGallery = new FinalTilesGallery( $gid, $this->FinalTilesdb, $this->defaultValues );
|
988 |
echo $FinalTilesGallery->images_markup() ;
|
|
|
989 |
}
|
990 |
|
991 |
wp_die();
|
@@ -993,8 +1016,10 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
993 |
|
994 |
public function refresh_gallery()
|
995 |
{
|
996 |
-
if (
|
997 |
-
$
|
|
|
|
|
998 |
}
|
999 |
}
|
1000 |
|
@@ -1004,27 +1029,27 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1004 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1005 |
$result = false;
|
1006 |
|
1007 |
-
if ( $_POST['source'] == 'posts' ) {
|
1008 |
$result = true;
|
1009 |
-
$postId = intval( $_POST['post_id'] );
|
1010 |
-
$img_url =
|
1011 |
update_post_meta( $postId, 'ftg_image_url', esc_url_raw( $img_url ) );
|
1012 |
-
if ( array_key_exists( "filters", $_POST ) && strlen( $_POST['filters'] ) ) {
|
1013 |
-
update_post_meta( $postId, 'ftg_filters', sanitize_text_field( $_POST['filters'] ) );
|
1014 |
}
|
1015 |
} else {
|
1016 |
-
$type = sanitize_text_field( $_POST['type'] );
|
1017 |
-
$imageUrl =
|
1018 |
-
$imageCaption = wp_kses_post( $_POST['description'] );
|
1019 |
-
$filters =
|
1020 |
-
$title = wp_kses_post( $_POST['imageTitle'] );
|
1021 |
-
$target = sanitize_text_field( $_POST['target'] );
|
1022 |
-
$group = sanitize_text_field( $_POST['group'] );
|
1023 |
-
$alt = sanitize_text_field( $_POST['alt'] );
|
1024 |
$hidden = $this->checkboxVal( 'hidden' );
|
1025 |
-
$link = ( isset( $_POST['link'] ) ?
|
1026 |
-
$imageId = intval( $_POST['img_id'] );
|
1027 |
-
$sortOrder = intval( $_POST['sortOrder'] );
|
1028 |
$data = array(
|
1029 |
"imagePath" => $imageUrl,
|
1030 |
"target" => $target,
|
@@ -1043,7 +1068,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1043 |
$imageId = intval( $_POST['id'] );
|
1044 |
$result = $this->FinalTilesdb->editImage( $imageId, $data );
|
1045 |
} else {
|
1046 |
-
$data["gid"] =
|
1047 |
$result = $this->FinalTilesdb->addFullImage( $data );
|
1048 |
}
|
1049 |
|
@@ -1067,14 +1092,14 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1067 |
|
1068 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1069 |
$result = false;
|
1070 |
-
$type = ( isset( $_POST['type'] ) ? $_POST['type'] : "" );
|
1071 |
$data = array(
|
1072 |
-
"imagePath" =>
|
1073 |
-
"filters" => sanitize_text_field( $_POST['filters'] ),
|
1074 |
-
"gid" =>
|
1075 |
);
|
1076 |
-
$id = ( isset( $_POST['id'] ) ?
|
1077 |
-
$step = ( isset( $_POST['step'] ) ? $_POST['step'] : "" );
|
1078 |
if ( !empty($step) ) {
|
1079 |
|
1080 |
if ( $step == "add" ) {
|
@@ -1103,13 +1128,13 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1103 |
{
|
1104 |
|
1105 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1106 |
-
$gid =
|
1107 |
$imageResults = $this->FinalTilesdb->getImagesByGalleryId( $gid, 0, 0 );
|
1108 |
$gallery = $this->FinalTilesdb->getGalleryById( $gid );
|
1109 |
$list_size = "medium";
|
1110 |
$column_size = "s6 m3 l3";
|
1111 |
if ( isset( $_POST['list_size'] ) && !empty($_POST['list_size']) ) {
|
1112 |
-
$list_size = $_POST['list_size'];
|
1113 |
}
|
1114 |
setcookie( 'ftg_imglist_size', $list_size );
|
1115 |
$_COOKIE['ftg_imglist_size'] = $list_size;
|
@@ -1133,27 +1158,29 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1133 |
|
1134 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1135 |
$data = $this->defaultValues;
|
1136 |
-
|
1137 |
-
$data["
|
1138 |
-
|
1139 |
-
$data["
|
1140 |
-
$data["
|
1141 |
-
$data["
|
1142 |
-
$data["
|
1143 |
-
$data["
|
1144 |
-
$data["
|
1145 |
-
$data["
|
1146 |
-
$data["
|
|
|
|
|
1147 |
$result = $this->FinalTilesdb->addGallery( $data );
|
1148 |
$id = $this->FinalTilesdb->getNewGalleryId();
|
|
|
1149 |
|
1150 |
-
if ( $id > 0 && array_key_exists( 'enc_images', $_POST ) && strlen( $_POST['enc_images'] ) ) {
|
1151 |
-
$
|
1152 |
-
$images = json_decode( $enc_images );
|
1153 |
$result = $this->FinalTilesdb->addImages( $id, $images );
|
1154 |
}
|
1155 |
|
1156 |
-
echo $id ;
|
1157 |
} else {
|
1158 |
echo -1 ;
|
1159 |
}
|
@@ -1163,117 +1190,122 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1163 |
|
1164 |
private function checkboxVal( $field )
|
1165 |
{
|
1166 |
-
|
1167 |
-
|
|
|
|
|
|
|
|
|
1168 |
}
|
1169 |
-
|
|
|
1170 |
}
|
1171 |
|
1172 |
public function save_gallery()
|
1173 |
{
|
1174 |
|
1175 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1176 |
-
$galleryName =
|
1177 |
-
$galleryDescription =
|
1178 |
$slug = strtolower( str_replace( " ", "", $galleryName ) );
|
1179 |
-
$margin =
|
1180 |
-
$minTileWidth =
|
1181 |
-
$gridCellSize =
|
1182 |
-
$imagesOrder = sanitize_text_field( $_POST['ftg_imagesOrder'] );
|
1183 |
-
$width = sanitize_text_field( $_POST['ftg_width'] );
|
1184 |
$enableTwitter = $this->checkboxVal( 'ftg_enableTwitter' );
|
1185 |
$filterClick = $this->checkboxVal( 'ftg_filterClick' );
|
1186 |
$enableFacebook = $this->checkboxVal( 'ftg_enableFacebook' );
|
1187 |
$enablePinterest = $this->checkboxVal( 'ftg_enablePinterest' );
|
1188 |
-
$lightbox = sanitize_text_field( $_POST['ftg_lightbox'] );
|
1189 |
-
$mobileLightbox = sanitize_text_field( $_POST['ftg_mobileLightbox'] );
|
1190 |
$blank = $this->checkboxVal( 'ftg_blank' );
|
1191 |
-
$filters = sanitize_text_field( $_POST['ftg_filters'] );
|
1192 |
-
$scrollEffect = $_POST['ftg_scrollEffect'];
|
1193 |
-
$captionBehavior = sanitize_text_field( $_POST['ftg_captionBehavior'] );
|
1194 |
-
$captionMobileBehavior = sanitize_text_field( $_POST['ftg_captionMobileBehavior'] );
|
1195 |
-
$captionEffect = sanitize_text_field( $_POST['ftg_captionEffect'] );
|
1196 |
-
$captionColor = sanitize_hex_color( $_POST['ftg_captionColor'] );
|
1197 |
-
$captionBackgroundColor = sanitize_hex_color( $_POST['ftg_captionBackgroundColor'] );
|
1198 |
-
$captionEasing = sanitize_text_field( $_POST['ftg_captionEasing'] );
|
1199 |
-
$captionHorizontalAlignment = sanitize_text_field( $_POST['ftg_captionHorizontalAlignment'] );
|
1200 |
-
$captionVerticalAlignment = sanitize_text_field( $_POST['ftg_captionVerticalAlignment'] );
|
1201 |
-
$captionEmpty = sanitize_text_field( $_POST['ftg_captionEmpty'] );
|
1202 |
-
$captionOpacity =
|
1203 |
-
$borderSize =
|
1204 |
-
$borderColor = sanitize_hex_color( $_POST['ftg_borderColor'] );
|
1205 |
-
$titleFontSize =
|
1206 |
-
$loadingBarColor = sanitize_hex_color( $_POST['ftg_loadingBarColor'] );
|
1207 |
-
$loadingBarBackgroundColor = sanitize_hex_color( $_POST['ftg_loadingBarBackgroundColor'] );
|
1208 |
-
$borderRadius =
|
1209 |
-
$allFilterLabel = sanitize_text_field( $_POST['ftg_allFilterLabel'] );
|
1210 |
-
$shadowColor = sanitize_hex_color( $_POST['ftg_shadowColor'] );
|
1211 |
-
$shadowSize =
|
1212 |
$enlargeImages = $this->checkboxVal( 'ftg_enlargeImages' );
|
1213 |
-
$wp_field_caption = sanitize_text_field( $_POST['ftg_wp_field_caption'] );
|
1214 |
-
$wp_field_title = sanitize_text_field( $_POST['ftg_wp_field_title'] );
|
1215 |
-
$style = $_POST['ftg_style'];
|
1216 |
-
$script = $_POST['ftg_script'];
|
1217 |
-
$loadedHSlide = intval( $_POST['ftg_loadedHSlide'] );
|
1218 |
-
$loadedVSlide = intval( $_POST['ftg_loadedVSlide'] );
|
1219 |
-
$captionEffectDuration =
|
1220 |
-
$id = ( isset( $_POST['ftg_gallery_edit'] ) ?
|
1221 |
$data = array(
|
1222 |
-
'ajaxLoading' => sanitize_text_field( $_POST['ftg_ajaxLoading'] ),
|
1223 |
-
'layout' => sanitize_text_field( $_POST['ftg_layout'] ),
|
1224 |
'name' => $galleryName,
|
1225 |
'slug' => $slug,
|
1226 |
'description' => $galleryDescription,
|
1227 |
'lightbox' => $lightbox,
|
1228 |
-
'lightboxOptions' => sanitize_text_field( $_POST['ftg_lightboxOptions'] ),
|
1229 |
-
'lightboxOptionsMobile' => sanitize_text_field( $_POST['lightboxOptionsMobile'] ),
|
1230 |
'mobileLightbox' => $mobileLightbox,
|
1231 |
-
'lightboxImageSize' => sanitize_text_field( $_POST['ftg_lightboxImageSize'] ),
|
1232 |
'blank' => $blank,
|
1233 |
'margin' => $margin,
|
1234 |
'allFilterLabel' => $allFilterLabel,
|
1235 |
'minTileWidth' => $minTileWidth,
|
1236 |
'gridCellSize' => $gridCellSize,
|
1237 |
-
'gridCellSizeDisabledBelow' =>
|
1238 |
'enableTwitter' => $enableTwitter,
|
1239 |
-
'backgroundColor' => sanitize_hex_color( $_POST['ftg_backgroundColor'] ),
|
1240 |
'filterClick' => $filterClick,
|
1241 |
'disableLightboxGroups' => $this->checkboxVal( 'ftg_disableLightboxGroups' ),
|
1242 |
-
'defaultFilter' => sanitize_text_field( $_POST['ftg_filterDef'] ),
|
1243 |
'enableFacebook' => $enableFacebook,
|
1244 |
'enablePinterest' => $enablePinterest,
|
1245 |
'imagesOrder' => $imagesOrder,
|
1246 |
'compressHTML' => $this->checkboxVal( 'ftg_compressHTML' ),
|
1247 |
-
'loadMethod' => sanitize_text_field( $_POST['ftg_loadMethod'] ),
|
1248 |
-
'socialIconColor' => sanitize_hex_color( $_POST['ftg_socialIconColor'] ),
|
1249 |
-
'socialIconPosition' => sanitize_text_field( $_POST['ftg_socialIconPosition'] ),
|
1250 |
-
'socialIconStyle' => sanitize_text_field( $_POST['ftg_socialIconStyle'] ),
|
1251 |
-
'recentPostsCaption' => sanitize_text_field( $_POST['ftg_recentPostsCaption'] ),
|
1252 |
-
'recentPostsCaptionAutoExcerptLength' => intval( $_POST['ftg_recentPostsCaptionAutoExcerptLength'] ),
|
1253 |
'captionBehavior' => $captionBehavior,
|
1254 |
'captionEffect' => $captionEffect,
|
1255 |
'captionEmpty' => $captionEmpty,
|
1256 |
'captionBackgroundColor' => $captionBackgroundColor,
|
1257 |
'captionColor' => $captionColor,
|
1258 |
-
'captionCustomFields' => wp_kses_post( $_POST['ftg_captionCustomFields'] ),
|
1259 |
-
'captionFrameColor' => sanitize_hex_color( $_POST['ftg_captionFrameColor'] ),
|
1260 |
'captionEffectDuration' => $captionEffectDuration,
|
1261 |
'captionEasing' => $captionEasing,
|
1262 |
'captionVerticalAlignment' => $captionVerticalAlignment,
|
1263 |
'captionHorizontalAlignment' => $captionHorizontalAlignment,
|
1264 |
'captionMobileBehavior' => $captionMobileBehavior,
|
1265 |
'captionOpacity' => $captionOpacity,
|
1266 |
-
'captionIcon' => sanitize_text_field( $_POST['ftg_captionIcon'] ),
|
1267 |
'captionFrame' => $this->checkboxVal( 'ftg_captionFrame' ),
|
1268 |
-
'customCaptionIcon' => sanitize_text_field( $_POST['ftg_customCaptionIcon'] ),
|
1269 |
-
'captionIconColor' => sanitize_hex_color( $_POST['ftg_captionIconColor'] ),
|
1270 |
-
'captionIconSize' =>
|
1271 |
-
'captionFontSize' =>
|
1272 |
-
'captionPosition' => sanitize_text_field( $_POST['ftg_captionPosition'] ),
|
1273 |
-
'titleFontSize' =>
|
1274 |
-
'hoverZoom' =>
|
1275 |
-
'hoverRotation' => intval( $_POST['ftg_hoverRotation'] ),
|
1276 |
-
'hoverDuration' => intval( $_POST['ftg_hoverDuration'] ),
|
1277 |
'hoverIconRotation' => $this->checkboxVal( 'ftg_hoverIconRotation' ),
|
1278 |
'filters' => $filters,
|
1279 |
'wp_field_caption' => $wp_field_caption,
|
@@ -1284,49 +1316,49 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1284 |
'loadingBarBackgroundColor' => $loadingBarBackgroundColor,
|
1285 |
'enlargeImages' => $enlargeImages,
|
1286 |
'borderRadius' => $borderRadius,
|
1287 |
-
'imageSizeFactor' =>
|
1288 |
-
'imageSizeFactorTabletLandscape' =>
|
1289 |
-
'imageSizeFactorTabletPortrait' =>
|
1290 |
-
'imageSizeFactorPhoneLandscape' =>
|
1291 |
-
'imageSizeFactorPhonePortrait' =>
|
1292 |
-
'imageSizeFactorCustom' => sanitize_text_field( $_POST['ftg_imageSizeFactorCustom'] ),
|
1293 |
-
'taxonomyAsFilter' => sanitize_text_field( $_POST['ftg_taxonomyAsFilter'] ),
|
1294 |
-
'columns' => intval( $_POST['ftg_columns'] ),
|
1295 |
-
'columnsTabletLandscape' =>
|
1296 |
-
'columnsTabletPortrait' =>
|
1297 |
-
'columnsPhoneLandscape' =>
|
1298 |
-
'columnsPhonePortrait' =>
|
1299 |
-
'max_posts' =>
|
1300 |
'shadowSize' => $shadowSize,
|
1301 |
'shadowColor' => $shadowColor,
|
1302 |
-
'source' => sanitize_text_field( $_POST['ftg_source'] ),
|
1303 |
-
'post_types' => sanitize_text_field( $_POST['ftg_post_types'] ),
|
1304 |
-
'post_taxonomies' => sanitize_text_field( $_POST['ftg_post_taxonomies'] ),
|
1305 |
-
'taxonomyOperator' => sanitize_text_field( $_POST['ftg_taxonomyOperator'] ),
|
1306 |
-
'post_tags' => sanitize_text_field( $_POST['ftg_post_tags'] ),
|
1307 |
-
'tilesPerPage' =>
|
1308 |
-
'woo_categories' => ( isset( $_POST['ftg_woo_categories'] ) ? $_POST['ftg_woo_categories'] : '' ),
|
1309 |
-
'defaultPostImageSize' => sanitize_text_field( $_POST['ftg_defaultPostImageSize'] ),
|
1310 |
-
'defaultWooImageSize' => ( isset( $_POST['ftg_defaultWooImageSize'] ) ? $_POST['ftg_defaultWooImageSize'] : '' ),
|
1311 |
'width' => $width,
|
1312 |
-
'beforeGalleryText' => wp_kses_post( $_POST['ftg_beforeGalleryText'] ),
|
1313 |
-
'afterGalleryText' => wp_kses_post( $_POST['ftg_afterGalleryText'] ),
|
1314 |
-
'aClass' => sanitize_text_field( $_POST['ftg_aClass'] ),
|
1315 |
-
'rel' => sanitize_text_field( $_POST['ftg_rel'] ),
|
1316 |
'style' => $style,
|
1317 |
-
'delay' =>
|
1318 |
-
'script' => $script,
|
1319 |
'support' => $this->checkboxVal( 'ftg_support' ),
|
1320 |
-
'supportText' => sanitize_text_field( $_POST['ftg_supportText'] ),
|
1321 |
'scrollEffect' => $scrollEffect,
|
1322 |
-
'loadedScaleY' =>
|
1323 |
-
'loadedScaleX' =>
|
1324 |
'loadedHSlide' => $loadedHSlide,
|
1325 |
'loadedVSlide' => $loadedVSlide,
|
1326 |
-
'loadedEasing' => sanitize_text_field( $_POST['ftg_loadedEasing'] ),
|
1327 |
-
'loadedDuration' => absint( $_POST['ftg_loadedDuration'] ),
|
1328 |
-
'loadedRotateY' => intval( $_POST['ftg_loadedRotateY'] ),
|
1329 |
-
'loadedRotateX' => intval( $_POST['ftg_loadedRotateX'] ),
|
1330 |
);
|
1331 |
header( "Content-type: application/json" );
|
1332 |
|
@@ -1339,7 +1371,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1339 |
|
1340 |
|
1341 |
if ( $result ) {
|
1342 |
-
echo "{\"success\":true,\"id\":" . $id . "}" ;
|
1343 |
} else {
|
1344 |
echo "{\"success\":false}" ;
|
1345 |
}
|
@@ -1451,7 +1483,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1451 |
|
1452 |
return $FinalTilesGallery->render();
|
1453 |
} else {
|
1454 |
-
return "Gallery not found.";
|
1455 |
}
|
1456 |
|
1457 |
}
|
3 |
/**
|
4 |
* Plugin Name: Final Tiles Grid Gallery - Image Gallery
|
5 |
* Description: Wordpress Plugin for creating responsive image galleries.
|
6 |
+
* Version: 3.5.3
|
7 |
* Author: WPChill
|
8 |
* Author URI: https://wpchill.com
|
9 |
* Tested up to: 5.8
|
25 |
* Original Author: https://profiles.wordpress.org/greentreealbs/
|
26 |
*
|
27 |
*/
|
28 |
+
define( "FTGVERSION", "3.5.3" );
|
29 |
// Create a helper function for easy SDK access.
|
30 |
|
31 |
if ( !function_exists( 'ftg_fs' ) ) {
|
567 |
//Delete gallery
|
568 |
public function delete_gallery()
|
569 |
{
|
570 |
+
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) && isset( $_POST['id'] ) ) {
|
571 |
$this->FinalTilesdb->deleteGallery( intval( $_POST['id'] ) );
|
572 |
}
|
573 |
return array();
|
577 |
{
|
578 |
|
579 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
580 |
+
$id = ( isset( $_POST['galleryId'] ) ? absint( $_POST['galleryId'] ) : 0 );
|
581 |
+
$config = ( isset( $_POST['config'] ) ? wp_unslash( $_POST['config'] ) : '' );
|
582 |
+
// phpcs:ignore
|
583 |
$this->FinalTilesdb->update_config( $id, $config );
|
584 |
}
|
585 |
|
590 |
{
|
591 |
|
592 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
593 |
+
$id = ( isset( $_POST['galleryId'] ) ? absint( $_POST['galleryId'] ) : 0 );
|
594 |
$gallery = $this->FinalTilesdb->getGalleryConfig( $id );
|
595 |
+
echo stripslashes( $gallery ) ;
|
596 |
+
// phpcs:ignore
|
597 |
}
|
598 |
|
599 |
exit;
|
601 |
|
602 |
public function get_image_size_url()
|
603 |
{
|
604 |
+
|
605 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
606 |
+
$id = ( isset( $_POST['id'] ) ? absint( $_POST['id'] ) : 0 );
|
607 |
+
$size = ( isset( $_POST['size'] ) ? sanitize_text_field( wp_unslash( $_POST['size'] ) ) : 'thumbnail' );
|
608 |
+
echo esc_url( wp_get_attachment_image_url( $id, $size, false ) ) ;
|
609 |
}
|
610 |
+
|
611 |
exit;
|
612 |
}
|
613 |
|
616 |
{
|
617 |
|
618 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
619 |
+
$sourceId = ( isset( $_POST['id'] ) ? intval( $_POST['id'] ) : 0 );
|
620 |
$g = $this->FinalTilesdb->getGalleryById( $sourceId, true );
|
621 |
$g['name'] .= " (copy)";
|
622 |
$this->FinalTilesdb->addGallery( $g );
|
864 |
|
865 |
public function delete_image()
|
866 |
{
|
867 |
+
|
868 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
869 |
+
$ids = ( isset( $_POST['id'] ) ? sanitize_text_field( wp_unslash( $_POST['id'] ) ) : 0 );
|
870 |
+
foreach ( explode( ",", $ids ) as $id ) {
|
871 |
+
$this->FinalTilesdb->deleteImage( absint( $id ) );
|
872 |
}
|
873 |
}
|
874 |
+
|
875 |
wp_die();
|
876 |
}
|
877 |
|
878 |
public function assign_filters()
|
879 |
{
|
880 |
+
|
881 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
882 |
+
$ids = ( isset( $_POST['id'] ) ? sanitize_text_field( wp_unslash( $_POST['id'] ) ) : 0 );
|
883 |
+
$filters = ( isset( $_POST['filters'] ) ? sanitize_text_field( wp_unslash( $_POST['filters'] ) ) : '' );
|
884 |
|
885 |
+
if ( isset( $_POST['source'] ) && $_POST['source'] == 'posts' ) {
|
886 |
+
foreach ( explode( ",", $ids ) as $id ) {
|
887 |
+
update_post_meta( absint( $id ), 'ftg_filters', sanitize_text_field( $filters ) );
|
888 |
}
|
889 |
} else {
|
890 |
+
foreach ( explode( ",", $ids ) as $id ) {
|
891 |
+
$result = $this->FinalTilesdb->editImage( absint( $id ), array(
|
892 |
+
"filters" => sanitize_text_field( $filters ),
|
893 |
) );
|
894 |
}
|
895 |
}
|
896 |
|
897 |
}
|
898 |
+
|
899 |
wp_die();
|
900 |
}
|
901 |
|
902 |
public function toggle_visibility()
|
903 |
{
|
904 |
+
|
905 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
906 |
+
$ids = ( isset( $_POST['id'] ) ? sanitize_text_field( wp_unslash( $_POST['id'] ) ) : 0 );
|
907 |
+
foreach ( explode( ",", $ids ) as $id ) {
|
908 |
$image = $this->FinalTilesdb->getImage( $id );
|
909 |
+
$this->FinalTilesdb->editImage( absint( $id ), array(
|
910 |
"hidden" => ( $image->hidden == 'T' ? 'F' : 'T' ),
|
911 |
) );
|
912 |
}
|
913 |
}
|
914 |
+
|
915 |
wp_die();
|
916 |
}
|
917 |
|
918 |
public function assign_group()
|
919 |
{
|
920 |
+
|
921 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
922 |
+
$ids = ( isset( $_POST['id'] ) ? sanitize_text_field( wp_unslash( $_POST['id'] ) ) : 0 );
|
923 |
+
$group = ( isset( $_POST['group'] ) ? sanitize_text_field( wp_unslash( $_POST['group'] ) ) : '' );
|
924 |
|
925 |
+
if ( isset( $_POST['source'] ) && $_POST['source'] == 'posts' ) {
|
926 |
+
foreach ( explode( ",", $ids ) as $id ) {
|
927 |
+
update_post_meta( intval( $id ), 'ftg_group', sanitize_text_field( $group ) );
|
928 |
}
|
929 |
} else {
|
930 |
+
foreach ( explode( ",", $ids ) as $id ) {
|
931 |
$result = $this->FinalTilesdb->editImage( $id, array(
|
932 |
+
"group" => sanitize_text_field( $group ),
|
933 |
) );
|
934 |
}
|
935 |
}
|
936 |
|
937 |
}
|
938 |
+
|
939 |
wp_die();
|
940 |
}
|
941 |
|
943 |
{
|
944 |
|
945 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
946 |
+
$gid = ( isset( $_POST['galleryId'] ) ? intval( $_POST['galleryId'] ) : 0 );
|
947 |
+
$enc_images = ( isset( $_POST['enc_images'] ) ? wp_unslash( $_POST['enc_images'] ) : '' );
|
948 |
+
// phpcs:ignore
|
949 |
$images = json_decode( $enc_images );
|
950 |
$result = $this->FinalTilesdb->addImages( $gid, $images );
|
951 |
header( "Content-type: application/json" );
|
984 |
{
|
985 |
|
986 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
987 |
+
$ids = ( isset( $_POST['ids'] ) ? sanitize_text_field( wp_unslash( $_POST['ids'] ) ) : 0 );
|
988 |
+
$result = $this->FinalTilesdb->sortImages( explode( ',', $ids ) );
|
989 |
header( "Content-type: application/json" );
|
990 |
|
991 |
if ( $result === false ) {
|
1004 |
require_once 'lib/gallery-class.php';
|
1005 |
|
1006 |
if ( check_admin_referer( 'finaltilesgallery', 'finaltilesgallery' ) ) {
|
1007 |
+
$gid = ( isset( $_POST['gallery'] ) ? intval( $_POST['gallery'] ) : 0 );
|
1008 |
$images = $this->FinalTilesdb->getImagesByGalleryId( $gid, 0, 0 );
|
1009 |
$FinalTilesGallery = new FinalTilesGallery( $gid, $this->FinalTilesdb, $this->defaultValues );
|
1010 |
echo $FinalTilesGallery->images_markup() ;
|
1011 |
+
// phpcs:ignore
|
1012 |
}
|
1013 |
|
1014 |
wp_die();
|
1016 |
|
1017 |
public function refresh_gallery()
|
1018 |
{
|
1019 |
+
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1020 |
+
if ( isset( $_POST['source'] ) && sanitize_text_field( wp_unslash( $_POST['source'] ) ) == 'images' ) {
|
1021 |
+
$this->list_images();
|
1022 |
+
}
|
1023 |
}
|
1024 |
}
|
1025 |
|
1029 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1030 |
$result = false;
|
1031 |
|
1032 |
+
if ( isset( $_POST['source'] ) && $_POST['source'] == 'posts' ) {
|
1033 |
$result = true;
|
1034 |
+
$postId = ( isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0 );
|
1035 |
+
$img_url = ( isset( $_POST['img_url'] ) ? esc_url_raw( $_POST['img_url'] ) : '' );
|
1036 |
update_post_meta( $postId, 'ftg_image_url', esc_url_raw( $img_url ) );
|
1037 |
+
if ( array_key_exists( "filters", $_POST ) && strlen( sanitize_text_field( wp_unslash( $_POST['filters'] ) ) ) ) {
|
1038 |
+
update_post_meta( $postId, 'ftg_filters', sanitize_text_field( wp_unslash( $_POST['filters'] ) ) );
|
1039 |
}
|
1040 |
} else {
|
1041 |
+
$type = ( isset( $_POST['type'] ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : '' );
|
1042 |
+
$imageUrl = ( isset( $_POST['img_url'] ) ? esc_url_raw( $_POST['img_url'] ) : '' );
|
1043 |
+
$imageCaption = ( isset( $_POST['description'] ) ? wp_kses_post( wp_unslash( $_POST['description'] ) ) : '' );
|
1044 |
+
$filters = ( isset( $_POST['filters'] ) ? sanitize_text_field( wp_unslash( $_POST['filters'] ) ) : '' );
|
1045 |
+
$title = ( isset( $_POST['imageTitle'] ) ? wp_kses_post( wp_unslash( $_POST['imageTitle'] ) ) : '' );
|
1046 |
+
$target = ( isset( $_POST['target'] ) ? sanitize_text_field( wp_unslash( $_POST['target'] ) ) : '' );
|
1047 |
+
$group = ( isset( $_POST['group'] ) ? sanitize_text_field( wp_unslash( $_POST['group'] ) ) : '' );
|
1048 |
+
$alt = ( isset( $_POST['alt'] ) ? sanitize_text_field( wp_unslash( $_POST['alt'] ) ) : '' );
|
1049 |
$hidden = $this->checkboxVal( 'hidden' );
|
1050 |
+
$link = ( isset( $_POST['link'] ) ? esc_url_raw( wp_unslash( $_POST['link'] ) ) : null );
|
1051 |
+
$imageId = ( isset( $_POST['img_id'] ) ? intval( wp_unslash( $_POST['img_id'] ) ) : 0 );
|
1052 |
+
$sortOrder = ( isset( $_POST['sortOrder'] ) ? intval( wp_unslash( $_POST['sortOrder'] ) ) : 0 );
|
1053 |
$data = array(
|
1054 |
"imagePath" => $imageUrl,
|
1055 |
"target" => $target,
|
1068 |
$imageId = intval( $_POST['id'] );
|
1069 |
$result = $this->FinalTilesdb->editImage( $imageId, $data );
|
1070 |
} else {
|
1071 |
+
$data["gid"] = ( isset( $_POST['galleryId'] ) ? absint( $_POST['galleryId'] ) : 0 );
|
1072 |
$result = $this->FinalTilesdb->addFullImage( $data );
|
1073 |
}
|
1074 |
|
1092 |
|
1093 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1094 |
$result = false;
|
1095 |
+
$type = ( isset( $_POST['type'] ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : "" );
|
1096 |
$data = array(
|
1097 |
+
"imagePath" => wp_unslash( $_POST["embed"] ),
|
1098 |
+
"filters" => ( isset( $_POST['filters'] ) ? sanitize_text_field( wp_unslash( $_POST['filters'] ) ) : '' ),
|
1099 |
+
"gid" => ( isset( $_POST['galleryId'] ) ? absint( $_POST['galleryId'] ) : 0 ),
|
1100 |
);
|
1101 |
+
$id = ( isset( $_POST['id'] ) ? absint( $_POST['id'] ) : "" );
|
1102 |
+
$step = ( isset( $_POST['step'] ) ? sanitize_text_field( wp_unslash( $_POST['step'] ) ) : "" );
|
1103 |
if ( !empty($step) ) {
|
1104 |
|
1105 |
if ( $step == "add" ) {
|
1128 |
{
|
1129 |
|
1130 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1131 |
+
$gid = ( isset( $_POST['gid'] ) ? absint( $_POST['gid'] ) : 0 );
|
1132 |
$imageResults = $this->FinalTilesdb->getImagesByGalleryId( $gid, 0, 0 );
|
1133 |
$gallery = $this->FinalTilesdb->getGalleryById( $gid );
|
1134 |
$list_size = "medium";
|
1135 |
$column_size = "s6 m3 l3";
|
1136 |
if ( isset( $_POST['list_size'] ) && !empty($_POST['list_size']) ) {
|
1137 |
+
$list_size = sanitize_text_field( wp_unslash( $_POST['list_size'] ) );
|
1138 |
}
|
1139 |
setcookie( 'ftg_imglist_size', $list_size );
|
1140 |
$_COOKIE['ftg_imglist_size'] = $list_size;
|
1158 |
|
1159 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1160 |
$data = $this->defaultValues;
|
1161 |
+
// phpcs:ignore
|
1162 |
+
$data["name"] = ( isset( $_POST['ftg_name'] ) ? wp_kses_post( wp_unslash( $_POST['ftg_name'] ) ) : '' );
|
1163 |
+
// phpcs:ignore
|
1164 |
+
$data["description"] = ( isset( $_POST['ftg_description'] ) ? wp_kses_post( wp_unslash( $_POST['ftg_description'] ) ) : '' );
|
1165 |
+
$data["source"] = ( isset( $_POST['ftg_source'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_source'] ) ) : '' );
|
1166 |
+
$data["wp_field_caption"] = ( isset( $_POST['ftg_wp_field_caption'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_wp_field_caption'] ) ) : '' );
|
1167 |
+
$data["wp_field_title"] = ( isset( $_POST['ftg_wp_field_title'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_wp_field_title'] ) ) : '' );
|
1168 |
+
$data["captionEffect"] = ( isset( $_POST['ftg_captionEffect'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionEffect'] ) ) : '' );
|
1169 |
+
$data["post_types"] = ( isset( $_POST['post_types'] ) ? sanitize_text_field( wp_unslash( $_POST["post_types"] ) ) : '' );
|
1170 |
+
$data["layout"] = ( isset( $_POST['layout'] ) ? sanitize_text_field( wp_unslash( $_POST["layout"] ) ) : '' );
|
1171 |
+
$data["defaultWooImageSize"] = ( isset( $_POST['def_imgsize'] ) ? sanitize_text_field( wp_unslash( $_POST['def_imgsize'] ) ) : '' );
|
1172 |
+
$data["defaultPostImageSize"] = ( isset( $_POST['def_imgsize'] ) ? sanitize_text_field( wp_unslash( $_POST['def_imgsize'] ) ) : '' );
|
1173 |
+
$data["woo_categories"] = ( isset( $_POST['woo_categories'] ) ? sanitize_text_field( wp_unslash( $_POST["woo_categories"] ) ) : '' );
|
1174 |
$result = $this->FinalTilesdb->addGallery( $data );
|
1175 |
$id = $this->FinalTilesdb->getNewGalleryId();
|
1176 |
+
// phpcs:ignore
|
1177 |
|
1178 |
+
if ( $id > 0 && array_key_exists( 'enc_images', $_POST ) && strlen( wp_unslash( $_POST['enc_images'] ) ) ) {
|
1179 |
+
$images = json_decode( wp_unslash( $_POST["enc_images"] ) );
|
|
|
1180 |
$result = $this->FinalTilesdb->addImages( $id, $images );
|
1181 |
}
|
1182 |
|
1183 |
+
echo absint( $id ) ;
|
1184 |
} else {
|
1185 |
echo -1 ;
|
1186 |
}
|
1190 |
|
1191 |
private function checkboxVal( $field )
|
1192 |
{
|
1193 |
+
|
1194 |
+
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1195 |
+
if ( isset( $_POST[$field] ) ) {
|
1196 |
+
return 'T';
|
1197 |
+
}
|
1198 |
+
return 'F';
|
1199 |
}
|
1200 |
+
|
1201 |
+
wp_die();
|
1202 |
}
|
1203 |
|
1204 |
public function save_gallery()
|
1205 |
{
|
1206 |
|
1207 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1208 |
+
$galleryName = ( isset( $_POST['ftg_name'] ) ? wp_kses_post( wp_unslash( $_POST['ftg_name'] ) ) : '' );
|
1209 |
+
$galleryDescription = ( isset( $_POST['ftg_description'] ) ? wp_kses_post( wp_unslash( $_POST['ftg_description'] ) ) : '' );
|
1210 |
$slug = strtolower( str_replace( " ", "", $galleryName ) );
|
1211 |
+
$margin = ( isset( $_POST['ftg_margin'] ) ? absint( $_POST['ftg_margin'] ) : '' );
|
1212 |
+
$minTileWidth = ( isset( $_POST['ftg_minTileWidth'] ) ? absint( $_POST['ftg_minTileWidth'] ) : '' );
|
1213 |
+
$gridCellSize = ( isset( $_POST['ftg_gridCellSize'] ) ? absint( $_POST['ftg_gridCellSize'] ) : '' );
|
1214 |
+
$imagesOrder = ( isset( $_POST['ftg_imagesOrder'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_imagesOrder'] ) ) : '' );
|
1215 |
+
$width = ( isset( $_POST['ftg_width'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_width'] ) ) : '' );
|
1216 |
$enableTwitter = $this->checkboxVal( 'ftg_enableTwitter' );
|
1217 |
$filterClick = $this->checkboxVal( 'ftg_filterClick' );
|
1218 |
$enableFacebook = $this->checkboxVal( 'ftg_enableFacebook' );
|
1219 |
$enablePinterest = $this->checkboxVal( 'ftg_enablePinterest' );
|
1220 |
+
$lightbox = ( isset( $_POST['ftg_lightbox'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_lightbox'] ) ) : '' );
|
1221 |
+
$mobileLightbox = ( isset( $_POST['ftg_mobileLightbox'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_mobileLightbox'] ) ) : '' );
|
1222 |
$blank = $this->checkboxVal( 'ftg_blank' );
|
1223 |
+
$filters = ( isset( $_POST['ftg_filters'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_filters'] ) ) : '' );
|
1224 |
+
$scrollEffect = ( isset( $_POST['ftg_scrollEffect'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_scrollEffect'] ) ) : '' );
|
1225 |
+
$captionBehavior = ( isset( $_POST['ftg_captionBehavior'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionBehavior'] ) ) : '' );
|
1226 |
+
$captionMobileBehavior = ( isset( $_POST['ftg_captionMobileBehavior'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionMobileBehavior'] ) ) : '' );
|
1227 |
+
$captionEffect = ( isset( $_POST['ftg_captionEffect'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionEffect'] ) ) : '' );
|
1228 |
+
$captionColor = ( isset( $_POST['ftg_captionColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_captionColor'] ) ) : '' );
|
1229 |
+
$captionBackgroundColor = ( isset( $_POST['ftg_captionBackgroundColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_captionBackgroundColor'] ) ) : '' );
|
1230 |
+
$captionEasing = ( isset( $_POST['ftg_captionEasing'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionEasing'] ) ) : '' );
|
1231 |
+
$captionHorizontalAlignment = ( isset( $_POST['ftg_captionHorizontalAlignment'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionHorizontalAlignment'] ) ) : '' );
|
1232 |
+
$captionVerticalAlignment = ( isset( $_POST['ftg_captionVerticalAlignment'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionVerticalAlignment'] ) ) : '' );
|
1233 |
+
$captionEmpty = ( isset( $_POST['ftg_captionEmpty'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionEmpty'] ) ) : '' );
|
1234 |
+
$captionOpacity = ( isset( $_POST['ftg_captionOpacity'] ) ? absint( $_POST['ftg_captionOpacity'] ) : '' );
|
1235 |
+
$borderSize = ( isset( $_POST['ftg_borderSize'] ) ? absint( $_POST['ftg_borderSize'] ) : '' );
|
1236 |
+
$borderColor = ( isset( $_POST['ftg_borderColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_borderColor'] ) ) : '' );
|
1237 |
+
$titleFontSize = ( isset( $_POST['ftg_titleFontSize'] ) ? absint( $_POST['ftg_titleFontSize'] ) : '' );
|
1238 |
+
$loadingBarColor = ( isset( $_POST['ftg_loadingBarColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_loadingBarColor'] ) ) : '' );
|
1239 |
+
$loadingBarBackgroundColor = ( isset( $_POST['ftg_loadingBarBackgroundColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_loadingBarBackgroundColor'] ) ) : '' );
|
1240 |
+
$borderRadius = ( isset( $_POST['ftg_borderRadius'] ) ? absint( $_POST['ftg_borderRadius'] ) : '' );
|
1241 |
+
$allFilterLabel = ( isset( $_POST['ftg_allFilterLabel'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_allFilterLabel'] ) ) : '' );
|
1242 |
+
$shadowColor = ( isset( $_POST['ftg_shadowColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_shadowColor'] ) ) : '' );
|
1243 |
+
$shadowSize = ( isset( $_POST['ftg_shadowSize'] ) ? absint( $_POST['ftg_shadowSize'] ) : '' );
|
1244 |
$enlargeImages = $this->checkboxVal( 'ftg_enlargeImages' );
|
1245 |
+
$wp_field_caption = ( isset( $_POST['ftg_wp_field_caption'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_wp_field_caption'] ) ) : '' );
|
1246 |
+
$wp_field_title = ( isset( $_POST['ftg_wp_field_title'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_wp_field_title'] ) ) : '' );
|
1247 |
+
$style = ( isset( $_POST['ftg_style'] ) ? $_POST['ftg_style'] : '' );
|
1248 |
+
$script = ( isset( $_POST['ftg_script'] ) ? $_POST['ftg_script'] : '' );
|
1249 |
+
$loadedHSlide = ( isset( $_POST['ftg_loadedHSlide'] ) ? intval( wp_unslash( $_POST['ftg_loadedHSlide'] ) ) : '' );
|
1250 |
+
$loadedVSlide = ( isset( $_POST['ftg_loadedVSlide'] ) ? intval( wp_unslash( $_POST['ftg_loadedVSlide'] ) ) : '' );
|
1251 |
+
$captionEffectDuration = ( isset( $_POST['ftg_captionEffectDuration'] ) ? absint( $_POST['ftg_captionEffectDuration'] ) : 250 );
|
1252 |
+
$id = ( isset( $_POST['ftg_gallery_edit'] ) ? absint( $_POST['ftg_gallery_edit'] ) : 0 );
|
1253 |
$data = array(
|
1254 |
+
'ajaxLoading' => ( isset( $_POST['ftg_ajaxLoading'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_ajaxLoading'] ) ) : '' ),
|
1255 |
+
'layout' => ( isset( $_POST['ftg_layout'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_layout'] ) ) : '' ),
|
1256 |
'name' => $galleryName,
|
1257 |
'slug' => $slug,
|
1258 |
'description' => $galleryDescription,
|
1259 |
'lightbox' => $lightbox,
|
1260 |
+
'lightboxOptions' => ( isset( $_POST['ftg_lightboxOptions'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_lightboxOptions'] ) ) : '' ),
|
1261 |
+
'lightboxOptionsMobile' => ( isset( $_POST['lightboxOptionsMobile'] ) ? sanitize_text_field( wp_unslash( $_POST['lightboxOptionsMobile'] ) ) : '' ),
|
1262 |
'mobileLightbox' => $mobileLightbox,
|
1263 |
+
'lightboxImageSize' => ( isset( $_POST['ftg_lightboxImageSize'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_lightboxImageSize'] ) ) : '' ),
|
1264 |
'blank' => $blank,
|
1265 |
'margin' => $margin,
|
1266 |
'allFilterLabel' => $allFilterLabel,
|
1267 |
'minTileWidth' => $minTileWidth,
|
1268 |
'gridCellSize' => $gridCellSize,
|
1269 |
+
'gridCellSizeDisabledBelow' => ( isset( $_POST['ftg_gridCellSizeDisabledBelow'] ) ? absint( $_POST['ftg_gridCellSizeDisabledBelow'] ) : '' ),
|
1270 |
'enableTwitter' => $enableTwitter,
|
1271 |
+
'backgroundColor' => ( isset( $_POST['ftg_backgroundColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_backgroundColor'] ) ) : '' ),
|
1272 |
'filterClick' => $filterClick,
|
1273 |
'disableLightboxGroups' => $this->checkboxVal( 'ftg_disableLightboxGroups' ),
|
1274 |
+
'defaultFilter' => ( isset( $_POST['ftg_filterDef'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_filterDef'] ) ) : '' ),
|
1275 |
'enableFacebook' => $enableFacebook,
|
1276 |
'enablePinterest' => $enablePinterest,
|
1277 |
'imagesOrder' => $imagesOrder,
|
1278 |
'compressHTML' => $this->checkboxVal( 'ftg_compressHTML' ),
|
1279 |
+
'loadMethod' => ( isset( $_POST['ftg_loadMethod'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_loadMethod'] ) ) : '' ),
|
1280 |
+
'socialIconColor' => ( isset( $_POST['ftg_socialIconColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_socialIconColor'] ) ) : '' ),
|
1281 |
+
'socialIconPosition' => ( isset( $_POST['ftg_socialIconPosition'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_socialIconPosition'] ) ) : '' ),
|
1282 |
+
'socialIconStyle' => ( isset( $_POST['ftg_socialIconStyle'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_socialIconStyle'] ) ) : '' ),
|
1283 |
+
'recentPostsCaption' => ( isset( $_POST['ftg_recentPostsCaption'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_recentPostsCaption'] ) ) : '' ),
|
1284 |
+
'recentPostsCaptionAutoExcerptLength' => ( isset( $_POST['ftg_recentPostsCaptionAutoExcerptLength'] ) ? intval( wp_unslash( $_POST['ftg_recentPostsCaptionAutoExcerptLength'] ) ) : '' ),
|
1285 |
'captionBehavior' => $captionBehavior,
|
1286 |
'captionEffect' => $captionEffect,
|
1287 |
'captionEmpty' => $captionEmpty,
|
1288 |
'captionBackgroundColor' => $captionBackgroundColor,
|
1289 |
'captionColor' => $captionColor,
|
1290 |
+
'captionCustomFields' => ( isset( $_POST['ftg_captionCustomFields'] ) ? wp_kses_post( wp_unslash( $_POST['ftg_captionCustomFields'] ) ) : '' ),
|
1291 |
+
'captionFrameColor' => ( isset( $_POST['ftg_captionFrameColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_captionFrameColor'] ) ) : '' ),
|
1292 |
'captionEffectDuration' => $captionEffectDuration,
|
1293 |
'captionEasing' => $captionEasing,
|
1294 |
'captionVerticalAlignment' => $captionVerticalAlignment,
|
1295 |
'captionHorizontalAlignment' => $captionHorizontalAlignment,
|
1296 |
'captionMobileBehavior' => $captionMobileBehavior,
|
1297 |
'captionOpacity' => $captionOpacity,
|
1298 |
+
'captionIcon' => ( isset( $_POST['ftg_captionIcon'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionIcon'] ) ) : '' ),
|
1299 |
'captionFrame' => $this->checkboxVal( 'ftg_captionFrame' ),
|
1300 |
+
'customCaptionIcon' => ( isset( $_POST['ftg_customCaptionIcon'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_customCaptionIcon'] ) ) : '' ),
|
1301 |
+
'captionIconColor' => ( isset( $_POST['ftg_captionIconColor'] ) ? sanitize_hex_color( wp_unslash( $_POST['ftg_captionIconColor'] ) ) : '' ),
|
1302 |
+
'captionIconSize' => ( isset( $_POST['ftg_captionIconSize'] ) ? absint( $_POST['ftg_captionIconSize'] ) : '' ),
|
1303 |
+
'captionFontSize' => ( isset( $_POST['ftg_captionFontSize'] ) ? absint( $_POST['ftg_captionFontSize'] ) : '' ),
|
1304 |
+
'captionPosition' => ( isset( $_POST['ftg_captionPosition'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_captionPosition'] ) ) : '' ),
|
1305 |
+
'titleFontSize' => ( isset( $_POST['ftg_titleFontSize'] ) ? absint( $_POST['ftg_titleFontSize'] ) : '' ),
|
1306 |
+
'hoverZoom' => ( isset( $_POST['ftg_hoverZoom'] ) ? absint( $_POST['ftg_hoverZoom'] ) : '' ),
|
1307 |
+
'hoverRotation' => ( isset( $_POST['ftg_hoverRotation'] ) ? intval( wp_unslash( $_POST['ftg_hoverRotation'] ) ) : '' ),
|
1308 |
+
'hoverDuration' => ( isset( $_POST['ftg_hoverDuration'] ) ? intval( wp_unslash( $_POST['ftg_hoverDuration'] ) ) : '' ),
|
1309 |
'hoverIconRotation' => $this->checkboxVal( 'ftg_hoverIconRotation' ),
|
1310 |
'filters' => $filters,
|
1311 |
'wp_field_caption' => $wp_field_caption,
|
1316 |
'loadingBarBackgroundColor' => $loadingBarBackgroundColor,
|
1317 |
'enlargeImages' => $enlargeImages,
|
1318 |
'borderRadius' => $borderRadius,
|
1319 |
+
'imageSizeFactor' => ( isset( $_POST['ftg_imageSizeFactor'] ) ? absint( $_POST['ftg_imageSizeFactor'] ) : '' ),
|
1320 |
+
'imageSizeFactorTabletLandscape' => ( isset( $_POST['ftg_imageSizeFactorTabletLandscape'] ) ? absint( $_POST['ftg_imageSizeFactorTabletLandscape'] ) : '' ),
|
1321 |
+
'imageSizeFactorTabletPortrait' => ( isset( $_POST['ftg_imageSizeFactorTabletPortrait'] ) ? absint( $_POST['ftg_imageSizeFactorTabletPortrait'] ) : '' ),
|
1322 |
+
'imageSizeFactorPhoneLandscape' => ( isset( $_POST['ftg_imageSizeFactorPhoneLandscape'] ) ? absint( $_POST['ftg_imageSizeFactorPhoneLandscape'] ) : '' ),
|
1323 |
+
'imageSizeFactorPhonePortrait' => ( isset( $_POST['ftg_imageSizeFactorPhonePortrait'] ) ? absint( $_POST['ftg_imageSizeFactorPhonePortrait'] ) : '' ),
|
1324 |
+
'imageSizeFactorCustom' => ( isset( $_POST['ftg_imageSizeFactorCustom'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_imageSizeFactorCustom'] ) ) : '' ),
|
1325 |
+
'taxonomyAsFilter' => ( isset( $_POST['ftg_taxonomyAsFilter'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_taxonomyAsFilter'] ) ) : '' ),
|
1326 |
+
'columns' => ( isset( $_POST['ftg_columns'] ) ? intval( wp_unslash( $_POST['ftg_columns'] ) ) : '' ),
|
1327 |
+
'columnsTabletLandscape' => ( isset( $_POST['ftg_columnsTabletLandscape'] ) ? absint( $_POST['ftg_columnsTabletLandscape'] ) : '' ),
|
1328 |
+
'columnsTabletPortrait' => ( isset( $_POST['ftg_columnsTabletPortrait'] ) ? absint( $_POST['ftg_columnsTabletPortrait'] ) : '' ),
|
1329 |
+
'columnsPhoneLandscape' => ( isset( $_POST['ftg_columnsPhoneLandscape'] ) ? absint( $_POST['ftg_columnsPhoneLandscape'] ) : '' ),
|
1330 |
+
'columnsPhonePortrait' => ( isset( $_POST['ftg_columnsPhonePortrait'] ) ? absint( $_POST['ftg_columnsPhonePortrait'] ) : '' ),
|
1331 |
+
'max_posts' => ( isset( $_POST['ftg_max_posts'] ) ? absint( $_POST['ftg_max_posts'] ) : '' ),
|
1332 |
'shadowSize' => $shadowSize,
|
1333 |
'shadowColor' => $shadowColor,
|
1334 |
+
'source' => ( isset( $_POST['ftg_source'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_source'] ) ) : '' ),
|
1335 |
+
'post_types' => ( isset( $_POST['ftg_post_types'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_post_types'] ) ) : '' ),
|
1336 |
+
'post_taxonomies' => ( isset( $_POST['ftg_post_taxonomies'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_post_taxonomies'] ) ) : '' ),
|
1337 |
+
'taxonomyOperator' => ( isset( $_POST['ftg_taxonomyOperator'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_taxonomyOperator'] ) ) : '' ),
|
1338 |
+
'post_tags' => ( isset( $_POST['ftg_post_tags'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_post_tags'] ) ) : '' ),
|
1339 |
+
'tilesPerPage' => ( isset( $_POST['ftg_tilesPerPage'] ) ? absint( $_POST['ftg_tilesPerPage'] ) : '' ),
|
1340 |
+
'woo_categories' => ( isset( $_POST['ftg_woo_categories'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_woo_categories'] ) ) : '' ),
|
1341 |
+
'defaultPostImageSize' => ( isset( $_POST['ftg_defaultPostImageSize'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_defaultPostImageSize'] ) ) : '' ),
|
1342 |
+
'defaultWooImageSize' => ( isset( $_POST['ftg_defaultWooImageSize'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_defaultWooImageSize'] ) ) : '' ),
|
1343 |
'width' => $width,
|
1344 |
+
'beforeGalleryText' => ( isset( $_POST['ftg_beforeGalleryText'] ) ? wp_kses_post( wp_unslash( $_POST['ftg_beforeGalleryText'] ) ) : '' ),
|
1345 |
+
'afterGalleryText' => ( isset( $_POST['ftg_afterGalleryText'] ) ? wp_kses_post( wp_unslash( $_POST['ftg_afterGalleryText'] ) ) : '' ),
|
1346 |
+
'aClass' => ( isset( $_POST['ftg_aClass'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_aClass'] ) ) : '' ),
|
1347 |
+
'rel' => ( isset( $_POST['ftg_rel'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_rel'] ) ) : '' ),
|
1348 |
'style' => $style,
|
1349 |
+
'delay' => ( isset( $_POST['ftg_delay'] ) ? absint( $_POST['ftg_delay'] ) : '' ),
|
1350 |
+
'script' => wp_unslash( $script ),
|
1351 |
'support' => $this->checkboxVal( 'ftg_support' ),
|
1352 |
+
'supportText' => ( isset( $_POST['ftg_supportText'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_supportText'] ) ) : '' ),
|
1353 |
'scrollEffect' => $scrollEffect,
|
1354 |
+
'loadedScaleY' => ( isset( $_POST['ftg_loadedScaleY'] ) ? absint( $_POST['ftg_loadedScaleY'] ) : '' ),
|
1355 |
+
'loadedScaleX' => ( isset( $_POST['ftg_loadedScaleX'] ) ? absint( $_POST['ftg_loadedScaleX'] ) : '' ),
|
1356 |
'loadedHSlide' => $loadedHSlide,
|
1357 |
'loadedVSlide' => $loadedVSlide,
|
1358 |
+
'loadedEasing' => ( isset( $_POST['ftg_loadedEasing'] ) ? sanitize_text_field( wp_unslash( $_POST['ftg_loadedEasing'] ) ) : '' ),
|
1359 |
+
'loadedDuration' => ( isset( $_POST['ftg_loadedDuration'] ) ? absint( $_POST['ftg_loadedDuration'] ) : '' ),
|
1360 |
+
'loadedRotateY' => ( isset( $_POST['ftg_loadedRotateY'] ) ? intval( wp_unslash( $_POST['ftg_loadedRotateY'] ) ) : '' ),
|
1361 |
+
'loadedRotateX' => ( isset( $_POST['ftg_loadedRotateX'] ) ? intval( wp_unslash( $_POST['ftg_loadedRotateX'] ) ) : '' ),
|
1362 |
);
|
1363 |
header( "Content-type: application/json" );
|
1364 |
|
1371 |
|
1372 |
|
1373 |
if ( $result ) {
|
1374 |
+
echo "{\"success\":true,\"id\":" . absint( $id ) . "}" ;
|
1375 |
} else {
|
1376 |
echo "{\"success\":false}" ;
|
1377 |
}
|
1483 |
|
1484 |
return $FinalTilesGallery->render();
|
1485 |
} else {
|
1486 |
+
return __( "Gallery not found.", 'final-tiles-grid-gallery-lite' );
|
1487 |
}
|
1488 |
|
1489 |
}
|
admin/add-gallery.php
CHANGED
@@ -1,280 +1,280 @@
|
|
1 |
<?php
|
2 |
|
3 |
if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
|
4 |
-
die(
|
5 |
}
|
6 |
?>
|
7 |
-
|
8 |
<?php
|
9 |
-
$ftg_subtitle =
|
10 |
-
|
11 |
?>
|
12 |
|
13 |
|
14 |
<div class="bd">
|
15 |
|
16 |
<div id="ftg-wizard">
|
17 |
-
|
18 |
esc_html_e( 'Add new gallery wizard', 'final-tiles-grid-gallery-lite' );
|
19 |
?></h2>
|
20 |
|
21 |
-
|
22 |
-
|
23 |
wp_nonce_field( 'FinalTiles_gallery', 'FinalTiles_gallery' );
|
24 |
?>
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
<label for="name"><?php
|
34 |
esc_html_e( 'Name of the gallery', 'final-tiles-grid-gallery-lite' );
|
35 |
?> <span class="req">(<?php
|
36 |
esc_html_e( 'required', 'final-tiles-grid-gallery-lite' );
|
37 |
?>)</span></label>
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
<label for="description"><?php
|
43 |
esc_html_e( 'Description of the gallery', 'final-tiles-grid-gallery-lite' );
|
44 |
?></label>
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
esc_html_e( 'Choose the source of the images', 'final-tiles-grid-gallery-lite' );
|
51 |
?></h5>
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
esc_html_e( 'Media library', 'final-tiles-grid-gallery-lite' );
|
56 |
?></label>
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
?>
|
61 |
-
|
62 |
-
|
63 |
esc_html_e( 'Recent posts', 'final-tiles-grid-gallery-lite' );
|
64 |
?> - <a class="in-wizard-cta" href="<?php
|
65 |
-
echo ftg_fs()->get_upgrade_url() ;
|
66 |
?>"><i class="mdi mdi-bell-ring-outline"></i>
|
67 |
-
|
68 |
esc_html_e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
|
69 |
?>
|
70 |
-
|
71 |
-
|
72 |
?>
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
?>
|
77 |
-
|
78 |
-
|
79 |
esc_html_e( 'WooCommerce products', 'final-tiles-grid-gallery-lite' );
|
80 |
?> - <a class="in-wizard-cta" href="<?php
|
81 |
-
echo ftg_fs()->get_upgrade_url() ;
|
82 |
?>"><i class="mdi mdi-bell-ring-outline"></i>
|
83 |
-
|
84 |
esc_html_e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
|
85 |
?>
|
86 |
-
|
87 |
-
|
88 |
?>
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
esc_html_e( 'WordPress field for captions:', 'final-tiles-grid-gallery-lite' );
|
95 |
?></h5>
|
96 |
-
|
97 |
-
|
98 |
esc_html_e( 'Don\'t use captions', 'final-tiles-grid-gallery-lite' );
|
99 |
?> </option>
|
100 |
-
|
101 |
esc_html_e( 'Title', 'final-tiles-grid-gallery-lite' );
|
102 |
?> </option>
|
103 |
-
|
104 |
esc_html_e( 'Caption', 'final-tiles-grid-gallery-lite' );
|
105 |
?> </option>
|
106 |
-
|
107 |
esc_html_e( 'Description', 'final-tiles-grid-gallery-lite' );
|
108 |
?> </option>
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
_e( 'WordPress field for titles:', 'final-tiles-grid-gallery-lite' );
|
115 |
?></h5>
|
116 |
-
|
117 |
-
|
118 |
esc_html_e( 'Don\'t use titles', 'final-tiles-grid-gallery-lite' );
|
119 |
?> </option>
|
120 |
-
|
121 |
esc_html_e( 'Title', 'final-tiles-grid-gallery-lite' );
|
122 |
?> </option>
|
123 |
-
|
124 |
esc_html_e( 'Description', 'final-tiles-grid-gallery-lite' );
|
125 |
?> </option>
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
esc_html_e( 'Caption effect:', 'final-tiles-grid-gallery-lite' );
|
148 |
?></h5>
|
149 |
-
|
150 |
-
|
151 |
esc_html_e( 'Fade', 'final-tiles-grid-gallery-lite' );
|
152 |
?></option>
|
153 |
-
|
154 |
?>
|
155 |
-
|
156 |
esc_html_e( 'Fixed (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
157 |
?> </option>
|
158 |
-
|
159 |
esc_html_e( 'Fixed with background (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
160 |
?></option>
|
161 |
-
|
162 |
esc_html_e( 'Fixed, hidden on hover (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
163 |
?></option>
|
164 |
-
|
165 |
esc_html_e( 'Fixed at bottom (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
166 |
?></option>
|
167 |
-
|
168 |
esc_html_e( 'Slide from top (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
169 |
?></option>
|
170 |
-
|
171 |
esc_html_e( 'Slide from bottom (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
172 |
?></option>
|
173 |
-
|
174 |
?>
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
?>
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
esc_html_e( 'Choose the layout', 'final-tiles-grid-gallery-lite' );
|
184 |
?></h5>
|
185 |
-
|
186 |
-
|
187 |
esc_html_e( 'Final Tiles Gallery (mixed image width)', 'final-tiles-grid-gallery-lite' );
|
188 |
?></option>
|
189 |
-
|
190 |
esc_html_e( 'Masonry (columns, same image width)', 'final-tiles-grid-gallery-lite' );
|
191 |
?></option>
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
esc_html_e( 'Choose a default image size', 'final-tiles-grid-gallery-lite' );
|
197 |
?></h5>
|
198 |
-
|
199 |
-
|
200 |
foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
|
201 |
-
echo '<option value="' . esc_attr( $size ) . '">' . esc_html( $size ) .
|
202 |
}
|
203 |
?>
|
204 |
-
|
205 |
<input type="hidden" name="def_imgsize" id="def_imgsize" value="large">
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
esc_html_e( 'Add images', 'final-tiles-grid-gallery-lite' );
|
211 |
?></a>
|
212 |
-
|
213 |
-
|
214 |
esc_html_e( 'You can add images now or later.', 'final-tiles-grid-gallery-lite' );
|
215 |
?></label>
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
esc_html_e( 'Previous', 'final-tiles-grid-gallery-lite' );
|
225 |
?></a>
|
226 |
-
|
227 |
esc_html_e( 'Next', 'final-tiles-grid-gallery-lite' );
|
228 |
?></a>
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
esc_html_e( 'Success!', 'final-tiles-grid-gallery-lite' );
|
235 |
?></h4>
|
236 |
-
|
237 |
esc_html_e( 'Your gallery', 'final-tiles-grid-gallery-lite' );
|
238 |
?> "<span class="gallery-name"></span>" <?php
|
239 |
esc_html_e( 'has been created. Copy the following shortcode:', 'final-tiles-grid-gallery-lite' );
|
240 |
?><br>
|
241 |
-
|
242 |
-
|
243 |
esc_html_e( 'and paste it inside a post or a page. Otherwise click', 'final-tiles-grid-gallery-lite' );
|
244 |
?> <a class='customize'><?php
|
245 |
esc_html_e( 'here', 'final-tiles-grid-gallery-lite' );
|
246 |
-
?></a>
|
|
|
247 |
esc_html_e( 'to customize
|
248 |
the gallery.', 'final-tiles-grid-gallery-lite' );
|
249 |
?>
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
echo admin_url( 'admin.php?page=ftg-lite-gallery-admin' ) ;
|
255 |
?>" id="modal-close" class="button modal-action"><?php
|
256 |
esc_html_e( 'Close', 'final-tiles-grid-gallery-lite' );
|
257 |
?></a>
|
258 |
-
|
259 |
</div>
|
260 |
<div id="error" class="modal">
|
261 |
-
|
262 |
-
|
263 |
esc_html_e( 'Error!', 'final-tiles-grid-gallery-lite' );
|
264 |
?></h4>
|
265 |
-
|
266 |
esc_html_e( 'For some reason it was not possible to save your gallery, please contact', 'final-tiles-grid-gallery-lite' );
|
267 |
?><a href="?page=ftg-support"><?php
|
268 |
esc_html_e( 'support', 'final-tiles-grid-gallery-lite' );
|
269 |
?></a>.</p>
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
admin_url( 'admin.php?page=ftg-lite-gallery-admin' );
|
274 |
?>" class="waves-effect waves-green btn-flat modal-action modal-close"><?php
|
275 |
esc_html_e( 'Close', 'final-tiles-grid-gallery-lite' );
|
276 |
?></a>
|
277 |
-
|
278 |
</div>
|
279 |
</div>
|
280 |
</div>
|
@@ -283,4 +283,5 @@ jQuery(function (){
|
|
283 |
var $ = jQuery;
|
284 |
//$(".def_imgsize").val("large");
|
285 |
});
|
286 |
-
</script>
|
|
1 |
<?php
|
2 |
|
3 |
if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
|
4 |
+
die( esc_html_e( 'You are not allowed to call this page directly.', 'final-tiles-grid-gallery-lite' ) );
|
5 |
}
|
6 |
?>
|
7 |
+
|
8 |
<?php
|
9 |
+
$ftg_subtitle = '';
|
10 |
+
require 'header.php';
|
11 |
?>
|
12 |
|
13 |
|
14 |
<div class="bd">
|
15 |
|
16 |
<div id="ftg-wizard">
|
17 |
+
<h2><?php
|
18 |
esc_html_e( 'Add new gallery wizard', 'final-tiles-grid-gallery-lite' );
|
19 |
?></h2>
|
20 |
|
21 |
+
<form action="#" method="post">
|
22 |
+
<?php
|
23 |
wp_nonce_field( 'FinalTiles_gallery', 'FinalTiles_gallery' );
|
24 |
?>
|
25 |
+
<input type="hidden" name="action" value="add_new_gallery" />
|
26 |
+
<input type="hidden" name="enc_images" value="" />
|
27 |
+
<input type="hidden" name="post_types" value="" />
|
28 |
+
<input type="hidden" name="woo_categories" value="" />
|
29 |
+
<input type="hidden" name="gridSize" value="5" />
|
30 |
+
<fieldset data-step="1">
|
31 |
+
<div class="row">
|
32 |
+
<div class="ftg-field">
|
33 |
<label for="name"><?php
|
34 |
esc_html_e( 'Name of the gallery', 'final-tiles-grid-gallery-lite' );
|
35 |
?> <span class="req">(<?php
|
36 |
esc_html_e( 'required', 'final-tiles-grid-gallery-lite' );
|
37 |
?>)</span></label>
|
38 |
+
<input name="ftg_name" id="name" type="text" required="required">
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
<div class="ftg-field">
|
42 |
<label for="description"><?php
|
43 |
esc_html_e( 'Description of the gallery', 'final-tiles-grid-gallery-lite' );
|
44 |
?></label>
|
45 |
+
<textarea name="ftg_description" id="description"></textarea>
|
46 |
+
</div>
|
47 |
+
</fieldset>
|
48 |
+
<fieldset data-step="2">
|
49 |
+
<h5><?php
|
50 |
esc_html_e( 'Choose the source of the images', 'final-tiles-grid-gallery-lite' );
|
51 |
?></h5>
|
52 |
+
<p class="ftg-inline">
|
53 |
+
<input class="with-gap browser-default" type="radio" checked="checked" name="ftg_source" id="source1" value="images" />
|
54 |
+
<label for="source1"><?php
|
55 |
esc_html_e( 'Media library', 'final-tiles-grid-gallery-lite' );
|
56 |
?></label>
|
57 |
+
</p>
|
58 |
+
<p class="ftg-inline">
|
59 |
+
<?php
|
60 |
?>
|
61 |
+
<input disabled class="with-gap browser-default" type="radio" name="ftg_source" value="*" id="source2" />
|
62 |
+
<label for="source2"><?php
|
63 |
esc_html_e( 'Recent posts', 'final-tiles-grid-gallery-lite' );
|
64 |
?> - <a class="in-wizard-cta" href="<?php
|
65 |
+
echo esc_url( ftg_fs()->get_upgrade_url() ) ;
|
66 |
?>"><i class="mdi mdi-bell-ring-outline"></i>
|
67 |
+
<?php
|
68 |
esc_html_e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
|
69 |
?>
|
70 |
+
</a></label>
|
71 |
+
<?php
|
72 |
?>
|
73 |
+
</p>
|
74 |
+
<p class="ftg-inline">
|
75 |
+
<?php
|
76 |
?>
|
77 |
+
<input class="with-gap browser-default" disabled type="radio" name="ftg_source" value="*" id="source3" />
|
78 |
+
<label for="source3"><?php
|
79 |
esc_html_e( 'WooCommerce products', 'final-tiles-grid-gallery-lite' );
|
80 |
?> - <a class="in-wizard-cta" href="<?php
|
81 |
+
echo esc_url( ftg_fs()->get_upgrade_url() ) ;
|
82 |
?>"><i class="mdi mdi-bell-ring-outline"></i>
|
83 |
+
<?php
|
84 |
esc_html_e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
|
85 |
?>
|
86 |
+
</a></label>
|
87 |
+
<?php
|
88 |
?>
|
89 |
+
</p>
|
90 |
+
</fieldset>
|
91 |
+
<fieldset data-step="3" data-branch="images">
|
92 |
+
<div class="field">
|
93 |
+
<h5><?php
|
94 |
esc_html_e( 'WordPress field for captions:', 'final-tiles-grid-gallery-lite' );
|
95 |
?></h5>
|
96 |
+
<select class="browser-default" name="ftg_wp_field_caption">
|
97 |
+
<option value="none"> <?php
|
98 |
esc_html_e( 'Don\'t use captions', 'final-tiles-grid-gallery-lite' );
|
99 |
?> </option>
|
100 |
+
<option value="title"> <?php
|
101 |
esc_html_e( 'Title', 'final-tiles-grid-gallery-lite' );
|
102 |
?> </option>
|
103 |
+
<option selected value="caption"> <?php
|
104 |
esc_html_e( 'Caption', 'final-tiles-grid-gallery-lite' );
|
105 |
?> </option>
|
106 |
+
<option value="description"> <?php
|
107 |
esc_html_e( 'Description', 'final-tiles-grid-gallery-lite' );
|
108 |
?> </option>
|
109 |
+
</select>
|
110 |
+
</div>
|
111 |
+
<div class="field">
|
112 |
+
<h5><?php
|
113 |
+
esc_html_e( 'WordPress field for titles:', 'final-tiles-grid-gallery-lite' );
|
|
|
114 |
?></h5>
|
115 |
+
<select class="browser-default" name="ftg_wp_field_title">
|
116 |
+
<option value="none"> <?php
|
117 |
esc_html_e( 'Don\'t use titles', 'final-tiles-grid-gallery-lite' );
|
118 |
?> </option>
|
119 |
+
<option selected value="title"> <?php
|
120 |
esc_html_e( 'Title', 'final-tiles-grid-gallery-lite' );
|
121 |
?> </option>
|
122 |
+
<option value="description"> <?php
|
123 |
esc_html_e( 'Description', 'final-tiles-grid-gallery-lite' );
|
124 |
?> </option>
|
125 |
+
</select>
|
126 |
+
</div>
|
127 |
+
<!--
|
128 |
+
<div class="field">
|
129 |
+
<h5>Caption behavior:</h5>
|
130 |
+
<p>
|
131 |
+
<input class="with-gap" type="radio" name="ftg_captionBehavior" value="hidden" checked="checked" id="behavior1" />
|
132 |
+
<label for="behavior1">Hidden, show it on mouse hover</label>
|
133 |
+
</p>
|
134 |
+
<p>
|
135 |
+
<input class="with-gap" type="radio" name="ftg_captionBehavior" value="visible" id="behavior2" />
|
136 |
+
<label for="behavior2">Visible, hide it on mouse hover</label>
|
137 |
+
</p>
|
138 |
+
<p>
|
139 |
+
<input class="with-gap" type="radio" name="ftg_captionBehavior" value="always-visible" id="behavior3" />
|
140 |
+
<label for="behavior3" class="line">Always visible</label>
|
141 |
+
</p>
|
142 |
+
</div>
|
143 |
+
-->
|
144 |
+
<div class="field">
|
145 |
+
<h5><?php
|
146 |
esc_html_e( 'Caption effect:', 'final-tiles-grid-gallery-lite' );
|
147 |
?></h5>
|
148 |
+
<select class="browser-default" name="ftg_captionEffect">
|
149 |
+
<option value="none"><?php
|
150 |
esc_html_e( 'Fade', 'final-tiles-grid-gallery-lite' );
|
151 |
?></option>
|
152 |
+
<?php
|
153 |
?>
|
154 |
+
<option value="fixed" disabled><?php
|
155 |
esc_html_e( 'Fixed (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
156 |
?> </option>
|
157 |
+
<option value="fixed-bg" disabled><?php
|
158 |
esc_html_e( 'Fixed with background (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
159 |
?></option>
|
160 |
+
<option value="fixed-then-hidden" disabled><?php
|
161 |
esc_html_e( 'Fixed, hidden on hover (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
162 |
?></option>
|
163 |
+
<option value="fixed-bottom" disabled><?php
|
164 |
esc_html_e( 'Fixed at bottom (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
165 |
?></option>
|
166 |
+
<option value="slide-from-top" disabled><?php
|
167 |
esc_html_e( 'Slide from top (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
168 |
?></option>
|
169 |
+
<option value="slide-from-bottom" disabled><?php
|
170 |
esc_html_e( 'Slide from bottom (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
171 |
?></option>
|
172 |
+
<?php
|
173 |
?>
|
174 |
+
</select>
|
175 |
+
</div>
|
176 |
+
</fieldset>
|
177 |
+
<?php
|
178 |
?>
|
179 |
+
<fieldset data-step="4" data-save="true">
|
180 |
+
<div class="field">
|
181 |
+
<h5><?php
|
182 |
esc_html_e( 'Choose the layout', 'final-tiles-grid-gallery-lite' );
|
183 |
?></h5>
|
184 |
+
<select class="browser-default" name="layout">
|
185 |
+
<option value="final"><?php
|
186 |
esc_html_e( 'Final Tiles Gallery (mixed image width)', 'final-tiles-grid-gallery-lite' );
|
187 |
?></option>
|
188 |
+
<option value="columns"><?php
|
189 |
esc_html_e( 'Masonry (columns, same image width)', 'final-tiles-grid-gallery-lite' );
|
190 |
?></option>
|
191 |
+
</select>
|
192 |
+
</div>
|
193 |
+
<div class="field">
|
194 |
+
<!--<h5><?php
|
195 |
esc_html_e( 'Choose a default image size', 'final-tiles-grid-gallery-lite' );
|
196 |
?></h5>
|
197 |
+
<select class="browser-default def_imgsize" name="def_imgsize">
|
198 |
+
<?php
|
199 |
foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
|
200 |
+
echo '<option value="' . esc_attr( $size ) . '">' . esc_html( $size ) . ' (' . esc_html( implode( 'x', $atts ) ) . ')</option>' ;
|
201 |
}
|
202 |
?>
|
203 |
+
</select>-->
|
204 |
<input type="hidden" name="def_imgsize" id="def_imgsize" value="large">
|
205 |
+
</div>
|
206 |
+
<div class="field select-images">
|
207 |
+
<a class="button add-images">
|
208 |
+
<?php
|
209 |
esc_html_e( 'Add images', 'final-tiles-grid-gallery-lite' );
|
210 |
?></a>
|
211 |
+
|
212 |
+
<label><?php
|
213 |
esc_html_e( 'You can add images now or later.', 'final-tiles-grid-gallery-lite' );
|
214 |
?></label>
|
215 |
+
<div class="images list-group"></div>
|
216 |
+
</div>
|
217 |
+
</fieldset>
|
218 |
+
<footer class="page-footer">
|
219 |
+
<div class="progress loading">
|
220 |
+
<div class="indeterminate"></div>
|
221 |
+
</div>
|
222 |
+
<a class="button prev"><?php
|
223 |
esc_html_e( 'Previous', 'final-tiles-grid-gallery-lite' );
|
224 |
?></a>
|
225 |
+
<a class="button components-button is-primary next"><?php
|
226 |
esc_html_e( 'Next', 'final-tiles-grid-gallery-lite' );
|
227 |
?></a>
|
228 |
+
</footer>
|
229 |
+
</form>
|
230 |
+
<div id="success" class="modal">
|
231 |
+
<div class="modal-content">
|
232 |
+
<h4><?php
|
233 |
esc_html_e( 'Success!', 'final-tiles-grid-gallery-lite' );
|
234 |
?></h4>
|
235 |
+
<p><?php
|
236 |
esc_html_e( 'Your gallery', 'final-tiles-grid-gallery-lite' );
|
237 |
?> "<span class="gallery-name"></span>" <?php
|
238 |
esc_html_e( 'has been created. Copy the following shortcode:', 'final-tiles-grid-gallery-lite' );
|
239 |
?><br>
|
240 |
+
<input type="text" readonly class="code"><br>
|
241 |
+
<?php
|
242 |
esc_html_e( 'and paste it inside a post or a page. Otherwise click', 'final-tiles-grid-gallery-lite' );
|
243 |
?> <a class='customize'><?php
|
244 |
esc_html_e( 'here', 'final-tiles-grid-gallery-lite' );
|
245 |
+
?></a>
|
246 |
+
<?php
|
247 |
esc_html_e( 'to customize
|
248 |
the gallery.', 'final-tiles-grid-gallery-lite' );
|
249 |
?>
|
250 |
+
</p>
|
251 |
+
</div>
|
252 |
+
<div class="modal-'footer">
|
253 |
+
<a href="<?php
|
254 |
+
echo esc_url( admin_url( 'admin.php?page=ftg-lite-gallery-admin' ) ) ;
|
255 |
?>" id="modal-close" class="button modal-action"><?php
|
256 |
esc_html_e( 'Close', 'final-tiles-grid-gallery-lite' );
|
257 |
?></a>
|
258 |
+
</div>
|
259 |
</div>
|
260 |
<div id="error" class="modal">
|
261 |
+
<div class="modal-content">
|
262 |
+
<h4><?php
|
263 |
esc_html_e( 'Error!', 'final-tiles-grid-gallery-lite' );
|
264 |
?></h4>
|
265 |
+
<p><?php
|
266 |
esc_html_e( 'For some reason it was not possible to save your gallery, please contact', 'final-tiles-grid-gallery-lite' );
|
267 |
?><a href="?page=ftg-support"><?php
|
268 |
esc_html_e( 'support', 'final-tiles-grid-gallery-lite' );
|
269 |
?></a>.</p>
|
270 |
+
</div>
|
271 |
+
<div class="modal-footer">
|
272 |
+
<a href="<?php
|
273 |
admin_url( 'admin.php?page=ftg-lite-gallery-admin' );
|
274 |
?>" class="waves-effect waves-green btn-flat modal-action modal-close"><?php
|
275 |
esc_html_e( 'Close', 'final-tiles-grid-gallery-lite' );
|
276 |
?></a>
|
277 |
+
</div>
|
278 |
</div>
|
279 |
</div>
|
280 |
</div>
|
283 |
var $ = jQuery;
|
284 |
//$(".def_imgsize").val("large");
|
285 |
});
|
286 |
+
</script>
|
287 |
+
|
admin/edit-gallery.php
CHANGED
@@ -1,103 +1,104 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
$
|
6 |
-
$
|
7 |
-
|
8 |
-
|
9 |
-
$
|
10 |
-
$
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
}
|
16 |
-
|
|
|
17 |
global $ftg_parent_page;
|
18 |
-
$ftg_parent_page =
|
19 |
|
20 |
?>
|
21 |
-
<?php $ftg_subtitle =
|
22 |
-
<?php
|
23 |
|
24 |
<div class='bd'>
|
25 |
<div class="row ">
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
</div>
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
|
71 |
</div>
|
72 |
|
73 |
<div id="groups-modal" class="modal">
|
74 |
<div class="modal-content">
|
75 |
-
<h3><?php esc_html_e('Assign group', 'final-tiles-grid-gallery-lite')?></h3>
|
76 |
-
<p><?php esc_html_e('The group name is for internal use and it won\'t be shown, avoid space and special characters', 'final-tiles-grid-gallery-lite')?></p>
|
77 |
<input type="text" id="group-name-to-assign" />
|
78 |
</div>
|
79 |
<div class="modal-footer">
|
80 |
-
<a href="#!" data-action-assign-group class="action modal-action modal-close waves-effect waves-green btn-flat"><?php esc_html_e('Save', 'final-tiles-grid-gallery-lite')?></a>
|
81 |
-
<a href="#!" data-action="cancel" class="action modal-action modal-close waves-effect waves-yellow btn-flat"><?php esc_html_e('Cancel', 'final-tiles-grid-gallery-lite')?></a>
|
82 |
</div>
|
83 |
</div>
|
84 |
|
85 |
<div id="filters-modal" class="modal">
|
86 |
<div class="modal-content">
|
87 |
-
<h3><?php esc_html_e('Assign filters', 'final-tiles-grid-gallery-lite')?></h3>
|
88 |
|
89 |
<div id="filters-to-assign">
|
90 |
-
<?php foreach($filters as $filter): ?>
|
91 |
<label>
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
<?php endforeach; ?>
|
96 |
</div>
|
97 |
-
<p><?php esc_html_e("If you don't see all filters please save and reload the page", 'final-tiles-grid-gallery-lite')?></p>
|
98 |
</div>
|
99 |
<div class="modal-footer">
|
100 |
-
<a href="#!" data-action-assign-filters class="action modal-action modal-close waves-effect waves-green btn-flat"><?php esc_html_e('Save', 'final-tiles-grid-gallery-lite')?></a>
|
101 |
-
<a href="#!" data-action="cancel" class="action modal-action modal-close waves-effect waves-yellow btn-flat"><?php esc_html_e('Cancel', 'final-tiles-grid-gallery-lite')?></a>
|
102 |
</div>
|
103 |
-
</div>
|
1 |
<?php
|
2 |
+
if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' ); }
|
4 |
+
|
5 |
+
$galleryResults = $this->FinalTilesdb->getGalleries();
|
6 |
+
$default_options = get_option( 'FinalTiles_gallery_options' );
|
7 |
+
$gallery = null;
|
8 |
+
|
9 |
+
$gid = intval( $_GET['id'] );
|
10 |
+
$imageResults = $this->FinalTilesdb->getImagesByGalleryId( $gid, 0, 0 );
|
11 |
+
$gallery = $this->FinalTilesdb->getGalleryById( $gid );
|
12 |
+
foreach ( $this->defaultValues as $k => $v ) {
|
13 |
+
if ( ! isset( $gallery->$k ) || empty( $gallery->$k ) ) {
|
14 |
+
$gallery->$k = $v;
|
15 |
}
|
16 |
+
}
|
17 |
+
|
18 |
global $ftg_parent_page;
|
19 |
+
$ftg_parent_page = 'edit-gallery';
|
20 |
|
21 |
?>
|
22 |
+
<?php $ftg_subtitle = 'Edit gallery: ' . $gallery->name; ?>
|
23 |
+
<?php require 'header.php'; ?>
|
24 |
|
25 |
<div class='bd'>
|
26 |
<div class="row ">
|
27 |
+
<div id="settings">
|
28 |
+
<form name="gallery_form" id="edit-gallery" action="<?php echo esc_url( str_replace( '%7E', '~', $_SERVER['REQUEST_URI'] ) ); ?>" method="post">
|
29 |
+
<?php wp_nonce_field( 'FinalTiles_gallery', 'FinalTiles_gallery' ); ?>
|
30 |
+
<input type="hidden" name="ftg_gallery_edit" id="gallery-id" value="<?php echo absint( $gid ); ?>" />
|
31 |
+
<?php require 'include/edit-gallery.php'; ?>
|
32 |
+
</form>
|
33 |
</div>
|
34 |
|
35 |
+
<script>
|
36 |
+
(function ($) {
|
37 |
+
window.onload = function () {
|
38 |
+
|
39 |
+
$("[name=ftg_source]").val("<?php echo esc_attr( $gallery->source ); ?>").change();
|
40 |
+
$("[name=ftg_defaultPostImageSize]").val("<?php echo esc_attr( $gallery->defaultPostImageSize ); ?>").change();
|
41 |
+
|
42 |
+
FTG.init_gallery();
|
43 |
+
|
44 |
+
$("select.multiple").change(function () {
|
45 |
+
var val = $(this).val();
|
46 |
+
if(val.length > 1)
|
47 |
+
$(this).val(val[0]);
|
48 |
+
});
|
49 |
+
|
50 |
+
$("tr:even").addClass("alternate");
|
51 |
+
$(".sections a:first").addClass("selected");
|
52 |
+
$(".sections a").click(function(e) {
|
53 |
+
e.preventDefault();
|
54 |
+
|
55 |
+
var idx = $(".sections a").index(this);
|
56 |
+
|
57 |
+
$(".sections a").removeClass("selected");
|
58 |
+
$(this).addClass("selected");
|
59 |
+
|
60 |
+
$(".ftg-section").hide().eq(idx).show();
|
61 |
+
|
62 |
+
if(idx == 6)
|
63 |
+
$(".form-buttons").hide();
|
64 |
+
else
|
65 |
+
$(".form-buttons").show();
|
66 |
+
});
|
67 |
+
$(".ftg-section").hide().eq(0).show();
|
68 |
+
}
|
69 |
+
})(jQuery);
|
70 |
+
</script>
|
71 |
|
72 |
</div>
|
73 |
|
74 |
<div id="groups-modal" class="modal">
|
75 |
<div class="modal-content">
|
76 |
+
<h3><?php esc_html_e( 'Assign group', 'final-tiles-grid-gallery-lite' ); ?></h3>
|
77 |
+
<p><?php esc_html_e( 'The group name is for internal use and it won\'t be shown, avoid space and special characters', 'final-tiles-grid-gallery-lite' ); ?></p>
|
78 |
<input type="text" id="group-name-to-assign" />
|
79 |
</div>
|
80 |
<div class="modal-footer">
|
81 |
+
<a href="#!" data-action-assign-group class="action modal-action modal-close waves-effect waves-green btn-flat"><?php esc_html_e( 'Save', 'final-tiles-grid-gallery-lite' ); ?></a>
|
82 |
+
<a href="#!" data-action="cancel" class="action modal-action modal-close waves-effect waves-yellow btn-flat"><?php esc_html_e( 'Cancel', 'final-tiles-grid-gallery-lite' ); ?></a>
|
83 |
</div>
|
84 |
</div>
|
85 |
|
86 |
<div id="filters-modal" class="modal">
|
87 |
<div class="modal-content">
|
88 |
+
<h3><?php esc_html_e( 'Assign filters', 'final-tiles-grid-gallery-lite' ); ?></h3>
|
89 |
|
90 |
<div id="filters-to-assign">
|
91 |
+
<?php foreach ( $filters as $filter ) : ?>
|
92 |
<label>
|
93 |
+
<input type="checkbox" value="<?php echo esc_attr( $filter, ENT_QUOTES ); ?>" />
|
94 |
+
<span><?php echo esc_html( $filter ); ?></span>
|
95 |
+
</label>
|
96 |
<?php endforeach; ?>
|
97 |
</div>
|
98 |
+
<p><?php esc_html_e( "If you don't see all filters please save and reload the page", 'final-tiles-grid-gallery-lite' ); ?></p>
|
99 |
</div>
|
100 |
<div class="modal-footer">
|
101 |
+
<a href="#!" data-action-assign-filters class="action modal-action modal-close waves-effect waves-green btn-flat"><?php esc_html_e( 'Save', 'final-tiles-grid-gallery-lite' ); ?></a>
|
102 |
+
<a href="#!" data-action="cancel" class="action modal-action modal-close waves-effect waves-yellow btn-flat"><?php esc_html_e( 'Cancel', 'final-tiles-grid-gallery-lite' ); ?></a>
|
103 |
</div>
|
104 |
+
</div>
|
admin/include/edit-gallery.php
CHANGED
@@ -7,7 +7,7 @@ if ( !function_exists( 'ftg_p' ) ) {
|
|
7 |
|
8 |
if ( $ftg_options ) {
|
9 |
if ( array_key_exists( $field, $ftg_options ) ) {
|
10 |
-
print
|
11 |
}
|
12 |
return;
|
13 |
}
|
@@ -18,11 +18,11 @@ if ( !function_exists( 'ftg_p' ) ) {
|
|
18 |
if ( $default === NULL ) {
|
19 |
print "";
|
20 |
} else {
|
21 |
-
print
|
22 |
}
|
23 |
|
24 |
} else {
|
25 |
-
print
|
26 |
}
|
27 |
|
28 |
}
|
@@ -37,7 +37,7 @@ if ( !function_exists( 'ftg_p' ) ) {
|
|
37 |
global $ftg_options ;
|
38 |
|
39 |
if ( $ftg_options && $ftg_options[$field] == $value ) {
|
40 |
-
print $type;
|
41 |
return;
|
42 |
}
|
43 |
|
@@ -46,7 +46,7 @@ if ( !function_exists( 'ftg_p' ) ) {
|
|
46 |
print "";
|
47 |
} else {
|
48 |
if ( $gallery->{$field} == $value ) {
|
49 |
-
print $type;
|
50 |
}
|
51 |
}
|
52 |
|
@@ -68,14 +68,14 @@ if ( !function_exists( 'ftg_p' ) ) {
|
|
68 |
|
69 |
function ftg_printPro( $plan )
|
70 |
{
|
71 |
-
return " (upgrade to unlock)";
|
72 |
return "";
|
73 |
}
|
74 |
|
75 |
function ftg_printFieldPro( $options )
|
76 |
{
|
77 |
if ( is_array( $options ) && count( $options ) == 3 && $options[2] == "disabled" ) {
|
78 |
-
return " (upgrade to unlock)";
|
79 |
}
|
80 |
return "";
|
81 |
}
|
@@ -118,7 +118,7 @@ ftg_sel( $gallery, "source", "posts" );
|
|
118 |
echo ftg_checkDisabledOption( 'ultimate' ) ;
|
119 |
?>><?php
|
120 |
esc_html_e( 'Recent posts with featured image', 'final-tiles-grid-gallery-lite' );
|
121 |
-
echo ftg_printPro( 'ultimate' ) ;
|
122 |
?></option>
|
123 |
<?php
|
124 |
|
@@ -129,8 +129,8 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
|
|
129 |
?> value="woocommerce" <?php
|
130 |
echo ftg_checkDisabledOption( 'ultimate' ) ;
|
131 |
?>><?php
|
132 |
-
|
133 |
-
echo ftg_printPro( 'ultimate' ) ;
|
134 |
?></option>
|
135 |
<?php
|
136 |
}
|
@@ -140,7 +140,7 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
|
|
140 |
<select class="current-image-size browser-default">
|
141 |
<?php
|
142 |
foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
|
143 |
-
echo '<option ' . (( $size == 'large' ? 'selected' : '' )) . ' value="' . esc_attr( $size ) . '">' . esc_html( $size ) . " (" . implode( 'x', $atts ) . ")</option>" ;
|
144 |
}
|
145 |
?>
|
146 |
</select>
|
@@ -255,7 +255,7 @@ foreach ( get_taxonomies( array(), "objects" ) as $taxonomy => $t ) {
|
|
255 |
<option <?php
|
256 |
ftg_sel( $gallery, "taxonomyAsFilter", $t->label );
|
257 |
?> value="<?php
|
258 |
-
|
259 |
?>"><?php
|
260 |
echo esc_html( $t->label ) ;
|
261 |
?></option>
|
@@ -400,7 +400,7 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
|
|
400 |
<div class="actions source-woocommerce source-panel">
|
401 |
<div class="row checkboxes">
|
402 |
<strong class="label"><?php
|
403 |
-
|
404 |
?>:</strong>
|
405 |
<span>
|
406 |
<?php
|
@@ -442,11 +442,11 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
|
|
442 |
foreach ( $ftg_fields as $section => $s ) {
|
443 |
?>
|
444 |
<li id="<?php
|
445 |
-
|
446 |
?>">
|
447 |
<div class="collapsible-header">
|
448 |
<i class="<?php
|
449 |
-
echo $s["icon"] ;
|
450 |
?> light-green darken-1 white-text ftg-section-icon"></i> <?php
|
451 |
esc_html_e( $section, 'final-tiles-grid-gallery-lite' );
|
452 |
?>
|
@@ -584,7 +584,7 @@ foreach ( $ftg_fields as $section => $s ) {
|
|
584 |
?>
|
585 |
<div class="text">
|
586 |
<a class="in-table-cta" href="<?php
|
587 |
-
echo ftg_fs()->get_upgrade_url() ;
|
588 |
?>"><i class="mdi mdi-bell-ring-outline"></i>
|
589 |
<?php
|
590 |
esc_html_e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
|
@@ -596,7 +596,7 @@ foreach ( $ftg_fields as $section => $s ) {
|
|
596 |
?>
|
597 |
<div class="text">
|
598 |
<select class="browser-default" name="ftg_<?php
|
599 |
-
print $f;
|
600 |
?>">
|
601 |
<?php
|
602 |
foreach ( array_keys( $data["values"] ) as $optgroup ) {
|
@@ -620,7 +620,7 @@ foreach ( $ftg_fields as $section => $s ) {
|
|
620 |
echo esc_attr( $v[0] ) ;
|
621 |
?>"><?php
|
622 |
esc_html_e( $v[1], 'final-tiles-grid-gallery-lite' );
|
623 |
-
echo ftg_printFieldPro( $v ) ;
|
624 |
?></option>
|
625 |
<?php
|
626 |
}
|
@@ -763,7 +763,7 @@ foreach ( $ftg_fields as $section => $s ) {
|
|
763 |
<textarea name="ftg_<?php
|
764 |
echo esc_attr( $f ) ;
|
765 |
?>"><?php
|
766 |
-
ftg_p( $gallery, $f );
|
767 |
?></textarea>
|
768 |
</div>
|
769 |
<?php
|
@@ -798,7 +798,7 @@ foreach ( $ftg_fields as $section => $s ) {
|
|
798 |
|
799 |
?>
|
800 |
<div class="help" id="help-<?php
|
801 |
-
echo $f ;
|
802 |
?>">
|
803 |
<?php
|
804 |
|
@@ -806,18 +806,18 @@ foreach ( $ftg_fields as $section => $s ) {
|
|
806 |
?>
|
807 |
<div class="ftg-code">
|
808 |
<a href="#" class="toggle-shortcode" data-code="<?php
|
809 |
-
print $f;
|
810 |
?>"><i class="fa fa-eye-slash"></i></a>
|
811 |
<span id="shortcode-<?php
|
812 |
echo esc_attr( $f ) ;
|
813 |
?>">
|
814 |
<?php
|
815 |
-
|
816 |
?>:
|
817 |
<code class="shortcode-val"><?php
|
818 |
-
|
819 |
?>="<?php
|
820 |
-
ftg_p( $gallery, $f, $data["default"] );
|
821 |
?>"</code>
|
822 |
</span>
|
823 |
</div>
|
@@ -858,14 +858,14 @@ if ( ftg_fs()->is_not_paying() ) {
|
|
858 |
<ul class="collapsible gallery-actions">
|
859 |
<li class="active">
|
860 |
<div class="collapsible-header"><?php
|
861 |
-
|
862 |
?>: <?php
|
863 |
esc_html_e( 'unlock features', 'final-tiles-grid-gallery-lite' );
|
864 |
?></div>
|
865 |
<div class="collapsible-body">
|
866 |
<div class="ftg-upsell">
|
867 |
<a href="<?php
|
868 |
-
echo ftg_fs()->get_upgrade_url() ;
|
869 |
?>"><i class="fa fa-hand-o-right"></i> <?php
|
870 |
esc_html_e( 'Upgrade', 'final-tiles-grid-gallery-lite' );
|
871 |
?></a>
|
@@ -898,7 +898,7 @@ esc_html_e( 'Save gallery', 'final-tiles-grid-gallery-lite' );
|
|
898 |
</li>
|
899 |
<li>
|
900 |
<div class="collapsible-header"><?php
|
901 |
-
|
902 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
903 |
<div class="collapsible-body">
|
904 |
<p><?php
|
@@ -912,40 +912,40 @@ esc_html_e( 'Import', 'final-tiles-grid-gallery-lite' );
|
|
912 |
</li>
|
913 |
<li>
|
914 |
<div class="collapsible-header"><?php
|
915 |
-
|
916 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
917 |
<div class="collapsible-body">
|
918 |
<p><?php
|
919 |
-
|
920 |
?></p>
|
921 |
<div><textarea readonly id="ftg-export-code"></textarea></div>
|
922 |
<button id="ftg-export" class="button"><i class="fa fa-download"></i> <?php
|
923 |
-
|
924 |
?></button>
|
925 |
</div>
|
926 |
</li>
|
927 |
<li>
|
928 |
<div class="collapsible-header"><?php
|
929 |
-
|
930 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
931 |
<div class="collapsible-body">
|
932 |
<ul class="collection">
|
933 |
<li class="collection-item">
|
934 |
<i class="fa fa-chevron-right"></i>
|
935 |
<a href="http://issuu.com/greentreelabs/docs/finaltilesgridgallery-documentation?e=17859916/13243836" target="_blank"><?php
|
936 |
-
|
937 |
?></a></li>
|
938 |
<li class="collection-item">
|
939 |
<i class="fa fa-chevron-right"></i>
|
940 |
<a target="_blank" href="https://www.youtube.com/watch?v=RNT4JGjtyrs">
|
941 |
<?php
|
942 |
-
|
943 |
?></a>
|
944 |
</li>
|
945 |
<li class="collection-item">
|
946 |
<i class="fa fa-chevron-right"></i>
|
947 |
<a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-additional-image-sizes-in-wordpress/" target="_blank"><?php
|
948 |
-
|
949 |
?></a>
|
950 |
</li>
|
951 |
</ul>
|
@@ -955,37 +955,37 @@ _e( 'How to add additional image sizes', 'final-tiles-grid-gallery-lite' );
|
|
955 |
<ul class="collapsible gallery-actions">
|
956 |
<li>
|
957 |
<div class="collapsible-header"><?php
|
958 |
-
|
959 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
960 |
<div class="collapsible-body">
|
961 |
<ul class="collapsible gallery-actions">
|
962 |
<li>
|
963 |
<div class="collapsible-header"><?php
|
964 |
-
|
965 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
966 |
<div class="collapsible-body">
|
967 |
<p><?php
|
968 |
-
|
969 |
?></p>
|
970 |
</div>
|
971 |
</li>
|
972 |
<li>
|
973 |
<div class="collapsible-header"><?php
|
974 |
-
|
975 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
976 |
<div class="collapsible-body">
|
977 |
<p><?php
|
978 |
-
|
979 |
?></p>
|
980 |
</div>
|
981 |
</li>
|
982 |
<li>
|
983 |
<div class="collapsible-header"><?php
|
984 |
-
|
985 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
986 |
<div class="collapsible-body">
|
987 |
<p><?php
|
988 |
-
|
989 |
?></p>
|
990 |
</div>
|
991 |
</li>
|
@@ -1002,34 +1002,34 @@ _e( 'You probably have chosen a small image size. Click the edit (pencil) icon o
|
|
1002 |
<div id="video-panel-model" class="modal">
|
1003 |
<div class="modal-content">
|
1004 |
<p><?php
|
1005 |
-
|
1006 |
?><strong><?php
|
1007 |
-
|
1008 |
?></strong>
|
1009 |
<?php
|
1010 |
-
|
1011 |
?> <strong><?php
|
1012 |
-
|
1013 |
?></strong> <?php
|
1014 |
-
|
1015 |
?><strong><?php
|
1016 |
-
|
1017 |
?></strong>)</p>
|
1018 |
<div class="text dark">
|
1019 |
<textarea></textarea>
|
1020 |
</div>
|
1021 |
<div class="field video-filters clearfix" ></div>
|
1022 |
<input type="hidden" id="filter-video" value="<?php
|
1023 |
-
print $gallery->filters;
|
1024 |
?>">
|
1025 |
</div>
|
1026 |
<input type="hidden" id="video-panel-action" >
|
1027 |
<div class="field buttons modal-footer">
|
1028 |
<a href="#" data-action="edit" class="action positive save modal-action modal-close waves-effect waves-green btn-flat"><?php
|
1029 |
-
|
1030 |
?></a>
|
1031 |
<a href="#" data-action="cancel" class="action neutral modal-action modal-close waves-effect waves-yellow btn-flat"><?php
|
1032 |
-
|
1033 |
?></a>
|
1034 |
</div>
|
1035 |
</div>
|
@@ -1039,7 +1039,7 @@ _e( 'Cancel', 'final-tiles-grid-gallery-lite' );
|
|
1039 |
<div id="image-panel-model" class="modal">
|
1040 |
<div class="modal-content cf">
|
1041 |
<h4><?php
|
1042 |
-
|
1043 |
?></h4>
|
1044 |
<div class="left">
|
1045 |
<div class="figure"></div>
|
@@ -1048,7 +1048,7 @@ _e( 'Edit image', 'final-tiles-grid-gallery-lite' );
|
|
1048 |
<div class="right-side">
|
1049 |
<div class="field">
|
1050 |
<label><?php
|
1051 |
-
|
1052 |
?></label>
|
1053 |
<div class="text">
|
1054 |
<textarea name="imageTitle"></textarea>
|
@@ -1056,7 +1056,7 @@ _e( 'Title', 'final-tiles-grid-gallery-lite' );
|
|
1056 |
</div>
|
1057 |
<div class="field">
|
1058 |
<label><?php
|
1059 |
-
|
1060 |
?></label>
|
1061 |
<div class="text">
|
1062 |
<textarea name="description"></textarea>
|
@@ -1064,9 +1064,9 @@ _e( 'Caption', 'final-tiles-grid-gallery-lite' );
|
|
1064 |
</div>
|
1065 |
<div class="field">
|
1066 |
<label><?php
|
1067 |
-
|
1068 |
?> <?php
|
1069 |
-
|
1070 |
?></label>
|
1071 |
<div class="text">
|
1072 |
<input type="text" name="alt" />
|
@@ -1076,7 +1076,7 @@ _e( '(leave empty to use title or description as ALT attribute)', 'final-tiles-g
|
|
1076 |
<input class="browser-default" id="hidden-image" type="checkbox" name="hidden" value="T" />
|
1077 |
<label for="hidden-image">
|
1078 |
<?php
|
1079 |
-
|
1080 |
?>
|
1081 |
</label>
|
1082 |
</div>
|
@@ -1086,26 +1086,26 @@ _e( 'Hidden, visible only with lightbox', 'final-tiles-grid-gallery-lite' );
|
|
1086 |
<tr>
|
1087 |
<td style="width: 60%">
|
1088 |
<label><?php
|
1089 |
-
|
1090 |
?></label><br>
|
1091 |
<input type="text" size="20" value="" name="link" />
|
1092 |
</td>
|
1093 |
<td>
|
1094 |
<label><?php
|
1095 |
-
|
1096 |
?></label>
|
1097 |
<select name="target" class="browser-default">
|
1098 |
<option value="default"><?php
|
1099 |
-
|
1100 |
?></option>
|
1101 |
<option value="_self"><?php
|
1102 |
-
|
1103 |
?></option>
|
1104 |
<option value="_blank"><?php
|
1105 |
-
|
1106 |
?></option>
|
1107 |
<option value="_lightbox"><?php
|
1108 |
-
|
1109 |
?></option>
|
1110 |
</select>
|
1111 |
</td>
|
@@ -1118,10 +1118,10 @@ _e( 'Open in lightbox (when using a lightbox)', 'final-tiles-grid-gallery-lite'
|
|
1118 |
</div>
|
1119 |
<div class="field buttons modal-footer">
|
1120 |
<a href="#" data-action="cancel" class="modal-close action button"><i class="mdi-content-reply"></i> <?php
|
1121 |
-
|
1122 |
?></a>
|
1123 |
<a href="#" data-action="save" class="modal-close button components-button is-primary"><i class="fa fa-save"></i> <?php
|
1124 |
-
|
1125 |
?></a>
|
1126 |
</div>
|
1127 |
</div>
|
@@ -1148,7 +1148,7 @@ $presetIdx = 0;
|
|
1148 |
foreach ( $ftg_fields as $section => $s ) {
|
1149 |
if ( array_key_exists( "presets", $s ) ) {
|
1150 |
foreach ( $s["presets"] as $preset => $values ) {
|
1151 |
-
echo "presets['preset_" . $presetIdx . "_" . $preset . "'] = " . json_encode( $values ) . ";\n" ;
|
1152 |
}
|
1153 |
}
|
1154 |
$presetIdx++;
|
7 |
|
8 |
if ( $ftg_options ) {
|
9 |
if ( array_key_exists( $field, $ftg_options ) ) {
|
10 |
+
print esc_html( $ftg_options[$field] );
|
11 |
}
|
12 |
return;
|
13 |
}
|
18 |
if ( $default === NULL ) {
|
19 |
print "";
|
20 |
} else {
|
21 |
+
print esc_html( $default );
|
22 |
}
|
23 |
|
24 |
} else {
|
25 |
+
print esc_html( $gallery->{$field} );
|
26 |
}
|
27 |
|
28 |
}
|
37 |
global $ftg_options ;
|
38 |
|
39 |
if ( $ftg_options && $ftg_options[$field] == $value ) {
|
40 |
+
print esc_attr( $type );
|
41 |
return;
|
42 |
}
|
43 |
|
46 |
print "";
|
47 |
} else {
|
48 |
if ( $gallery->{$field} == $value ) {
|
49 |
+
print esc_attr( $type );
|
50 |
}
|
51 |
}
|
52 |
|
68 |
|
69 |
function ftg_printPro( $plan )
|
70 |
{
|
71 |
+
return __( " (upgrade to unlock)", 'final-tiles-grid-gallery-lite' );
|
72 |
return "";
|
73 |
}
|
74 |
|
75 |
function ftg_printFieldPro( $options )
|
76 |
{
|
77 |
if ( is_array( $options ) && count( $options ) == 3 && $options[2] == "disabled" ) {
|
78 |
+
return __( " (upgrade to unlock)", 'final-tiles-grid-gallery-lite' );
|
79 |
}
|
80 |
return "";
|
81 |
}
|
118 |
echo ftg_checkDisabledOption( 'ultimate' ) ;
|
119 |
?>><?php
|
120 |
esc_html_e( 'Recent posts with featured image', 'final-tiles-grid-gallery-lite' );
|
121 |
+
echo esc_html( ftg_printPro( 'ultimate' ) ) ;
|
122 |
?></option>
|
123 |
<?php
|
124 |
|
129 |
?> value="woocommerce" <?php
|
130 |
echo ftg_checkDisabledOption( 'ultimate' ) ;
|
131 |
?>><?php
|
132 |
+
esc_html_e( 'WooCommerce products', 'final-tiles-grid-gallery-lite' );
|
133 |
+
echo esc_html( ftg_printPro( 'ultimate' ) ) ;
|
134 |
?></option>
|
135 |
<?php
|
136 |
}
|
140 |
<select class="current-image-size browser-default">
|
141 |
<?php
|
142 |
foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
|
143 |
+
echo '<option ' . (( $size == 'large' ? 'selected' : '' )) . ' value="' . esc_attr( $size ) . '">' . esc_html( $size ) . " (" . esc_html( implode( 'x', $atts ) ) . ")</option>" ;
|
144 |
}
|
145 |
?>
|
146 |
</select>
|
255 |
<option <?php
|
256 |
ftg_sel( $gallery, "taxonomyAsFilter", $t->label );
|
257 |
?> value="<?php
|
258 |
+
echo esc_attr( $t->label ) ;
|
259 |
?>"><?php
|
260 |
echo esc_html( $t->label ) ;
|
261 |
?></option>
|
400 |
<div class="actions source-woocommerce source-panel">
|
401 |
<div class="row checkboxes">
|
402 |
<strong class="label"><?php
|
403 |
+
esc_html_e( 'Categories', 'final-tiles-grid-gallery-lite' );
|
404 |
?>:</strong>
|
405 |
<span>
|
406 |
<?php
|
442 |
foreach ( $ftg_fields as $section => $s ) {
|
443 |
?>
|
444 |
<li id="<?php
|
445 |
+
echo esc_attr( FinalTiles_Gallery::slugify( $section ) ) ;
|
446 |
?>">
|
447 |
<div class="collapsible-header">
|
448 |
<i class="<?php
|
449 |
+
echo esc_attr( $s["icon"] ) ;
|
450 |
?> light-green darken-1 white-text ftg-section-icon"></i> <?php
|
451 |
esc_html_e( $section, 'final-tiles-grid-gallery-lite' );
|
452 |
?>
|
584 |
?>
|
585 |
<div class="text">
|
586 |
<a class="in-table-cta" href="<?php
|
587 |
+
echo esc_url( ftg_fs()->get_upgrade_url() ) ;
|
588 |
?>"><i class="mdi mdi-bell-ring-outline"></i>
|
589 |
<?php
|
590 |
esc_html_e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
|
596 |
?>
|
597 |
<div class="text">
|
598 |
<select class="browser-default" name="ftg_<?php
|
599 |
+
print esc_attr( $f );
|
600 |
?>">
|
601 |
<?php
|
602 |
foreach ( array_keys( $data["values"] ) as $optgroup ) {
|
620 |
echo esc_attr( $v[0] ) ;
|
621 |
?>"><?php
|
622 |
esc_html_e( $v[1], 'final-tiles-grid-gallery-lite' );
|
623 |
+
echo esc_html( ftg_printFieldPro( $v ) ) ;
|
624 |
?></option>
|
625 |
<?php
|
626 |
}
|
763 |
<textarea name="ftg_<?php
|
764 |
echo esc_attr( $f ) ;
|
765 |
?>"><?php
|
766 |
+
esc_textarea( ftg_p( $gallery, $f ) );
|
767 |
?></textarea>
|
768 |
</div>
|
769 |
<?php
|
798 |
|
799 |
?>
|
800 |
<div class="help" id="help-<?php
|
801 |
+
echo esc_attr( $f ) ;
|
802 |
?>">
|
803 |
<?php
|
804 |
|
806 |
?>
|
807 |
<div class="ftg-code">
|
808 |
<a href="#" class="toggle-shortcode" data-code="<?php
|
809 |
+
print esc_attr( $f );
|
810 |
?>"><i class="fa fa-eye-slash"></i></a>
|
811 |
<span id="shortcode-<?php
|
812 |
echo esc_attr( $f ) ;
|
813 |
?>">
|
814 |
<?php
|
815 |
+
esc_html_e( 'Shortcode attribute', 'final-tiles-grid-gallery-lite' );
|
816 |
?>:
|
817 |
<code class="shortcode-val"><?php
|
818 |
+
echo esc_html( FinalTilesGalleryUtils::fieldNameToShortcode( $f ) ) ;
|
819 |
?>="<?php
|
820 |
+
esc_html( ftg_p( $gallery, $f, $data["default"] ) );
|
821 |
?>"</code>
|
822 |
</span>
|
823 |
</div>
|
858 |
<ul class="collapsible gallery-actions">
|
859 |
<li class="active">
|
860 |
<div class="collapsible-header"><?php
|
861 |
+
esc_html_e( 'Upgrade', 'final-tiles-grid-gallery-lite' );
|
862 |
?>: <?php
|
863 |
esc_html_e( 'unlock features', 'final-tiles-grid-gallery-lite' );
|
864 |
?></div>
|
865 |
<div class="collapsible-body">
|
866 |
<div class="ftg-upsell">
|
867 |
<a href="<?php
|
868 |
+
echo esc_url( ftg_fs()->get_upgrade_url() ) ;
|
869 |
?>"><i class="fa fa-hand-o-right"></i> <?php
|
870 |
esc_html_e( 'Upgrade', 'final-tiles-grid-gallery-lite' );
|
871 |
?></a>
|
898 |
</li>
|
899 |
<li>
|
900 |
<div class="collapsible-header"><?php
|
901 |
+
esc_html_e( 'Import settings', 'final-tiles-grid-gallery-lite' );
|
902 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
903 |
<div class="collapsible-body">
|
904 |
<p><?php
|
912 |
</li>
|
913 |
<li>
|
914 |
<div class="collapsible-header"><?php
|
915 |
+
esc_html_e( 'Export settings', 'final-tiles-grid-gallery-lite' );
|
916 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
917 |
<div class="collapsible-body">
|
918 |
<p><?php
|
919 |
+
esc_html_e( 'Settings', 'final-tiles-grid-gallery-lite' );
|
920 |
?></p>
|
921 |
<div><textarea readonly id="ftg-export-code"></textarea></div>
|
922 |
<button id="ftg-export" class="button"><i class="fa fa-download"></i> <?php
|
923 |
+
esc_html_e( 'Refresh code', 'final-tiles-grid-gallery-lite' );
|
924 |
?></button>
|
925 |
</div>
|
926 |
</li>
|
927 |
<li>
|
928 |
<div class="collapsible-header"><?php
|
929 |
+
esc_html_e( 'Help', 'final-tiles-grid-gallery-lite' );
|
930 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
931 |
<div class="collapsible-body">
|
932 |
<ul class="collection">
|
933 |
<li class="collection-item">
|
934 |
<i class="fa fa-chevron-right"></i>
|
935 |
<a href="http://issuu.com/greentreelabs/docs/finaltilesgridgallery-documentation?e=17859916/13243836" target="_blank"><?php
|
936 |
+
esc_html_e( 'Documentation', 'final-tiles-grid-gallery-lite' );
|
937 |
?></a></li>
|
938 |
<li class="collection-item">
|
939 |
<i class="fa fa-chevron-right"></i>
|
940 |
<a target="_blank" href="https://www.youtube.com/watch?v=RNT4JGjtyrs">
|
941 |
<?php
|
942 |
+
esc_html_e( 'Tutorial', 'final-tiles-grid-gallery-lite' );
|
943 |
?></a>
|
944 |
</li>
|
945 |
<li class="collection-item">
|
946 |
<i class="fa fa-chevron-right"></i>
|
947 |
<a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-additional-image-sizes-in-wordpress/" target="_blank"><?php
|
948 |
+
esc_html_e( 'How to add additional image sizes', 'final-tiles-grid-gallery-lite' );
|
949 |
?></a>
|
950 |
</li>
|
951 |
</ul>
|
955 |
<ul class="collapsible gallery-actions">
|
956 |
<li>
|
957 |
<div class="collapsible-header"><?php
|
958 |
+
esc_html_e( 'FAQ', 'final-tiles-grid-gallery-lite' );
|
959 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
960 |
<div class="collapsible-body">
|
961 |
<ul class="collapsible gallery-actions">
|
962 |
<li>
|
963 |
<div class="collapsible-header"><?php
|
964 |
+
esc_html_e( 'How can I change the grid on mobile?', 'final-tiles-grid-gallery-lite' );
|
965 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
966 |
<div class="collapsible-body">
|
967 |
<p><?php
|
968 |
+
esc_html_e( 'You can customize the aspect of your galleries for any device. Find the options "Image size factor" into the "Advanced" section. Set a lower value to make images smaller and a higher value to make images larger.', 'final-tiles-grid-gallery-lite' );
|
969 |
?></p>
|
970 |
</div>
|
971 |
</li>
|
972 |
<li>
|
973 |
<div class="collapsible-header"><?php
|
974 |
+
esc_html_e( 'How to add a link to a picture?', 'final-tiles-grid-gallery-lite' );
|
975 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
976 |
<div class="collapsible-body">
|
977 |
<p><?php
|
978 |
+
esc_html_e( 'Click the edit (pencil) icon on the image and insert the link inside the "Link" field', 'final-tiles-grid-gallery-lite' );
|
979 |
?></p>
|
980 |
</div>
|
981 |
</li>
|
982 |
<li>
|
983 |
<div class="collapsible-header"><?php
|
984 |
+
esc_html_e( 'Why my images look blurry?', 'final-tiles-grid-gallery-lite' );
|
985 |
?> <svg class="components-panel__arrow" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><g><path fill="none" d="M0,0h24v24H0V0z"></path></g><g><path d="M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"></path></g></svg></div>
|
986 |
<div class="collapsible-body">
|
987 |
<p><?php
|
988 |
+
esc_html_e( 'You probably have chosen a small image size. Click the edit (pencil) icon on the blurry image and choose a larger size. Remember, you can choose the size before adding the images to the gallery', 'final-tiles-grid-gallery-lite' );
|
989 |
?></p>
|
990 |
</div>
|
991 |
</li>
|
1002 |
<div id="video-panel-model" class="modal">
|
1003 |
<div class="modal-content">
|
1004 |
<p><?php
|
1005 |
+
esc_html_e( 'Paste here the embed code (it must be an ', 'final-tiles-grid-gallery-lite' );
|
1006 |
?><strong><?php
|
1007 |
+
esc_html_e( 'iframe', 'final-tiles-grid-gallery-lite' );
|
1008 |
?></strong>
|
1009 |
<?php
|
1010 |
+
esc_html_e( 'and it must contain the attributes', 'final-tiles-grid-gallery-lite' );
|
1011 |
?> <strong><?php
|
1012 |
+
esc_html_e( 'width', 'final-tiles-grid-gallery-lite' );
|
1013 |
?></strong> <?php
|
1014 |
+
esc_html_e( 'and', 'final-tiles-grid-gallery-lite' );
|
1015 |
?><strong><?php
|
1016 |
+
esc_html_e( ' height', 'final-tiles-grid-gallery-lite' );
|
1017 |
?></strong>)</p>
|
1018 |
<div class="text dark">
|
1019 |
<textarea></textarea>
|
1020 |
</div>
|
1021 |
<div class="field video-filters clearfix" ></div>
|
1022 |
<input type="hidden" id="filter-video" value="<?php
|
1023 |
+
print esc_attr( $gallery->filters );
|
1024 |
?>">
|
1025 |
</div>
|
1026 |
<input type="hidden" id="video-panel-action" >
|
1027 |
<div class="field buttons modal-footer">
|
1028 |
<a href="#" data-action="edit" class="action positive save modal-action modal-close waves-effect waves-green btn-flat"><?php
|
1029 |
+
esc_html_e( 'Save', 'final-tiles-grid-gallery-lite' );
|
1030 |
?></a>
|
1031 |
<a href="#" data-action="cancel" class="action neutral modal-action modal-close waves-effect waves-yellow btn-flat"><?php
|
1032 |
+
esc_html_e( 'Cancel', 'final-tiles-grid-gallery-lite' );
|
1033 |
?></a>
|
1034 |
</div>
|
1035 |
</div>
|
1039 |
<div id="image-panel-model" class="modal">
|
1040 |
<div class="modal-content cf">
|
1041 |
<h4><?php
|
1042 |
+
esc_html_e( 'Edit image', 'final-tiles-grid-gallery-lite' );
|
1043 |
?></h4>
|
1044 |
<div class="left">
|
1045 |
<div class="figure"></div>
|
1048 |
<div class="right-side">
|
1049 |
<div class="field">
|
1050 |
<label><?php
|
1051 |
+
esc_html_e( 'Title', 'final-tiles-grid-gallery-lite' );
|
1052 |
?></label>
|
1053 |
<div class="text">
|
1054 |
<textarea name="imageTitle"></textarea>
|
1056 |
</div>
|
1057 |
<div class="field">
|
1058 |
<label><?php
|
1059 |
+
esc_html_e( 'Caption', 'final-tiles-grid-gallery-lite' );
|
1060 |
?></label>
|
1061 |
<div class="text">
|
1062 |
<textarea name="description"></textarea>
|
1064 |
</div>
|
1065 |
<div class="field">
|
1066 |
<label><?php
|
1067 |
+
esc_html_e( 'Alt', 'final-tiles-grid-gallery-lite' );
|
1068 |
?> <?php
|
1069 |
+
esc_html_e( '(leave empty to use title or description as ALT attribute)', 'final-tiles-grid-gallery-lite' );
|
1070 |
?></label>
|
1071 |
<div class="text">
|
1072 |
<input type="text" name="alt" />
|
1076 |
<input class="browser-default" id="hidden-image" type="checkbox" name="hidden" value="T" />
|
1077 |
<label for="hidden-image">
|
1078 |
<?php
|
1079 |
+
esc_html_e( 'Hidden, visible only with lightbox', 'final-tiles-grid-gallery-lite' );
|
1080 |
?>
|
1081 |
</label>
|
1082 |
</div>
|
1086 |
<tr>
|
1087 |
<td style="width: 60%">
|
1088 |
<label><?php
|
1089 |
+
esc_html_e( 'Link', 'final-tiles-grid-gallery-lite' );
|
1090 |
?></label><br>
|
1091 |
<input type="text" size="20" value="" name="link" />
|
1092 |
</td>
|
1093 |
<td>
|
1094 |
<label><?php
|
1095 |
+
esc_html_e( 'Link target', 'final-tiles-grid-gallery-lite' );
|
1096 |
?></label>
|
1097 |
<select name="target" class="browser-default">
|
1098 |
<option value="default"><?php
|
1099 |
+
esc_html_e( 'Default target', 'final-tiles-grid-gallery-lite' );
|
1100 |
?></option>
|
1101 |
<option value="_self"><?php
|
1102 |
+
esc_html_e( 'Open in same page', 'final-tiles-grid-gallery-lite' );
|
1103 |
?></option>
|
1104 |
<option value="_blank"><?php
|
1105 |
+
esc_html_e( 'Open in _blank', 'final-tiles-grid-gallery-lite' );
|
1106 |
?></option>
|
1107 |
<option value="_lightbox"><?php
|
1108 |
+
esc_html_e( 'Open in lightbox (when using a lightbox)', 'final-tiles-grid-gallery-lite' );
|
1109 |
?></option>
|
1110 |
</select>
|
1111 |
</td>
|
1118 |
</div>
|
1119 |
<div class="field buttons modal-footer">
|
1120 |
<a href="#" data-action="cancel" class="modal-close action button"><i class="mdi-content-reply"></i> <?php
|
1121 |
+
esc_html_e( 'Cancel', 'final-tiles-grid-gallery-lite' );
|
1122 |
?></a>
|
1123 |
<a href="#" data-action="save" class="modal-close button components-button is-primary"><i class="fa fa-save"></i> <?php
|
1124 |
+
esc_html_e( 'Save', 'final-tiles-grid-gallery-lite' );
|
1125 |
?></a>
|
1126 |
</div>
|
1127 |
</div>
|
1148 |
foreach ( $ftg_fields as $section => $s ) {
|
1149 |
if ( array_key_exists( "presets", $s ) ) {
|
1150 |
foreach ( $s["presets"] as $preset => $values ) {
|
1151 |
+
echo "presets['preset_" . absint( $presetIdx ) . "_" . esc_attr( $preset ) . "'] = " . json_encode( $values ) . ";\n" ;
|
1152 |
}
|
1153 |
}
|
1154 |
$presetIdx++;
|
admin/include/fields.php
CHANGED
@@ -206,7 +206,7 @@ $this->addField( "General", "layout", array(
|
|
206 |
"excludeFrom" => array(),
|
207 |
) );
|
208 |
$this->addField( "General", "width", array(
|
209 |
-
"name" => esc_html__( "Width" ),
|
210 |
"type" => "text",
|
211 |
"description" => esc_html__( "Width of the gallery in pixels or percentage.", "final-tiles-grid-gallery-lite" ),
|
212 |
"proCall" => false,
|
@@ -244,7 +244,7 @@ $this->addField( "General", "imagesOrder", array(
|
|
244 |
"excludeFrom" => array(),
|
245 |
) );
|
246 |
$this->addField( "General", "filter", array(
|
247 |
-
"name" => esc_html__( "Filters" ),
|
248 |
"type" => FinalTiles_Gallery::getFieldType( "filter" ),
|
249 |
"description" => esc_html__( "Manage here all the filters of this gallery", "final-tiles-grid-gallery-lite" ),
|
250 |
"proCall" => true,
|
206 |
"excludeFrom" => array(),
|
207 |
) );
|
208 |
$this->addField( "General", "width", array(
|
209 |
+
"name" => esc_html__( "Width", "final-tiles-grid-gallery-lite" ),
|
210 |
"type" => "text",
|
211 |
"description" => esc_html__( "Width of the gallery in pixels or percentage.", "final-tiles-grid-gallery-lite" ),
|
212 |
"proCall" => false,
|
244 |
"excludeFrom" => array(),
|
245 |
) );
|
246 |
$this->addField( "General", "filter", array(
|
247 |
+
"name" => esc_html__( "Filters", "final-tiles-grid-gallery-lite" ),
|
248 |
"type" => FinalTiles_Gallery::getFieldType( "filter" ),
|
249 |
"description" => esc_html__( "Manage here all the filters of this gallery", "final-tiles-grid-gallery-lite" ),
|
250 |
"proCall" => true,
|
admin/include/image-list.php
CHANGED
@@ -18,7 +18,7 @@ if(isset($gallery))
|
|
18 |
$thumb = plugins_url('../images/video.jpg', __FILE__);
|
19 |
?>
|
20 |
<div class='item card hidden-<?php echo esc_attr($image->hidden );?>' data-type='<?php echo esc_attr($image->type); ?>' data-image-id="<?php echo esc_attr($image->imageId); ?>" data-id="<?php echo esc_attr($image->Id); ?>">
|
21 |
-
<div class="figure card-image" style="background-image: url('<?php echo $thumb ?>');">
|
22 |
<?php if($image->type == 'image') : ?>
|
23 |
<img class="thumb" src="<?php echo esc_url(plugins_url('../images/square.gif', __FILE__)); ?>" />
|
24 |
<?php else : ?>
|
@@ -53,7 +53,7 @@ if(isset($gallery))
|
|
53 |
<?php endif ?>
|
54 |
|
55 |
<?php if(in_array($image->imagePath, $sizes)) : ?>
|
56 |
-
<span class='card-title'><?php echo array_search($image->imagePath, $sizes) ?></span>
|
57 |
<?php endif ?>
|
58 |
<?php if($image->hidden == "T") : ?>
|
59 |
<span class='card-hidden'><i class="mdi mdi-eye-off" title="Hidden image"></i></span>
|
18 |
$thumb = plugins_url('../images/video.jpg', __FILE__);
|
19 |
?>
|
20 |
<div class='item card hidden-<?php echo esc_attr($image->hidden );?>' data-type='<?php echo esc_attr($image->type); ?>' data-image-id="<?php echo esc_attr($image->imageId); ?>" data-id="<?php echo esc_attr($image->Id); ?>">
|
21 |
+
<div class="figure card-image" style="background-image: url('<?php echo esc_url( $thumb ); ?>');">
|
22 |
<?php if($image->type == 'image') : ?>
|
23 |
<img class="thumb" src="<?php echo esc_url(plugins_url('../images/square.gif', __FILE__)); ?>" />
|
24 |
<?php else : ?>
|
53 |
<?php endif ?>
|
54 |
|
55 |
<?php if(in_array($image->imagePath, $sizes)) : ?>
|
56 |
+
<span class='card-title'><?php echo esc_html( array_search($image->imagePath, $sizes) ); ?></span>
|
57 |
<?php endif ?>
|
58 |
<?php if($image->hidden == "T") : ?>
|
59 |
<span class='card-hidden'><i class="mdi mdi-eye-off" title="Hidden image"></i></span>
|
admin/include/tinymce-galleries.php
CHANGED
@@ -7,10 +7,10 @@
|
|
7 |
<script>
|
8 |
var wpColorPickerL10n = {"clear":"Clear","defaultString":"Default","pick":"Select Color","current":"Current Color"};
|
9 |
</script>
|
10 |
-
<script type="text/javascript" src="<?php print $admin_url ?>/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-slider,jquery-tou&load%5B%5D=ch-punch,iris,wp-color-picker"></script>
|
11 |
-
<link rel="stylesheet" href="<?php print admin_url( 'load-styles.php?c=1&dir=ltr&load=buttons,wp-admin,iris,wp-color-picker'); ?>" type="text/css" media="all">
|
12 |
-
<link rel="stylesheet" href="<?php print $css_path ?>">
|
13 |
-
<script language="javascript" type="text/javascript" src="<?php echo includes_url( 'js/tinymce/tiny_mce_popup.js' ).'?ver='.$wp_version; ?>"></script>
|
14 |
<style type="text/css">
|
15 |
h1
|
16 |
{
|
@@ -62,15 +62,15 @@
|
|
62 |
<?php foreach($galleries as $gallery): ?>
|
63 |
<tr>
|
64 |
<td>
|
65 |
-
<label id="<?php print 'gall_' . $gallery->Id ?>"> <?php print $gallery->name ?> </label>
|
66 |
</td>
|
67 |
|
68 |
<td>
|
69 |
-
<?php print !empty($gallery->source) ? $gallery->source : "images"; ?>
|
70 |
</td>
|
71 |
|
72 |
<td>
|
73 |
-
<?php print $gallery->Id ?>
|
74 |
</td>
|
75 |
</tr>
|
76 |
<?php endforeach ?>
|
7 |
<script>
|
8 |
var wpColorPickerL10n = {"clear":"Clear","defaultString":"Default","pick":"Select Color","current":"Current Color"};
|
9 |
</script>
|
10 |
+
<script type="text/javascript" src="<?php print esc_url( $admin_url ) ?>/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-slider,jquery-tou&load%5B%5D=ch-punch,iris,wp-color-picker"></script>
|
11 |
+
<link rel="stylesheet" href="<?php print esc_url( admin_url( 'load-styles.php?c=1&dir=ltr&load=buttons,wp-admin,iris,wp-color-picker') ); ?>" type="text/css" media="all">
|
12 |
+
<link rel="stylesheet" href="<?php print esc_url( $css_path ) ?>">
|
13 |
+
<script language="javascript" type="text/javascript" src="<?php echo esc_url( includes_url( 'js/tinymce/tiny_mce_popup.js' ).'?ver='.$wp_version); ?>"></script>
|
14 |
<style type="text/css">
|
15 |
h1
|
16 |
{
|
62 |
<?php foreach($galleries as $gallery): ?>
|
63 |
<tr>
|
64 |
<td>
|
65 |
+
<label id="<?php print 'gall_' . esc_attr( $gallery->Id ) ?>"> <?php print esc_html( $gallery->name ); ?> </label>
|
66 |
</td>
|
67 |
|
68 |
<td>
|
69 |
+
<?php print !empty($gallery->source) ? esc_html( $gallery->source ) : "images"; ?>
|
70 |
</td>
|
71 |
|
72 |
<td>
|
73 |
+
<?php print esc_html( $gallery->Id ); ?>
|
74 |
</td>
|
75 |
</tr>
|
76 |
<?php endforeach ?>
|
admin/overview.php
CHANGED
@@ -7,8 +7,8 @@
|
|
7 |
?>
|
8 |
|
9 |
<div class="bd wrap">
|
10 |
-
<h1 class="wp-heading-inline"><?php echo esc_html('Final Tiles Gallery') ?> <small><?php echo FTGVERSION . " " . FTG_PLAN ?></small></h1>
|
11 |
-
<h2 class="ftg-subtitle"><?php
|
12 |
<hr class="wp-header-end">
|
13 |
<?php if(count($galleries) == 0) : ?>
|
14 |
<div class="row ">
|
@@ -16,7 +16,7 @@
|
|
16 |
<div class="card-panel light-green lighten-4">
|
17 |
<h5 class="cyan-text text-darken-3"><?php esc_html_e('Welcome to Final Tiles Grid Gallery!', 'final-tiles-grid-gallery-lite')?></h5>
|
18 |
<p>
|
19 |
-
<?php esc_html_e('Create your first awesome gallery, click', 'final-tiles-grid-gallery-lite')?> <a href="<?php echo admin_url('admin.php?page=ftg-add-gallery'); ?>"><?php esc_html_e('here', 'final-tiles-grid-gallery-lite')?></a>.
|
20 |
</p>
|
21 |
</div>
|
22 |
</div>
|
@@ -27,7 +27,7 @@
|
|
27 |
<div class="collapsible-header"><?php esc_html_e('Upgrade', 'final-tiles-grid-gallery-lite') ?>: <?php esc_html_e('unlock features', 'final-tiles-grid-gallery-lite') ?></div>
|
28 |
<div class="collapsible-body">
|
29 |
<div class="ftg-upsell">
|
30 |
-
<a href="<?php echo ftg_fs()->get_upgrade_url() ?>"><i class="fa fa-hand-o-right"></i> <?php esc_html_e('Upgrade', 'final-tiles-grid-gallery-lite') ?></a>
|
31 |
</div>
|
32 |
</div>
|
33 |
</li>
|
@@ -63,11 +63,11 @@
|
|
63 |
<tr id="gallery-<?php echo absint($gallery->Id); ?>" class="iedit author-self level-0 post-10 type-post status-publish format-standard hentry">
|
64 |
<td class="title column-title has-row-actions column-primary page-title" data-colname="Title">
|
65 |
<strong>
|
66 |
-
<a href="<?php echo admin_url('?page=ftg-lite-gallery-admin&id='.absint($gallery->Id)); ?>"><?php echo esc_html($gallery->name); ?></a>
|
67 |
</strong>
|
68 |
<div class="row-actions">
|
69 |
<span class="edit">
|
70 |
-
<a href="<?php echo admin_url('?page=ftg-lite-gallery-admin&id=' . absint( $gallery->Id ) ); ?>" aria-label="Edit"><?php esc_html_e("Edit","final-tiles-grid-gallery-lite") ?></a> |
|
71 |
</span>
|
72 |
<span class="edit">
|
73 |
<a href="#" class="clone-gallery" data-gid="<?php echo absint($gallery->Id); ?>" aria-label="Clone"><?php esc_html_e("Clone gallery","final-tiles-grid-gallery-lite") ?></a> |
|
@@ -96,10 +96,10 @@
|
|
96 |
<?php if (ftg_fs()->is_not_paying() ) : ?>
|
97 |
<ul class="collapsible gallery-actions">
|
98 |
<li class="active">
|
99 |
-
<div class="collapsible-header"><?php
|
100 |
<div class="collapsible-body">
|
101 |
<div class="ftg-upsell">
|
102 |
-
<a href="<?php echo ftg_fs()->get_upgrade_url() ?>"><i class="fa fa-hand-o-right"></i> <?php esc_html_e('Upgrade', 'final-tiles-grid-gallery-lite') ?></a>
|
103 |
</div>
|
104 |
</div>
|
105 |
</li>
|
@@ -112,7 +112,7 @@
|
|
112 |
<?php esc_html_e('Redeem your coupon', 'final-tiles-grid-gallery-lite')?>
|
113 |
</div>
|
114 |
<div class="collapsible-body">
|
115 |
-
<a href="<?php echo admin_url('admin.php?page=ftg-add-gallery'); ?>" class="button components-button is-primary"><?php esc_html_e('Add gallery', 'final-tiles-grid-gallery-lite')?></a>
|
116 |
<a href="#" class="no-thank-you"><?php esc_html_e('No, thank you', 'final-tiles-grid-gallery-lite') ?></a>
|
117 |
</div>
|
118 |
</li>
|
@@ -124,7 +124,7 @@
|
|
124 |
<?php esc_html_e('Galleries', 'final-tiles-grid-gallery-lite')?>
|
125 |
</div>
|
126 |
<div class="collapsible-body">
|
127 |
-
<a href="<?php echo admin_url('admin.php?page=ftg-add-gallery');?>" class="button components-button is-primary"><?php esc_html_e('Add gallery', 'final-tiles-grid-gallery-lite')?></a>
|
128 |
</div>
|
129 |
</li>
|
130 |
</ul>
|
7 |
?>
|
8 |
|
9 |
<div class="bd wrap">
|
10 |
+
<h1 class="wp-heading-inline"><?php echo esc_html('Final Tiles Gallery') ?> <small><?php echo esc_html( FTGVERSION ) . " " . esc_html( FTG_PLAN ); ?></small></h1>
|
11 |
+
<h2 class="ftg-subtitle"><?php esc_html_e('Galleries','final-tiles-grid-gallery-lite') ?></h2>
|
12 |
<hr class="wp-header-end">
|
13 |
<?php if(count($galleries) == 0) : ?>
|
14 |
<div class="row ">
|
16 |
<div class="card-panel light-green lighten-4">
|
17 |
<h5 class="cyan-text text-darken-3"><?php esc_html_e('Welcome to Final Tiles Grid Gallery!', 'final-tiles-grid-gallery-lite')?></h5>
|
18 |
<p>
|
19 |
+
<?php esc_html_e('Create your first awesome gallery, click', 'final-tiles-grid-gallery-lite')?> <a href="<?php echo esc_url( admin_url('admin.php?page=ftg-add-gallery') ); ?>"><?php esc_html_e('here', 'final-tiles-grid-gallery-lite')?></a>.
|
20 |
</p>
|
21 |
</div>
|
22 |
</div>
|
27 |
<div class="collapsible-header"><?php esc_html_e('Upgrade', 'final-tiles-grid-gallery-lite') ?>: <?php esc_html_e('unlock features', 'final-tiles-grid-gallery-lite') ?></div>
|
28 |
<div class="collapsible-body">
|
29 |
<div class="ftg-upsell">
|
30 |
+
<a href="<?php echo esc_url( ftg_fs()->get_upgrade_url() ); ?>"><i class="fa fa-hand-o-right"></i> <?php esc_html_e('Upgrade', 'final-tiles-grid-gallery-lite') ?></a>
|
31 |
</div>
|
32 |
</div>
|
33 |
</li>
|
63 |
<tr id="gallery-<?php echo absint($gallery->Id); ?>" class="iedit author-self level-0 post-10 type-post status-publish format-standard hentry">
|
64 |
<td class="title column-title has-row-actions column-primary page-title" data-colname="Title">
|
65 |
<strong>
|
66 |
+
<a href="<?php echo esc_url( admin_url('?page=ftg-lite-gallery-admin&id='.absint($gallery->Id) ) ); ?>"><?php echo esc_html($gallery->name); ?></a>
|
67 |
</strong>
|
68 |
<div class="row-actions">
|
69 |
<span class="edit">
|
70 |
+
<a href="<?php echo esc_url( admin_url('?page=ftg-lite-gallery-admin&id=' . absint( $gallery->Id ) ) ); ?>" aria-label="Edit"><?php esc_html_e("Edit","final-tiles-grid-gallery-lite") ?></a> |
|
71 |
</span>
|
72 |
<span class="edit">
|
73 |
<a href="#" class="clone-gallery" data-gid="<?php echo absint($gallery->Id); ?>" aria-label="Clone"><?php esc_html_e("Clone gallery","final-tiles-grid-gallery-lite") ?></a> |
|
96 |
<?php if (ftg_fs()->is_not_paying() ) : ?>
|
97 |
<ul class="collapsible gallery-actions">
|
98 |
<li class="active">
|
99 |
+
<div class="collapsible-header"><?php esc_html_e('Upgrade', 'final-tiles-grid-gallery-lite') ?>: <?php esc_html_e('unlock features', 'final-tiles-grid-gallery-lite') ?></div>
|
100 |
<div class="collapsible-body">
|
101 |
<div class="ftg-upsell">
|
102 |
+
<a href="<?php echo esc_url( ftg_fs()->get_upgrade_url() ); ?>"><i class="fa fa-hand-o-right"></i> <?php esc_html_e('Upgrade', 'final-tiles-grid-gallery-lite') ?></a>
|
103 |
</div>
|
104 |
</div>
|
105 |
</li>
|
112 |
<?php esc_html_e('Redeem your coupon', 'final-tiles-grid-gallery-lite')?>
|
113 |
</div>
|
114 |
<div class="collapsible-body">
|
115 |
+
<a href="<?php echo esc_url( admin_url('admin.php?page=ftg-add-gallery') ); ?>" class="button components-button is-primary"><?php esc_html_e('Add gallery', 'final-tiles-grid-gallery-lite')?></a>
|
116 |
<a href="#" class="no-thank-you"><?php esc_html_e('No, thank you', 'final-tiles-grid-gallery-lite') ?></a>
|
117 |
</div>
|
118 |
</li>
|
124 |
<?php esc_html_e('Galleries', 'final-tiles-grid-gallery-lite')?>
|
125 |
</div>
|
126 |
<div class="collapsible-body">
|
127 |
+
<a href="<?php echo esc_url( admin_url('admin.php?page=ftg-add-gallery') );?>" class="button components-button is-primary"><?php esc_html_e('Add gallery', 'final-tiles-grid-gallery-lite')?></a>
|
128 |
</div>
|
129 |
</li>
|
130 |
</ul>
|
lib/gallery-class.php
CHANGED
@@ -430,7 +430,7 @@ if ( !class_exists( "FinalTilesGallery" ) ) {
|
|
430 |
}
|
431 |
$html .= "</style>\n";
|
432 |
$filtersSlugs = array_map( "FinalTilesGallery::slugify", explode( '|', $gallery->filters ) );
|
433 |
-
$current_filter = ( isset( $_GET['ftg-set'] ) ? $_GET['ftg-set'] : null );
|
434 |
if ( $gallery->captionMobileBehavior == "desktop" ) {
|
435 |
$gallery->captionMobileBehavior = $gallery->captionBehavior;
|
436 |
}
|
@@ -617,7 +617,7 @@ if ( !class_exists( "FinalTilesGallery" ) ) {
|
|
617 |
{
|
618 |
$rid = $this->id;
|
619 |
$gallery = $this->gallery;
|
620 |
-
$current_filter = ( isset( $_GET['ftg-set'] ) ? $_GET['ftg-set'] : null );
|
621 |
$html = "";
|
622 |
$lightbox = ( wp_is_mobile() ? ( $gallery->mobileLightbox == "desktop" ? esc_attr( $gallery->lightbox ) : esc_attr( $gallery->mobileLightbox ) ) : esc_attr( $gallery->lightbox ) );
|
623 |
$groups = array();
|
@@ -892,7 +892,7 @@ if ( !class_exists( "FinalTilesGallery" ) ) {
|
|
892 |
sort( $fields );
|
893 |
print "\n<!-- \n";
|
894 |
foreach ( $fields as $item ) {
|
895 |
-
echo "\t[
|
896 |
}
|
897 |
print "\n -->\n";
|
898 |
}
|
430 |
}
|
431 |
$html .= "</style>\n";
|
432 |
$filtersSlugs = array_map( "FinalTilesGallery::slugify", explode( '|', $gallery->filters ) );
|
433 |
+
$current_filter = ( isset( $_GET['ftg-set'] ) ? sanitize_text_field( wp_unslash( $_GET['ftg-set'] ) ) : null );
|
434 |
if ( $gallery->captionMobileBehavior == "desktop" ) {
|
435 |
$gallery->captionMobileBehavior = $gallery->captionBehavior;
|
436 |
}
|
617 |
{
|
618 |
$rid = $this->id;
|
619 |
$gallery = $this->gallery;
|
620 |
+
$current_filter = ( isset( $_GET['ftg-set'] ) ? sanitize_text_field( wp_unslash( $_GET['ftg-set'] ) ) : null );
|
621 |
$html = "";
|
622 |
$lightbox = ( wp_is_mobile() ? ( $gallery->mobileLightbox == "desktop" ? esc_attr( $gallery->lightbox ) : esc_attr( $gallery->mobileLightbox ) ) : esc_attr( $gallery->lightbox ) );
|
623 |
$groups = array();
|
892 |
sort( $fields );
|
893 |
print "\n<!-- \n";
|
894 |
foreach ( $fields as $item ) {
|
895 |
+
echo "\t" . esc_html( [ $item ] ) . " : " . esc_html( $debug[$item] ) . "\n" ;
|
896 |
}
|
897 |
print "\n -->\n";
|
898 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: wpchill, silkalns, freemius
|
|
3 |
Tags: gallery, grid gallery, best gallery plugin, free gallery, gallery plugin, gallery grid plugin, masonry, photo gallery, image gallery, social gallery, portfolio gallery, lightbox, justified gallery
|
4 |
Requires at least: 5.2
|
5 |
Tested up to: 5.8
|
6 |
-
Stable tag: 3.5.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -125,6 +125,10 @@ Currently galleries made with Envira, FooGallery, Instagram, NextGen, JetPack, M
|
|
125 |
|
126 |
== Changelog ==
|
127 |
|
|
|
|
|
|
|
|
|
128 |
= 3.5.2 - 10/01/2022 =
|
129 |
- Removed: Google Plus
|
130 |
- Fixed: Gallery images Would not show
|
3 |
Tags: gallery, grid gallery, best gallery plugin, free gallery, gallery plugin, gallery grid plugin, masonry, photo gallery, image gallery, social gallery, portfolio gallery, lightbox, justified gallery
|
4 |
Requires at least: 5.2
|
5 |
Tested up to: 5.8
|
6 |
+
Stable tag: 3.5.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
125 |
|
126 |
== Changelog ==
|
127 |
|
128 |
+
= 3.5.3 - 17/01/2022 =
|
129 |
+
- Fixed: Security fixes regarding sanitization and escaping
|
130 |
+
|
131 |
+
|
132 |
= 3.5.2 - 10/01/2022 =
|
133 |
- Removed: Google Plus
|
134 |
- Fixed: Gallery images Would not show
|