Version Description
- Escaping and Sanitization
- Fixed edit link in admin dashboard
Download this release
Release Info
Developer | giucu91 |
Plugin | Image Photo Gallery Final Tiles Grid |
Version | 3.4.19 |
Comparing to | |
See all releases |
Code changes from version 3.4.18 to 3.4.19
- FinalTilesGalleryLite.php +94 -94
- admin/add-gallery.php +73 -55
- admin/edit-gallery.php +12 -12
- admin/facebook.php +1 -1
- admin/header.php +2 -2
- admin/include/edit-gallery.php +748 -738
- admin/include/fields.php +155 -155
- admin/include/image-list.php +26 -26
- admin/overview.php +37 -37
- lib/db-class.php +10 -10
- lib/gallery-class.php +85 -85
- readme.txt +5 -2
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.4.
|
7 |
* Author: MachoThemes
|
8 |
* Author URI: https://www.machothemes.com
|
9 |
* Tested up to: 5.2
|
@@ -24,7 +24,7 @@
|
|
24 |
* Original Author URI: https://greentreelabs.net
|
25 |
* Original Author: https://profiles.wordpress.org/greentreealbs/
|
26 |
*/
|
27 |
-
define( "FTGVERSION", "3.4.
|
28 |
// Create a helper function for easy SDK access.
|
29 |
|
30 |
if ( !function_exists( "ftg_fs" ) ) {
|
@@ -283,7 +283,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
283 |
wp_set_script_translations( 'FinalTiles-gallery', 'final-tiles-gallery', dirname( plugin_basename( __FILE__ ) ) . '/lib/languages/' );
|
284 |
$galls = [ [
|
285 |
'value' => 0,
|
286 |
-
'label' =>
|
287 |
] ];
|
288 |
$galleries = $this->FinalTilesdb->getGalleries();
|
289 |
if ( $galleries ) {
|
@@ -365,20 +365,20 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
365 |
?>
|
366 |
<div class="notice notice-info is-dismissible ftg-review-notice">
|
367 |
<p><?php
|
368 |
-
|
369 |
?></p>
|
370 |
<p><strong><?php
|
371 |
-
|
372 |
?></strong></p>
|
373 |
<p>
|
374 |
<a href="https://wordpress.org/support/plugin/final-tiles-grid-gallery-lite/reviews/?filter=5#new-post" class="ftg-dismiss-review-notice ftg-review-out" target="_blank" rel="noopener"><?php
|
375 |
-
|
376 |
?></a><br>
|
377 |
<a href="#" class="ftg-dismiss-review-notice" rel="noopener"><?php
|
378 |
-
|
379 |
?></a><br>
|
380 |
<a href="#" class="ftg-dismiss-review-notice" rel="noopener"><?php
|
381 |
-
|
382 |
?></a><br>
|
383 |
</p>
|
384 |
</div>
|
@@ -417,7 +417,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
417 |
global $current_screen ;
|
418 |
|
419 |
if ( !empty($current_screen->id) && strpos( $current_screen->id, 'ftg' ) !== false ) {
|
420 |
-
$url = 'https://wordpress.org/support/plugin/final-tiles-grid-gallery-lite/reviews/?filter=5#new-post';
|
421 |
$text = sprintf( __( 'Please rate <strong>Final Tiles Gallery</strong> <a href="%s" target="_blank">★★★★★</a> on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the Final Tiles Gallery team!', 'final-tiles-grid-gallery-lite' ), $url, $url );
|
422 |
}
|
423 |
|
@@ -481,7 +481,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
481 |
load_plugin_textdomain( 'final-tiles-grid-gallery-lite', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
482 |
foreach ( $this->fields as $s => $section ) {
|
483 |
foreach ( $section["fields"] as $f => $field ) {
|
484 |
-
$this->fields[$s]["fields"][$f]["description"] =
|
485 |
}
|
486 |
}
|
487 |
}
|
@@ -556,10 +556,10 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
556 |
public function attachment_fields_to_save( $post, $attachment )
|
557 |
{
|
558 |
if ( isset( $attachment['ftg_link'] ) ) {
|
559 |
-
update_post_meta( $post['ID'], '_ftg_link', $attachment['ftg_link'] );
|
560 |
}
|
561 |
if ( isset( $attachment['ftg_target'] ) ) {
|
562 |
-
update_post_meta( $post['ID'], '_ftg_target', $attachment['ftg_target'] );
|
563 |
}
|
564 |
return $post;
|
565 |
}
|
@@ -739,8 +739,8 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
739 |
);
|
740 |
$add_gallery = add_submenu_page(
|
741 |
'ftg-lite-gallery-admin',
|
742 |
-
|
743 |
-
|
744 |
'edit_posts',
|
745 |
'ftg-add-gallery',
|
746 |
array( $this, 'add_gallery' )
|
@@ -872,12 +872,12 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
872 |
|
873 |
if ( $_POST['source'] == 'posts' ) {
|
874 |
foreach ( explode( ",", $_POST["id"] ) as $id ) {
|
875 |
-
update_post_meta( intval( $id ), 'ftg_filters', $_POST['filters'] );
|
876 |
}
|
877 |
} else {
|
878 |
foreach ( explode( ",", $_POST["id"] ) as $id ) {
|
879 |
$result = $this->FinalTilesdb->editImage( $id, array(
|
880 |
-
"filters" => $_POST["filters"],
|
881 |
) );
|
882 |
}
|
883 |
}
|
@@ -905,12 +905,12 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
905 |
|
906 |
if ( $_POST['source'] == 'posts' ) {
|
907 |
foreach ( explode( ",", $_POST["id"] ) as $id ) {
|
908 |
-
update_post_meta( intval( $id ), 'ftg_group', $_POST['group'] );
|
909 |
}
|
910 |
} else {
|
911 |
foreach ( explode( ",", $_POST["id"] ) as $id ) {
|
912 |
$result = $this->FinalTilesdb->editImage( $id, array(
|
913 |
-
"group" => $_POST["group"],
|
914 |
) );
|
915 |
}
|
916 |
}
|
@@ -1008,20 +1008,20 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1008 |
$result = true;
|
1009 |
$postId = intval( $_POST['post_id'] );
|
1010 |
$img_url = stripslashes( $_POST['img_url'] );
|
1011 |
-
update_post_meta( $postId, 'ftg_image_url', $img_url );
|
1012 |
if ( array_key_exists( "filters", $_POST ) && strlen( $_POST['filters'] ) ) {
|
1013 |
-
update_post_meta( $postId, 'ftg_filters', $_POST['filters'] );
|
1014 |
}
|
1015 |
} else {
|
1016 |
-
$type = $_POST['type'];
|
1017 |
$imageUrl = stripslashes( $_POST['img_url'] );
|
1018 |
-
$imageCaption =
|
1019 |
$filters = stripslashes( $_POST['filters'] );
|
1020 |
-
$title =
|
1021 |
-
$target = $_POST['target'];
|
1022 |
-
$group = $_POST['group'];
|
1023 |
-
$alt = $_POST['alt'];
|
1024 |
-
$hidden = $
|
1025 |
$link = ( isset( $_POST['link'] ) ? stripslashes( $_POST['link'] ) : null );
|
1026 |
$imageId = intval( $_POST['img_id'] );
|
1027 |
$sortOrder = intval( $_POST['sortOrder'] );
|
@@ -1070,7 +1070,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1070 |
$type = ( isset( $_POST['type'] ) ? $_POST['type'] : "" );
|
1071 |
$data = array(
|
1072 |
"imagePath" => stripslashes( $_POST["embed"] ),
|
1073 |
-
"filters" =>
|
1074 |
"gid" => intval( $_POST['galleryId'] ),
|
1075 |
);
|
1076 |
$id = ( isset( $_POST['id'] ) ? intval( $_POST['id'] ) : "" );
|
@@ -1133,17 +1133,17 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1133 |
|
1134 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1135 |
$data = $this->defaultValues;
|
1136 |
-
$data["name"] = $_POST['ftg_name'];
|
1137 |
-
$data["description"] = $_POST['ftg_description'];
|
1138 |
-
$data["source"] = $_POST['ftg_source'];
|
1139 |
-
$data["wp_field_caption"] = $_POST['ftg_wp_field_caption'];
|
1140 |
-
$data["wp_field_title"] = $_POST['ftg_wp_field_title'];
|
1141 |
-
$data["captionEffect"] = $_POST['ftg_captionEffect'];
|
1142 |
-
$data["post_types"] = $_POST["post_types"];
|
1143 |
-
$data["layout"] = $_POST["layout"];
|
1144 |
-
$data["defaultWooImageSize"] = $_POST['def_imgsize'];
|
1145 |
-
$data["defaultPostImageSize"] = $_POST['def_imgsize'];
|
1146 |
-
$data["woo_categories"] = $_POST["woo_categories"];
|
1147 |
$result = $this->FinalTilesdb->addGallery( $data );
|
1148 |
$id = $this->FinalTilesdb->getNewGalleryId();
|
1149 |
|
@@ -1179,40 +1179,40 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1179 |
$margin = intval( $_POST['ftg_margin'] );
|
1180 |
$minTileWidth = intval( $_POST['ftg_minTileWidth'] );
|
1181 |
$gridCellSize = intval( $_POST['ftg_gridCellSize'] );
|
1182 |
-
$imagesOrder = $_POST['ftg_imagesOrder'];
|
1183 |
-
$width = $_POST['ftg_width'];
|
1184 |
$enableTwitter = $this->checkboxVal( 'ftg_enableTwitter' );
|
1185 |
$filterClick = $this->checkboxVal( 'ftg_filterClick' );
|
1186 |
$enableFacebook = $this->checkboxVal( 'ftg_enableFacebook' );
|
1187 |
$enableGplus = $this->checkboxVal( 'ftg_enableGplus' );
|
1188 |
$enablePinterest = $this->checkboxVal( 'ftg_enablePinterest' );
|
1189 |
-
$lightbox = $_POST['ftg_lightbox'];
|
1190 |
-
$mobileLightbox = $_POST['ftg_mobileLightbox'];
|
1191 |
$blank = $this->checkboxVal( 'ftg_blank' );
|
1192 |
-
$filters = $_POST['ftg_filters'];
|
1193 |
$scrollEffect = $_POST['ftg_scrollEffect'];
|
1194 |
-
$captionBehavior = $_POST['ftg_captionBehavior'];
|
1195 |
-
$captionMobileBehavior = $_POST['ftg_captionMobileBehavior'];
|
1196 |
-
$captionEffect = $_POST['ftg_captionEffect'];
|
1197 |
-
$captionColor = $_POST['ftg_captionColor'];
|
1198 |
-
$captionBackgroundColor = $_POST['ftg_captionBackgroundColor'];
|
1199 |
-
$captionEasing = $_POST['ftg_captionEasing'];
|
1200 |
-
$captionHorizontalAlignment = $_POST['ftg_captionHorizontalAlignment'];
|
1201 |
-
$captionVerticalAlignment = $_POST['ftg_captionVerticalAlignment'];
|
1202 |
-
$captionEmpty = $_POST['ftg_captionEmpty'];
|
1203 |
$captionOpacity = intval( $_POST['ftg_captionOpacity'] );
|
1204 |
$borderSize = intval( $_POST['ftg_borderSize'] );
|
1205 |
-
$borderColor = $_POST['ftg_borderColor'];
|
1206 |
$titleFontSize = intval( $_POST['ftg_titleFontSize'] );
|
1207 |
-
$loadingBarColor = $_POST['ftg_loadingBarColor'];
|
1208 |
-
$loadingBarBackgroundColor = $_POST['ftg_loadingBarBackgroundColor'];
|
1209 |
$borderRadius = intval( $_POST['ftg_borderRadius'] );
|
1210 |
-
$allFilterLabel = $_POST['ftg_allFilterLabel'];
|
1211 |
-
$shadowColor = $_POST['ftg_shadowColor'];
|
1212 |
$shadowSize = intval( $_POST['ftg_shadowSize'] );
|
1213 |
$enlargeImages = $this->checkboxVal( 'ftg_enlargeImages' );
|
1214 |
-
$wp_field_caption = $_POST['ftg_wp_field_caption'];
|
1215 |
-
$wp_field_title = $_POST['ftg_wp_field_title'];
|
1216 |
$style = $_POST['ftg_style'];
|
1217 |
$script = $_POST['ftg_script'];
|
1218 |
$loadedHSlide = intval( $_POST['ftg_loadedHSlide'] );
|
@@ -1220,16 +1220,16 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1220 |
$captionEffectDuration = intval( $_POST['ftg_captionEffectDuration'] );
|
1221 |
$id = ( isset( $_POST['ftg_gallery_edit'] ) ? intval( $_POST['ftg_gallery_edit'] ) : 0 );
|
1222 |
$data = array(
|
1223 |
-
'ajaxLoading' => $_POST['ftg_ajaxLoading'],
|
1224 |
-
'layout' => $_POST['ftg_layout'],
|
1225 |
'name' => $galleryName,
|
1226 |
'slug' => $slug,
|
1227 |
'description' => $galleryDescription,
|
1228 |
'lightbox' => $lightbox,
|
1229 |
-
'lightboxOptions' => $_POST['ftg_lightboxOptions'],
|
1230 |
-
'lightboxOptionsMobile' => $_POST['lightboxOptionsMobile'],
|
1231 |
'mobileLightbox' => $mobileLightbox,
|
1232 |
-
'lightboxImageSize' => $_POST['ftg_lightboxImageSize'],
|
1233 |
'blank' => $blank,
|
1234 |
'margin' => $margin,
|
1235 |
'allFilterLabel' => $allFilterLabel,
|
@@ -1237,41 +1237,41 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1237 |
'gridCellSize' => $gridCellSize,
|
1238 |
'gridCellSizeDisabledBelow' => intval( $_POST['ftg_gridCellSizeDisabledBelow'] ),
|
1239 |
'enableTwitter' => $enableTwitter,
|
1240 |
-
'backgroundColor' => $_POST['ftg_backgroundColor'],
|
1241 |
'filterClick' => $filterClick,
|
1242 |
'disableLightboxGroups' => $this->checkboxVal( 'ftg_disableLightboxGroups' ),
|
1243 |
-
'defaultFilter' => $_POST['ftg_filterDef'],
|
1244 |
'enableFacebook' => $enableFacebook,
|
1245 |
'enableGplus' => $enableGplus,
|
1246 |
'enablePinterest' => $enablePinterest,
|
1247 |
'imagesOrder' => $imagesOrder,
|
1248 |
'compressHTML' => $this->checkboxVal( 'ftg_compressHTML' ),
|
1249 |
-
'loadMethod' => $_POST['ftg_loadMethod'],
|
1250 |
-
'socialIconColor' => $_POST['ftg_socialIconColor'],
|
1251 |
-
'socialIconPosition' => $_POST['ftg_socialIconPosition'],
|
1252 |
-
'socialIconStyle' => $_POST['ftg_socialIconStyle'],
|
1253 |
-
'recentPostsCaption' => $_POST['ftg_recentPostsCaption'],
|
1254 |
'recentPostsCaptionAutoExcerptLength' => intval( $_POST['ftg_recentPostsCaptionAutoExcerptLength'] ),
|
1255 |
'captionBehavior' => $captionBehavior,
|
1256 |
'captionEffect' => $captionEffect,
|
1257 |
'captionEmpty' => $captionEmpty,
|
1258 |
'captionBackgroundColor' => $captionBackgroundColor,
|
1259 |
'captionColor' => $captionColor,
|
1260 |
-
'captionCustomFields' => $_POST['ftg_captionCustomFields'],
|
1261 |
-
'captionFrameColor' => $_POST['ftg_captionFrameColor'],
|
1262 |
'captionEffectDuration' => $captionEffectDuration,
|
1263 |
'captionEasing' => $captionEasing,
|
1264 |
'captionVerticalAlignment' => $captionVerticalAlignment,
|
1265 |
'captionHorizontalAlignment' => $captionHorizontalAlignment,
|
1266 |
'captionMobileBehavior' => $captionMobileBehavior,
|
1267 |
'captionOpacity' => $captionOpacity,
|
1268 |
-
'captionIcon' => $_POST['ftg_captionIcon'],
|
1269 |
'captionFrame' => $this->checkboxVal( 'ftg_captionFrame' ),
|
1270 |
-
'customCaptionIcon' => $_POST['ftg_customCaptionIcon'],
|
1271 |
-
'captionIconColor' => $_POST['ftg_captionIconColor'],
|
1272 |
'captionIconSize' => intval( $_POST['ftg_captionIconSize'] ),
|
1273 |
'captionFontSize' => intval( $_POST['ftg_captionFontSize'] ),
|
1274 |
-
'captionPosition' => $_POST['ftg_captionPosition'],
|
1275 |
'titleFontSize' => intval( $_POST['ftg_titleFontSize'] ),
|
1276 |
'hoverZoom' => intval( $_POST['ftg_hoverZoom'] ),
|
1277 |
'hoverRotation' => intval( $_POST['ftg_hoverRotation'] ),
|
@@ -1291,8 +1291,8 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1291 |
'imageSizeFactorTabletPortrait' => intval( $_POST['ftg_imageSizeFactorTabletPortrait'] ),
|
1292 |
'imageSizeFactorPhoneLandscape' => intval( $_POST['ftg_imageSizeFactorPhoneLandscape'] ),
|
1293 |
'imageSizeFactorPhonePortrait' => intval( $_POST['ftg_imageSizeFactorPhonePortrait'] ),
|
1294 |
-
'imageSizeFactorCustom' => $_POST['ftg_imageSizeFactorCustom'],
|
1295 |
-
'taxonomyAsFilter' => $_POST['ftg_taxonomyAsFilter'],
|
1296 |
'columns' => intval( $_POST['ftg_columns'] ),
|
1297 |
'columnsTabletLandscape' => intval( $_POST['ftg_columnsTabletLandscape'] ),
|
1298 |
'columnsTabletPortrait' => intval( $_POST['ftg_columnsTabletPortrait'] ),
|
@@ -1301,33 +1301,32 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1301 |
'max_posts' => intval( $_POST['ftg_max_posts'] ),
|
1302 |
'shadowSize' => $shadowSize,
|
1303 |
'shadowColor' => $shadowColor,
|
1304 |
-
'source' => $_POST['ftg_source'],
|
1305 |
-
'post_types' => $_POST['ftg_post_types'],
|
1306 |
-
'post_taxonomies' => $_POST['ftg_post_taxonomies'],
|
1307 |
-
'taxonomyOperator' => $_POST['ftg_taxonomyOperator'],
|
1308 |
-
'post_tags' => $_POST['ftg_post_tags'],
|
1309 |
'tilesPerPage' => intval( $_POST['ftg_tilesPerPage'] ),
|
1310 |
'woo_categories' => ( isset( $_POST['ftg_woo_categories'] ) ? $_POST['ftg_woo_categories'] : '' ),
|
1311 |
-
'defaultPostImageSize' => $_POST['ftg_defaultPostImageSize'],
|
1312 |
'defaultWooImageSize' => ( isset( $_POST['ftg_defaultWooImageSize'] ) ? $_POST['ftg_defaultWooImageSize'] : '' ),
|
1313 |
'width' => $width,
|
1314 |
-
'beforeGalleryText' => $_POST['ftg_beforeGalleryText'],
|
1315 |
-
'afterGalleryText' => $_POST['ftg_afterGalleryText'],
|
1316 |
-
'aClass' => $_POST['ftg_aClass'],
|
1317 |
-
'rel' => $_POST['ftg_rel'],
|
1318 |
'style' => $style,
|
1319 |
'delay' => intval( $_POST['ftg_delay'] ),
|
1320 |
'script' => $script,
|
1321 |
'support' => $this->checkboxVal( 'ftg_support' ),
|
1322 |
-
'supportText' => $_POST['ftg_supportText'],
|
1323 |
'scrollEffect' => $scrollEffect,
|
1324 |
'loadedScaleY' => intval( $_POST['ftg_loadedScaleY'] ),
|
1325 |
'loadedScaleX' => intval( $_POST['ftg_loadedScaleX'] ),
|
1326 |
-
'loadedRotate' => $loadedRotate,
|
1327 |
'loadedHSlide' => $loadedHSlide,
|
1328 |
'loadedVSlide' => $loadedVSlide,
|
1329 |
-
'loadedEasing' => $_POST['ftg_loadedEasing'],
|
1330 |
-
'loadedDuration' => $_POST['ftg_loadedDuration'],
|
1331 |
'loadedRotateY' => intval( $_POST['ftg_loadedRotateY'] ),
|
1332 |
'loadedRotateX' => intval( $_POST['ftg_loadedRotateX'] ),
|
1333 |
);
|
@@ -1468,6 +1467,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
1468 |
$this->photon_removed = remove_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ) );
|
1469 |
}
|
1470 |
return $this->create_gallery( $atts );
|
|
|
1471 |
if ( $this->photon_removed ) {
|
1472 |
add_filter(
|
1473 |
'image_downsize',
|
3 |
/**
|
4 |
* Plugin Name: Final Tiles Grid Gallery - Image Gallery
|
5 |
* Description: Wordpress Plugin for creating responsive image galleries.
|
6 |
+
* Version: 3.4.19
|
7 |
* Author: MachoThemes
|
8 |
* Author URI: https://www.machothemes.com
|
9 |
* Tested up to: 5.2
|
24 |
* Original Author URI: https://greentreelabs.net
|
25 |
* Original Author: https://profiles.wordpress.org/greentreealbs/
|
26 |
*/
|
27 |
+
define( "FTGVERSION", "3.4.19" );
|
28 |
// Create a helper function for easy SDK access.
|
29 |
|
30 |
if ( !function_exists( "ftg_fs" ) ) {
|
283 |
wp_set_script_translations( 'FinalTiles-gallery', 'final-tiles-gallery', dirname( plugin_basename( __FILE__ ) ) . '/lib/languages/' );
|
284 |
$galls = [ [
|
285 |
'value' => 0,
|
286 |
+
'label' => esc_html__( 'Select gallery', 'final-tiles-grid-gallery-lite' ),
|
287 |
] ];
|
288 |
$galleries = $this->FinalTilesdb->getGalleries();
|
289 |
if ( $galleries ) {
|
365 |
?>
|
366 |
<div class="notice notice-info is-dismissible ftg-review-notice">
|
367 |
<p><?php
|
368 |
+
esc_html_e( 'Hey, I noticed you created a photo gallery with Final Tiles - that’s awesome! Would you mind give it a 5-star rating on WordPress to help us spread the word and boost our motivation for new featrues?', 'final-tiles-grid-gallery-lite' );
|
369 |
?></p>
|
370 |
<p><strong><?php
|
371 |
+
esc_html_e( 'MachoThemes', 'final-tiles-grid-gallery-lite' );
|
372 |
?></strong></p>
|
373 |
<p>
|
374 |
<a href="https://wordpress.org/support/plugin/final-tiles-grid-gallery-lite/reviews/?filter=5#new-post" class="ftg-dismiss-review-notice ftg-review-out" target="_blank" rel="noopener"><?php
|
375 |
+
esc_html_e( 'Ok, you deserve it', 'final-tiles-grid-gallery-lite' );
|
376 |
?></a><br>
|
377 |
<a href="#" class="ftg-dismiss-review-notice" rel="noopener"><?php
|
378 |
+
esc_html_e( 'Nope, maybe later', 'final-tiles-grid-gallery-lite' );
|
379 |
?></a><br>
|
380 |
<a href="#" class="ftg-dismiss-review-notice" rel="noopener"><?php
|
381 |
+
esc_html_e( 'I already did', 'final-tiles-grid-gallery-lite' );
|
382 |
?></a><br>
|
383 |
</p>
|
384 |
</div>
|
417 |
global $current_screen ;
|
418 |
|
419 |
if ( !empty($current_screen->id) && strpos( $current_screen->id, 'ftg' ) !== false ) {
|
420 |
+
$url = esc_url( 'https://wordpress.org/support/plugin/final-tiles-grid-gallery-lite/reviews/?filter=5#new-post' );
|
421 |
$text = sprintf( __( 'Please rate <strong>Final Tiles Gallery</strong> <a href="%s" target="_blank">★★★★★</a> on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the Final Tiles Gallery team!', 'final-tiles-grid-gallery-lite' ), $url, $url );
|
422 |
}
|
423 |
|
481 |
load_plugin_textdomain( 'final-tiles-grid-gallery-lite', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
482 |
foreach ( $this->fields as $s => $section ) {
|
483 |
foreach ( $section["fields"] as $f => $field ) {
|
484 |
+
$this->fields[$s]["fields"][$f]["description"] = esc_html__( $this->fields[$s]["fields"][$f]["description"], 'final-tiles-grid-gallery-lite' );
|
485 |
}
|
486 |
}
|
487 |
}
|
556 |
public function attachment_fields_to_save( $post, $attachment )
|
557 |
{
|
558 |
if ( isset( $attachment['ftg_link'] ) ) {
|
559 |
+
update_post_meta( $post['ID'], '_ftg_link', esc_url_raw( $attachment['ftg_link'] ) );
|
560 |
}
|
561 |
if ( isset( $attachment['ftg_target'] ) ) {
|
562 |
+
update_post_meta( $post['ID'], '_ftg_target', sanitize_text_field( $attachment['ftg_target'] ) );
|
563 |
}
|
564 |
return $post;
|
565 |
}
|
739 |
);
|
740 |
$add_gallery = add_submenu_page(
|
741 |
'ftg-lite-gallery-admin',
|
742 |
+
esc_html__( 'FinalTiles Gallery >> Add Gallery', 'final-tiles-grid-gallery-lite' ),
|
743 |
+
esc_html__( 'Add Gallery', 'final-tiles-grid-gallery-lite' ),
|
744 |
'edit_posts',
|
745 |
'ftg-add-gallery',
|
746 |
array( $this, 'add_gallery' )
|
872 |
|
873 |
if ( $_POST['source'] == 'posts' ) {
|
874 |
foreach ( explode( ",", $_POST["id"] ) as $id ) {
|
875 |
+
update_post_meta( intval( $id ), 'ftg_filters', sanitize_text_field( $_POST['filters'] ) );
|
876 |
}
|
877 |
} else {
|
878 |
foreach ( explode( ",", $_POST["id"] ) as $id ) {
|
879 |
$result = $this->FinalTilesdb->editImage( $id, array(
|
880 |
+
"filters" => sanitize_text_field( $_POST["filters"] ),
|
881 |
) );
|
882 |
}
|
883 |
}
|
905 |
|
906 |
if ( $_POST['source'] == 'posts' ) {
|
907 |
foreach ( explode( ",", $_POST["id"] ) as $id ) {
|
908 |
+
update_post_meta( intval( $id ), 'ftg_group', sanitize_text_field( $_POST['group'] ) );
|
909 |
}
|
910 |
} else {
|
911 |
foreach ( explode( ",", $_POST["id"] ) as $id ) {
|
912 |
$result = $this->FinalTilesdb->editImage( $id, array(
|
913 |
+
"group" => sanitize_text_field( $_POST["group"] ),
|
914 |
) );
|
915 |
}
|
916 |
}
|
1008 |
$result = true;
|
1009 |
$postId = intval( $_POST['post_id'] );
|
1010 |
$img_url = stripslashes( $_POST['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 = stripslashes( $_POST['img_url'] );
|
1018 |
+
$imageCaption = wp_kses_post( $_POST['description'] );
|
1019 |
$filters = stripslashes( $_POST['filters'] );
|
1020 |
+
$title = esc_html( $_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'] ) ? stripslashes( $_POST['link'] ) : null );
|
1026 |
$imageId = intval( $_POST['img_id'] );
|
1027 |
$sortOrder = intval( $_POST['sortOrder'] );
|
1070 |
$type = ( isset( $_POST['type'] ) ? $_POST['type'] : "" );
|
1071 |
$data = array(
|
1072 |
"imagePath" => stripslashes( $_POST["embed"] ),
|
1073 |
+
"filters" => sanitize_text_field( $_POST['filters'] ),
|
1074 |
"gid" => intval( $_POST['galleryId'] ),
|
1075 |
);
|
1076 |
$id = ( isset( $_POST['id'] ) ? intval( $_POST['id'] ) : "" );
|
1133 |
|
1134 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
1135 |
$data = $this->defaultValues;
|
1136 |
+
$data["name"] = wp_filter_post_kses( $_POST['ftg_name'] );
|
1137 |
+
$data["description"] = wp_filter_post_kses( $_POST['ftg_description'] );
|
1138 |
+
$data["source"] = sanitize_text_field( $_POST['ftg_source'] );
|
1139 |
+
$data["wp_field_caption"] = sanitize_text_field( $_POST['ftg_wp_field_caption'] );
|
1140 |
+
$data["wp_field_title"] = sanitize_text_field( $_POST['ftg_wp_field_title'] );
|
1141 |
+
$data["captionEffect"] = sanitize_text_field( $_POST['ftg_captionEffect'] );
|
1142 |
+
$data["post_types"] = sanitize_text_field( $_POST["post_types"] );
|
1143 |
+
$data["layout"] = sanitize_text_field( $_POST["layout"] );
|
1144 |
+
$data["defaultWooImageSize"] = sanitize_text_field( $_POST['def_imgsize'] );
|
1145 |
+
$data["defaultPostImageSize"] = sanitize_text_field( $_POST['def_imgsize'] );
|
1146 |
+
$data["woo_categories"] = sanitize_text_field( $_POST["woo_categories"] );
|
1147 |
$result = $this->FinalTilesdb->addGallery( $data );
|
1148 |
$id = $this->FinalTilesdb->getNewGalleryId();
|
1149 |
|
1179 |
$margin = intval( $_POST['ftg_margin'] );
|
1180 |
$minTileWidth = intval( $_POST['ftg_minTileWidth'] );
|
1181 |
$gridCellSize = intval( $_POST['ftg_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 |
$enableGplus = $this->checkboxVal( 'ftg_enableGplus' );
|
1188 |
$enablePinterest = $this->checkboxVal( 'ftg_enablePinterest' );
|
1189 |
+
$lightbox = sanitize_text_field( $_POST['ftg_lightbox'] );
|
1190 |
+
$mobileLightbox = sanitize_text_field( $_POST['ftg_mobileLightbox'] );
|
1191 |
$blank = $this->checkboxVal( 'ftg_blank' );
|
1192 |
+
$filters = sanitize_text_field( $_POST['ftg_filters'] );
|
1193 |
$scrollEffect = $_POST['ftg_scrollEffect'];
|
1194 |
+
$captionBehavior = sanitize_text_field( $_POST['ftg_captionBehavior'] );
|
1195 |
+
$captionMobileBehavior = sanitize_text_field( $_POST['ftg_captionMobileBehavior'] );
|
1196 |
+
$captionEffect = sanitize_text_field( $_POST['ftg_captionEffect'] );
|
1197 |
+
$captionColor = sanitize_hex_color( $_POST['ftg_captionColor'] );
|
1198 |
+
$captionBackgroundColor = sanitize_hex_color( $_POST['ftg_captionBackgroundColor'] );
|
1199 |
+
$captionEasing = sanitize_text_field( $_POST['ftg_captionEasing'] );
|
1200 |
+
$captionHorizontalAlignment = sanitize_text_field( $_POST['ftg_captionHorizontalAlignment'] );
|
1201 |
+
$captionVerticalAlignment = sanitize_text_field( $_POST['ftg_captionVerticalAlignment'] );
|
1202 |
+
$captionEmpty = sanitize_text_field( $_POST['ftg_captionEmpty'] );
|
1203 |
$captionOpacity = intval( $_POST['ftg_captionOpacity'] );
|
1204 |
$borderSize = intval( $_POST['ftg_borderSize'] );
|
1205 |
+
$borderColor = sanitize_hex_color( $_POST['ftg_borderColor'] );
|
1206 |
$titleFontSize = intval( $_POST['ftg_titleFontSize'] );
|
1207 |
+
$loadingBarColor = sanitize_hex_color( $_POST['ftg_loadingBarColor'] );
|
1208 |
+
$loadingBarBackgroundColor = sanitize_hex_color( $_POST['ftg_loadingBarBackgroundColor'] );
|
1209 |
$borderRadius = intval( $_POST['ftg_borderRadius'] );
|
1210 |
+
$allFilterLabel = sanitize_text_field( $_POST['ftg_allFilterLabel'] );
|
1211 |
+
$shadowColor = sanitize_hex_color( $_POST['ftg_shadowColor'] );
|
1212 |
$shadowSize = intval( $_POST['ftg_shadowSize'] );
|
1213 |
$enlargeImages = $this->checkboxVal( 'ftg_enlargeImages' );
|
1214 |
+
$wp_field_caption = sanitize_text_field( $_POST['ftg_wp_field_caption'] );
|
1215 |
+
$wp_field_title = sanitize_text_field( $_POST['ftg_wp_field_title'] );
|
1216 |
$style = $_POST['ftg_style'];
|
1217 |
$script = $_POST['ftg_script'];
|
1218 |
$loadedHSlide = intval( $_POST['ftg_loadedHSlide'] );
|
1220 |
$captionEffectDuration = intval( $_POST['ftg_captionEffectDuration'] );
|
1221 |
$id = ( isset( $_POST['ftg_gallery_edit'] ) ? intval( $_POST['ftg_gallery_edit'] ) : 0 );
|
1222 |
$data = array(
|
1223 |
+
'ajaxLoading' => sanitize_text_field( $_POST['ftg_ajaxLoading'] ),
|
1224 |
+
'layout' => sanitize_text_field( $_POST['ftg_layout'] ),
|
1225 |
'name' => $galleryName,
|
1226 |
'slug' => $slug,
|
1227 |
'description' => $galleryDescription,
|
1228 |
'lightbox' => $lightbox,
|
1229 |
+
'lightboxOptions' => sanitize_text_field( $_POST['ftg_lightboxOptions'] ),
|
1230 |
+
'lightboxOptionsMobile' => sanitize_text_field( $_POST['lightboxOptionsMobile'] ),
|
1231 |
'mobileLightbox' => $mobileLightbox,
|
1232 |
+
'lightboxImageSize' => sanitize_text_field( $_POST['ftg_lightboxImageSize'] ),
|
1233 |
'blank' => $blank,
|
1234 |
'margin' => $margin,
|
1235 |
'allFilterLabel' => $allFilterLabel,
|
1237 |
'gridCellSize' => $gridCellSize,
|
1238 |
'gridCellSizeDisabledBelow' => intval( $_POST['ftg_gridCellSizeDisabledBelow'] ),
|
1239 |
'enableTwitter' => $enableTwitter,
|
1240 |
+
'backgroundColor' => sanitize_hex_color( $_POST['ftg_backgroundColor'] ),
|
1241 |
'filterClick' => $filterClick,
|
1242 |
'disableLightboxGroups' => $this->checkboxVal( 'ftg_disableLightboxGroups' ),
|
1243 |
+
'defaultFilter' => sanitize_text_field( $_POST['ftg_filterDef'] ),
|
1244 |
'enableFacebook' => $enableFacebook,
|
1245 |
'enableGplus' => $enableGplus,
|
1246 |
'enablePinterest' => $enablePinterest,
|
1247 |
'imagesOrder' => $imagesOrder,
|
1248 |
'compressHTML' => $this->checkboxVal( 'ftg_compressHTML' ),
|
1249 |
+
'loadMethod' => sanitize_text_field( $_POST['ftg_loadMethod'] ),
|
1250 |
+
'socialIconColor' => sanitize_hex_color( $_POST['ftg_socialIconColor'] ),
|
1251 |
+
'socialIconPosition' => sanitize_text_field( $_POST['ftg_socialIconPosition'] ),
|
1252 |
+
'socialIconStyle' => sanitize_text_field( $_POST['ftg_socialIconStyle'] ),
|
1253 |
+
'recentPostsCaption' => sanitize_text_field( $_POST['ftg_recentPostsCaption'] ),
|
1254 |
'recentPostsCaptionAutoExcerptLength' => intval( $_POST['ftg_recentPostsCaptionAutoExcerptLength'] ),
|
1255 |
'captionBehavior' => $captionBehavior,
|
1256 |
'captionEffect' => $captionEffect,
|
1257 |
'captionEmpty' => $captionEmpty,
|
1258 |
'captionBackgroundColor' => $captionBackgroundColor,
|
1259 |
'captionColor' => $captionColor,
|
1260 |
+
'captionCustomFields' => wp_kses_post( $_POST['ftg_captionCustomFields'] ),
|
1261 |
+
'captionFrameColor' => sanitize_hex_color( $_POST['ftg_captionFrameColor'] ),
|
1262 |
'captionEffectDuration' => $captionEffectDuration,
|
1263 |
'captionEasing' => $captionEasing,
|
1264 |
'captionVerticalAlignment' => $captionVerticalAlignment,
|
1265 |
'captionHorizontalAlignment' => $captionHorizontalAlignment,
|
1266 |
'captionMobileBehavior' => $captionMobileBehavior,
|
1267 |
'captionOpacity' => $captionOpacity,
|
1268 |
+
'captionIcon' => sanitize_text_field( $_POST['ftg_captionIcon'] ),
|
1269 |
'captionFrame' => $this->checkboxVal( 'ftg_captionFrame' ),
|
1270 |
+
'customCaptionIcon' => sanitize_text_field( $_POST['ftg_customCaptionIcon'] ),
|
1271 |
+
'captionIconColor' => sanitize_hex_color( $_POST['ftg_captionIconColor'] ),
|
1272 |
'captionIconSize' => intval( $_POST['ftg_captionIconSize'] ),
|
1273 |
'captionFontSize' => intval( $_POST['ftg_captionFontSize'] ),
|
1274 |
+
'captionPosition' => sanitize_text_field( $_POST['ftg_captionPosition'] ),
|
1275 |
'titleFontSize' => intval( $_POST['ftg_titleFontSize'] ),
|
1276 |
'hoverZoom' => intval( $_POST['ftg_hoverZoom'] ),
|
1277 |
'hoverRotation' => intval( $_POST['ftg_hoverRotation'] ),
|
1291 |
'imageSizeFactorTabletPortrait' => intval( $_POST['ftg_imageSizeFactorTabletPortrait'] ),
|
1292 |
'imageSizeFactorPhoneLandscape' => intval( $_POST['ftg_imageSizeFactorPhoneLandscape'] ),
|
1293 |
'imageSizeFactorPhonePortrait' => intval( $_POST['ftg_imageSizeFactorPhonePortrait'] ),
|
1294 |
+
'imageSizeFactorCustom' => sanitize_text_field( $_POST['ftg_imageSizeFactorCustom'] ),
|
1295 |
+
'taxonomyAsFilter' => sanitize_text_field( $_POST['ftg_taxonomyAsFilter'] ),
|
1296 |
'columns' => intval( $_POST['ftg_columns'] ),
|
1297 |
'columnsTabletLandscape' => intval( $_POST['ftg_columnsTabletLandscape'] ),
|
1298 |
'columnsTabletPortrait' => intval( $_POST['ftg_columnsTabletPortrait'] ),
|
1301 |
'max_posts' => intval( $_POST['ftg_max_posts'] ),
|
1302 |
'shadowSize' => $shadowSize,
|
1303 |
'shadowColor' => $shadowColor,
|
1304 |
+
'source' => sanitize_text_field( $_POST['ftg_source'] ),
|
1305 |
+
'post_types' => sanitize_text_field( $_POST['ftg_post_types'] ),
|
1306 |
+
'post_taxonomies' => sanitize_text_field( $_POST['ftg_post_taxonomies'] ),
|
1307 |
+
'taxonomyOperator' => sanitize_text_field( $_POST['ftg_taxonomyOperator'] ),
|
1308 |
+
'post_tags' => sanitize_text_field( $_POST['ftg_post_tags'] ),
|
1309 |
'tilesPerPage' => intval( $_POST['ftg_tilesPerPage'] ),
|
1310 |
'woo_categories' => ( isset( $_POST['ftg_woo_categories'] ) ? $_POST['ftg_woo_categories'] : '' ),
|
1311 |
+
'defaultPostImageSize' => sanitize_text_field( $_POST['ftg_defaultPostImageSize'] ),
|
1312 |
'defaultWooImageSize' => ( isset( $_POST['ftg_defaultWooImageSize'] ) ? $_POST['ftg_defaultWooImageSize'] : '' ),
|
1313 |
'width' => $width,
|
1314 |
+
'beforeGalleryText' => wp_kses_post( $_POST['ftg_beforeGalleryText'] ),
|
1315 |
+
'afterGalleryText' => wp_kses_post( $_POST['ftg_afterGalleryText'] ),
|
1316 |
+
'aClass' => sanitize_text_field( $_POST['ftg_aClass'] ),
|
1317 |
+
'rel' => sanitize_text_field( $_POST['ftg_rel'] ),
|
1318 |
'style' => $style,
|
1319 |
'delay' => intval( $_POST['ftg_delay'] ),
|
1320 |
'script' => $script,
|
1321 |
'support' => $this->checkboxVal( 'ftg_support' ),
|
1322 |
+
'supportText' => sanitize_text_field( $_POST['ftg_supportText'] ),
|
1323 |
'scrollEffect' => $scrollEffect,
|
1324 |
'loadedScaleY' => intval( $_POST['ftg_loadedScaleY'] ),
|
1325 |
'loadedScaleX' => intval( $_POST['ftg_loadedScaleX'] ),
|
|
|
1326 |
'loadedHSlide' => $loadedHSlide,
|
1327 |
'loadedVSlide' => $loadedVSlide,
|
1328 |
+
'loadedEasing' => sanitize_text_field( $_POST['ftg_loadedEasing'] ),
|
1329 |
+
'loadedDuration' => absint( $_POST['ftg_loadedDuration'] ),
|
1330 |
'loadedRotateY' => intval( $_POST['ftg_loadedRotateY'] ),
|
1331 |
'loadedRotateX' => intval( $_POST['ftg_loadedRotateX'] ),
|
1332 |
);
|
1467 |
$this->photon_removed = remove_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ) );
|
1468 |
}
|
1469 |
return $this->create_gallery( $atts );
|
1470 |
+
//@todo: statement can't be reached. Investigate
|
1471 |
if ( $this->photon_removed ) {
|
1472 |
add_filter(
|
1473 |
'image_downsize',
|
admin/add-gallery.php
CHANGED
@@ -15,7 +15,7 @@ include "header.php";
|
|
15 |
|
16 |
<div id="ftg-wizard">
|
17 |
<h2><?php
|
18 |
-
|
19 |
?></h2>
|
20 |
|
21 |
<form action="#" method="post">
|
@@ -31,28 +31,28 @@ wp_nonce_field( 'FinalTiles_gallery', 'FinalTiles_gallery' );
|
|
31 |
<div class="row">
|
32 |
<div class="ftg-field">
|
33 |
<label for="name"><?php
|
34 |
-
|
35 |
?> <span class="req">(<?php
|
36 |
-
|
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 |
-
|
44 |
?></label>
|
45 |
<textarea name="ftg_description" id="description"></textarea>
|
46 |
</div>
|
47 |
</fieldset>
|
48 |
<fieldset data-step="2">
|
49 |
<h5><?php
|
50 |
-
|
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 |
-
|
56 |
?></label>
|
57 |
</p>
|
58 |
<p class="ftg-inline">
|
@@ -60,12 +60,12 @@ _e( 'Media library', 'final-tiles-grid-gallery-lite' );
|
|
60 |
?>
|
61 |
<input disabled class="with-gap browser-default" type="radio" name="ftg_source" value="*" id="source2" />
|
62 |
<label for="source2"><?php
|
63 |
-
|
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 |
<?php
|
68 |
-
|
69 |
?>
|
70 |
</a></label>
|
71 |
<?php
|
@@ -76,12 +76,12 @@ _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
|
|
76 |
?>
|
77 |
<input class="with-gap browser-default" disabled type="radio" name="ftg_source" value="*" id="source3" />
|
78 |
<label for="source3"><?php
|
79 |
-
|
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 |
<?php
|
84 |
-
|
85 |
?>
|
86 |
</a></label>
|
87 |
<?php
|
@@ -91,13 +91,21 @@ _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
|
|
91 |
<fieldset data-step="3" data-branch="images">
|
92 |
<div class="field">
|
93 |
<h5><?php
|
94 |
-
|
95 |
?></h5>
|
96 |
<select class="browser-default" name="ftg_wp_field_caption">
|
97 |
-
<option value="none">
|
98 |
-
|
99 |
-
|
100 |
-
<option value="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
</select>
|
102 |
</div>
|
103 |
|
@@ -106,9 +114,15 @@ _e( 'WordPress field for captions:', 'final-tiles-grid-gallery-lite' );
|
|
106 |
_e( 'WordPress field for titles:', 'final-tiles-grid-gallery-lite' );
|
107 |
?></h5>
|
108 |
<select class="browser-default" name="ftg_wp_field_title">
|
109 |
-
<option value="none">
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
</select>
|
113 |
</div>
|
114 |
<!--
|
@@ -130,32 +144,32 @@ _e( 'WordPress field for titles:', 'final-tiles-grid-gallery-lite' );
|
|
130 |
-->
|
131 |
<div class="field">
|
132 |
<h5><?php
|
133 |
-
|
134 |
?></h5>
|
135 |
<select class="browser-default" name="ftg_captionEffect">
|
136 |
<option value="none"><?php
|
137 |
-
|
138 |
?></option>
|
139 |
<?php
|
140 |
?>
|
141 |
<option value="fixed" disabled><?php
|
142 |
-
|
143 |
-
?>
|
144 |
<option value="fixed-bg" disabled><?php
|
145 |
-
|
146 |
-
|
147 |
<option value="fixed-then-hidden" disabled><?php
|
148 |
-
|
149 |
-
|
150 |
<option value="fixed-bottom" disabled><?php
|
151 |
-
|
152 |
-
|
153 |
<option value="slide-from-top" disabled><?php
|
154 |
-
|
155 |
-
|
156 |
<option value="slide-from-bottom" disabled><?php
|
157 |
-
|
158 |
-
|
159 |
<?php
|
160 |
?>
|
161 |
</select>
|
@@ -166,25 +180,25 @@ _e( 'Slide from bottom', 'final-tiles-grid-gallery-lite' );
|
|
166 |
<fieldset data-step="4" data-save="true">
|
167 |
<div class="field">
|
168 |
<h5><?php
|
169 |
-
|
170 |
?></h5>
|
171 |
<select class="browser-default" name="layout">
|
172 |
<option value="final"><?php
|
173 |
-
|
174 |
?></option>
|
175 |
<option value="columns"><?php
|
176 |
-
|
177 |
?></option>
|
178 |
</select>
|
179 |
</div>
|
180 |
<div class="field">
|
181 |
<!--<h5><?php
|
182 |
-
|
183 |
?></h5>
|
184 |
<select class="browser-default def_imgsize" name="def_imgsize">
|
185 |
<?php
|
186 |
foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
|
187 |
-
|
188 |
}
|
189 |
?>
|
190 |
</select>-->
|
@@ -193,11 +207,11 @@ foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
|
|
193 |
<div class="field select-images">
|
194 |
<a class="button add-images">
|
195 |
<?php
|
196 |
-
|
197 |
?></a>
|
198 |
|
199 |
<label><?php
|
200 |
-
|
201 |
?></label>
|
202 |
<div class="images list-group"></div>
|
203 |
</div>
|
@@ -207,54 +221,58 @@ _e( 'You can add images now or later.', 'final-tiles-grid-gallery-lite' );
|
|
207 |
<div class="indeterminate"></div>
|
208 |
</div>
|
209 |
<a class="button prev"><?php
|
210 |
-
|
211 |
?></a>
|
212 |
<a class="button components-button is-primary next"><?php
|
213 |
-
|
214 |
?></a>
|
215 |
</footer>
|
216 |
</form>
|
217 |
<div id="success" class="modal">
|
218 |
<div class="modal-content">
|
219 |
<h4><?php
|
220 |
-
|
221 |
?></h4>
|
222 |
<p><?php
|
223 |
-
|
224 |
?> "<span class="gallery-name"></span>" <?php
|
225 |
-
|
226 |
?><br>
|
227 |
<input type="text" readonly class="code"><br>
|
228 |
<?php
|
229 |
-
|
230 |
?> <a class='customize'><?php
|
231 |
-
|
232 |
?></a> <?php
|
233 |
-
|
234 |
the gallery.', 'final-tiles-grid-gallery-lite' );
|
235 |
?>
|
236 |
</p>
|
237 |
</div>
|
238 |
<div class="modal-'footer">
|
239 |
-
<a href="
|
240 |
-
|
|
|
|
|
241 |
?></a>
|
242 |
</div>
|
243 |
</div>
|
244 |
<div id="error" class="modal">
|
245 |
<div class="modal-content">
|
246 |
<h4><?php
|
247 |
-
|
248 |
?></h4>
|
249 |
<p><?php
|
250 |
-
|
251 |
?><a href="?page=ftg-support"><?php
|
252 |
-
|
253 |
?></a>.</p>
|
254 |
</div>
|
255 |
<div class="modal-footer">
|
256 |
-
<a href="
|
257 |
-
|
|
|
|
|
258 |
?></a>
|
259 |
</div>
|
260 |
</div>
|
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">
|
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">
|
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 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
|
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 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
|
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 |
|
114 |
_e( 'WordPress field for titles:', 'final-tiles-grid-gallery-lite' );
|
115 |
?></h5>
|
116 |
<select class="browser-default" name="ftg_wp_field_title">
|
117 |
+
<option value="none"> <?php
|
118 |
+
esc_html_e( 'Don\'t use titles', 'final-tiles-grid-gallery-lite' );
|
119 |
+
?> </option>
|
120 |
+
<option selected value="title"> <?php
|
121 |
+
esc_html_e( 'Title', 'final-tiles-grid-gallery-lite' );
|
122 |
+
?> </option>
|
123 |
+
<option value="description"> <?php
|
124 |
+
esc_html_e( 'Description', 'final-tiles-grid-gallery-lite' );
|
125 |
+
?> </option>
|
126 |
</select>
|
127 |
</div>
|
128 |
<!--
|
144 |
-->
|
145 |
<div class="field">
|
146 |
<h5><?php
|
147 |
+
esc_html_e( 'Caption effect:', 'final-tiles-grid-gallery-lite' );
|
148 |
?></h5>
|
149 |
<select class="browser-default" name="ftg_captionEffect">
|
150 |
<option value="none"><?php
|
151 |
+
esc_html_e( 'Fade', 'final-tiles-grid-gallery-lite' );
|
152 |
?></option>
|
153 |
<?php
|
154 |
?>
|
155 |
<option value="fixed" disabled><?php
|
156 |
+
esc_html_e( 'Fixed (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
157 |
+
?> </option>
|
158 |
<option value="fixed-bg" disabled><?php
|
159 |
+
esc_html_e( 'Fixed with background (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
160 |
+
?></option>
|
161 |
<option value="fixed-then-hidden" disabled><?php
|
162 |
+
esc_html_e( 'Fixed, hidden on hover (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
163 |
+
?></option>
|
164 |
<option value="fixed-bottom" disabled><?php
|
165 |
+
esc_html_e( 'Fixed at bottom (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
166 |
+
?></option>
|
167 |
<option value="slide-from-top" disabled><?php
|
168 |
+
esc_html_e( 'Slide from top (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
169 |
+
?></option>
|
170 |
<option value="slide-from-bottom" disabled><?php
|
171 |
+
esc_html_e( 'Slide from bottom (Upgrade to unlock)', 'final-tiles-grid-gallery-lite' );
|
172 |
+
?></option>
|
173 |
<?php
|
174 |
?>
|
175 |
</select>
|
180 |
<fieldset data-step="4" data-save="true">
|
181 |
<div class="field">
|
182 |
<h5><?php
|
183 |
+
esc_html_e( 'Choose the layout', 'final-tiles-grid-gallery-lite' );
|
184 |
?></h5>
|
185 |
<select class="browser-default" name="layout">
|
186 |
<option value="final"><?php
|
187 |
+
esc_html_e( 'Final Tiles Gallery (mixed image width)', 'final-tiles-grid-gallery-lite' );
|
188 |
?></option>
|
189 |
<option value="columns"><?php
|
190 |
+
esc_html_e( 'Masonry (columns, same image width)', 'final-tiles-grid-gallery-lite' );
|
191 |
?></option>
|
192 |
</select>
|
193 |
</div>
|
194 |
<div class="field">
|
195 |
<!--<h5><?php
|
196 |
+
esc_html_e( 'Choose a default image size', 'final-tiles-grid-gallery-lite' );
|
197 |
?></h5>
|
198 |
<select class="browser-default def_imgsize" name="def_imgsize">
|
199 |
<?php
|
200 |
foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
|
201 |
+
echo '<option value="' . esc_attr( $size ) . '">' . esc_html( $size ) . " (" . implode( 'x', $atts ) . ")</option>" ;
|
202 |
}
|
203 |
?>
|
204 |
</select>-->
|
207 |
<div class="field select-images">
|
208 |
<a class="button add-images">
|
209 |
<?php
|
210 |
+
esc_html_e( 'Add images', 'final-tiles-grid-gallery-lite' );
|
211 |
?></a>
|
212 |
|
213 |
<label><?php
|
214 |
+
esc_html_e( 'You can add images now or later.', 'final-tiles-grid-gallery-lite' );
|
215 |
?></label>
|
216 |
<div class="images list-group"></div>
|
217 |
</div>
|
221 |
<div class="indeterminate"></div>
|
222 |
</div>
|
223 |
<a class="button prev"><?php
|
224 |
+
esc_html_e( 'Previous', 'final-tiles-grid-gallery-lite' );
|
225 |
?></a>
|
226 |
<a class="button components-button is-primary next"><?php
|
227 |
+
esc_html_e( 'Next', 'final-tiles-grid-gallery-lite' );
|
228 |
?></a>
|
229 |
</footer>
|
230 |
</form>
|
231 |
<div id="success" class="modal">
|
232 |
<div class="modal-content">
|
233 |
<h4><?php
|
234 |
+
esc_html_e( 'Success!', 'final-tiles-grid-gallery-lite' );
|
235 |
?></h4>
|
236 |
<p><?php
|
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 |
<input type="text" readonly class="code"><br>
|
242 |
<?php
|
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> <?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 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>
|
admin/edit-gallery.php
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
$ftg_parent_page = "edit-gallery";
|
19 |
|
20 |
?>
|
21 |
-
<?php $ftg_subtitle = "Edit gallery: " . $gallery->name ?>
|
22 |
<?php include "header.php" ?>
|
23 |
|
24 |
<div class='bd'>
|
@@ -26,7 +26,7 @@
|
|
26 |
<div id="settings">
|
27 |
<form name="gallery_form" id="edit-gallery" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>" method="post">
|
28 |
<?php wp_nonce_field('FinalTiles_gallery', 'FinalTiles_gallery'); ?>
|
29 |
-
<input type="hidden" name="ftg_gallery_edit" id="gallery-id" value="<?php
|
30 |
<?php include("include/edit-gallery.php") ?>
|
31 |
</form>
|
32 |
</div>
|
@@ -72,32 +72,32 @@
|
|
72 |
|
73 |
<div id="groups-modal" class="modal">
|
74 |
<div class="modal-content">
|
75 |
-
<h3><?php
|
76 |
-
<p><?php
|
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
|
81 |
-
<a href="#!" data-action="cancel" class="action modal-action modal-close waves-effect waves-yellow btn-flat"><?php
|
82 |
</div>
|
83 |
</div>
|
84 |
|
85 |
<div id="filters-modal" class="modal">
|
86 |
<div class="modal-content">
|
87 |
-
<h3><?php
|
88 |
|
89 |
<div id="filters-to-assign">
|
90 |
<?php foreach($filters as $filter): ?>
|
91 |
<label>
|
92 |
-
<input type="checkbox" value="<?php
|
93 |
-
<span><?php
|
94 |
</label>
|
95 |
<?php endforeach; ?>
|
96 |
</div>
|
97 |
-
<p><?php
|
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
|
101 |
-
<a href="#!" data-action="cancel" class="action modal-action modal-close waves-effect waves-yellow btn-flat"><?php
|
102 |
</div>
|
103 |
</div>
|
18 |
$ftg_parent_page = "edit-gallery";
|
19 |
|
20 |
?>
|
21 |
+
<?php $ftg_subtitle = "Edit gallery: " . $gallery->name ?>
|
22 |
<?php include "header.php" ?>
|
23 |
|
24 |
<div class='bd'>
|
26 |
<div id="settings">
|
27 |
<form name="gallery_form" id="edit-gallery" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>" method="post">
|
28 |
<?php wp_nonce_field('FinalTiles_gallery', 'FinalTiles_gallery'); ?>
|
29 |
+
<input type="hidden" name="ftg_gallery_edit" id="gallery-id" value="<?php echo absint($gid); ?>" />
|
30 |
<?php include("include/edit-gallery.php") ?>
|
31 |
</form>
|
32 |
</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 |
+
<input type="checkbox" value="<?php echo esc_attr($filter, ENT_QUOTES) ?>" />
|
93 |
+
<span><?php echo esc_html($filter); ?></span>
|
94 |
</label>
|
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>
|
admin/facebook.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<p>Support Final Tiles Grid Gallery, share on Facebook</p>
|
2 |
-
<div class="fb-like" data-href="https://www.facebook.com/
|
3 |
|
4 |
|
5 |
<div id="fb-root"></div>
|
1 |
<p>Support Final Tiles Grid Gallery, share on Facebook</p>
|
2 |
+
<div class="fb-like" data-href="https://www.facebook.com/machothemes" data-layout="standard" data-action="recommend" data-show-faces="false" data-share="true"></div>
|
3 |
|
4 |
|
5 |
<div id="fb-root"></div>
|
admin/header.php
CHANGED
@@ -4,6 +4,6 @@
|
|
4 |
|
5 |
?>
|
6 |
<header id="top">
|
7 |
-
<h1 class="hidden header center-on-small-only">Final Tiles Grid Gallery <small><?php
|
8 |
-
<h4 class="center-on-small-only"><?php
|
9 |
</header>
|
4 |
|
5 |
?>
|
6 |
<header id="top">
|
7 |
+
<h1 class="hidden header center-on-small-only">Final Tiles Grid Gallery <small><?php echo esc_html(FTGVERSION); ?> <?php echo esc_html(FTG_PLAN); ?></small></h1>
|
8 |
+
<h4 class="center-on-small-only"><?php echo esc_html($ftg_subtitle); ?></h4>
|
9 |
</header>
|
admin/include/edit-gallery.php
CHANGED
@@ -1,227 +1,227 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( !function_exists( 'ftg_p' ) ) {
|
4 |
-
function ftg_p( $gallery, $field, $default = NULL )
|
5 |
-
{
|
6 |
-
global $ftg_options ;
|
7 |
-
|
8 |
-
if ( $ftg_options ) {
|
9 |
-
if ( array_key_exists( $field, $ftg_options ) ) {
|
10 |
-
print stripslashes( $ftg_options[$field] );
|
11 |
-
}
|
12 |
-
return;
|
13 |
-
}
|
14 |
-
|
15 |
-
|
16 |
-
if ( $gallery == NULL || $gallery->{$field} === NULL ) {
|
17 |
-
|
18 |
-
if ( $default === NULL ) {
|
19 |
-
print "";
|
20 |
-
} else {
|
21 |
-
print stripslashes( $default );
|
22 |
-
}
|
23 |
-
|
24 |
-
} else {
|
25 |
-
print stripslashes( $gallery->{$field} );
|
26 |
-
}
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
function ftg_sel(
|
31 |
-
$gallery,
|
32 |
-
$field,
|
33 |
-
$value,
|
34 |
-
$type = "selected"
|
35 |
-
)
|
36 |
-
{
|
37 |
-
global $ftg_options ;
|
38 |
-
|
39 |
-
if ( $ftg_options && $ftg_options[$field] == $value ) {
|
40 |
-
print $type;
|
41 |
-
return;
|
42 |
-
}
|
43 |
-
|
44 |
-
|
45 |
-
if ( $gallery == NULL || !isset( $gallery->{$field} ) ) {
|
46 |
-
print "";
|
47 |
-
} else {
|
48 |
-
if ( $gallery->{$field} == $value ) {
|
49 |
-
print $type;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
}
|
54 |
-
|
55 |
-
function ftg_checkFieldDisabled( $options )
|
56 |
-
{
|
57 |
-
if ( is_array( $options ) && count( $options ) == 3 && $options[2] == "disabled" ) {
|
58 |
-
return "disabled";
|
59 |
-
}
|
60 |
-
return "";
|
61 |
-
}
|
62 |
-
|
63 |
-
function ftg_checkDisabledOption( $plan )
|
64 |
-
{
|
65 |
-
return "disabled";
|
66 |
-
return "";
|
67 |
-
}
|
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 |
-
}
|
82 |
-
|
83 |
-
}
|
84 |
-
|
85 |
-
global $ftg_parent_page ;
|
86 |
-
global $ftg_fields ;
|
87 |
-
$filters = array();
|
88 |
-
//print_r($gallery);
|
89 |
-
$idx = 0;
|
90 |
-
function ftgSortByName( $a, $b )
|
91 |
-
{
|
92 |
-
return $a["name"] > $b["name"];
|
93 |
-
}
|
94 |
-
|
95 |
-
?>
|
96 |
|
97 |
<div class="row">
|
98 |
<div class="col s9">
|
99 |
<ul class="collapsible" id="all-settings" data-collapsible="accordion">
|
100 |
<li id="images" class="active">
|
101 |
<div class="collapsible-header">
|
102 |
-
<i class="fa fa-picture-o light-green darken-1 white-text ftg-section-icon"></i> <?php
|
103 |
-
|
104 |
-
?>
|
105 |
</div>
|
106 |
<div class="collapsible-body" style="display:block">
|
107 |
<div class="actions">
|
108 |
<div class="images-bar">
|
109 |
<select name="ftg_source" class="browser-default">
|
110 |
-
<option <?php
|
111 |
-
ftg_sel( $gallery, "source", "images" );
|
112 |
-
?> value="images"><?php
|
113 |
-
|
114 |
?></option>
|
115 |
-
<option <?php
|
116 |
-
ftg_sel( $gallery, "source", "posts" );
|
117 |
-
?> value="posts" <?php
|
118 |
-
echo ftg_checkDisabledOption( 'ultimate' ) ;
|
119 |
-
?>><?php
|
120 |
-
|
121 |
-
echo ftg_printPro( 'ultimate' ) ;
|
122 |
?></option>
|
123 |
-
<?php
|
124 |
-
|
125 |
-
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
126 |
-
?>
|
127 |
-
<option <?php
|
128 |
-
ftg_sel( $gallery, "source", "woocommerce" );
|
129 |
-
?> value="woocommerce" <?php
|
130 |
-
echo ftg_checkDisabledOption( 'ultimate' ) ;
|
131 |
-
?>><?php
|
132 |
-
_e( 'WooCommerce products', 'final-tiles-grid-gallery-lite' );
|
133 |
-
echo ftg_printPro( 'ultimate' ) ;
|
134 |
?></option>
|
135 |
-
<?php
|
136 |
-
}
|
137 |
-
|
138 |
-
?>
|
139 |
</select>
|
140 |
<select class="current-image-size browser-default">
|
141 |
-
<?php
|
142 |
-
foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
|
143 |
-
|
144 |
-
}
|
145 |
-
?>
|
146 |
</select>
|
147 |
|
148 |
<a href="#" class="open-media-panel button">
|
149 |
-
<?php
|
150 |
-
|
151 |
-
?>
|
152 |
</a>
|
153 |
-
<?php
|
154 |
-
?>
|
155 |
-
<a onclick="alert('Upgrade to unlock')" href="#" class=" button"><?php
|
156 |
-
|
157 |
?></a>
|
158 |
-
<?php
|
159 |
-
?>
|
160 |
-
<a class="button button-delete" data-remove-images href="#!"><?php
|
161 |
-
|
162 |
?></a>
|
163 |
</div>
|
164 |
<div class="row selection-row">
|
165 |
<div class="bulk options">
|
166 |
<span>
|
167 |
-
<a class="button" href="#" data-action="select"><?php
|
168 |
-
|
169 |
?></a>
|
170 |
-
<a class="button" href="#" data-action="deselect"><?php
|
171 |
-
|
172 |
?></a>
|
173 |
-
<a class="button" href="#" data-action="toggle"><?php
|
174 |
-
|
175 |
?></a>
|
176 |
</span>
|
177 |
<span>
|
178 |
-
<?php
|
179 |
-
?>
|
180 |
-
<?php
|
181 |
-
?>
|
182 |
</span>
|
183 |
<span>
|
184 |
-
<a class="button" href="#" data-action="show-hide"><?php
|
185 |
-
|
186 |
?></a>
|
187 |
</span>
|
188 |
</div>
|
189 |
</div>
|
190 |
-
<?php
|
191 |
-
|
192 |
-
if ( is_array( $filters ) && count( $filters ) > 1 ) {
|
193 |
-
?>
|
194 |
<div class="row filter-list">
|
195 |
-
<b> <?php
|
196 |
-
|
197 |
?> </b>
|
198 |
<span class="filter-select-control">
|
199 |
-
<?php
|
200 |
-
foreach ( $filters as $filter ) {
|
201 |
-
?>
|
202 |
-
<em class='button filter-item' ><?php
|
203 |
-
|
204 |
?></em>
|
205 |
-
<?php
|
206 |
-
}
|
207 |
-
?>
|
208 |
</span>
|
209 |
</div>
|
210 |
-
<?php
|
211 |
-
}
|
212 |
-
|
213 |
-
?>
|
214 |
</div>
|
215 |
<div id="image-list" class="row"></div>
|
216 |
|
217 |
<div class="actions">
|
218 |
<div class="row">
|
219 |
-
<?php
|
220 |
-
|
221 |
?><br>
|
222 |
-
<?php
|
223 |
-
|
224 |
-
?>
|
225 |
</div>
|
226 |
</div>
|
227 |
<div id="images" class="ftg-section form-fields">
|
@@ -229,730 +229,740 @@ _e( 'Drag the images to change their order.', 'final-tiles-grid-gallery-lite' );
|
|
229 |
<div class="row">
|
230 |
<label>Taxonomy operator</label>
|
231 |
<select name="ftg_taxonomyOperator" class="browser-default js-ajax-loading-control">
|
232 |
-
<option <?php
|
233 |
-
ftg_sel( $gallery, "taxonomyOperator", "OR" );
|
234 |
-
?> value="OR"
|
235 |
-
|
236 |
-
|
237 |
-
|
|
|
|
|
|
|
|
|
238 |
</select>
|
239 |
</div>
|
240 |
<div class="row">
|
241 |
<label>Taxonomy as filter</label>
|
242 |
<select name="ftg_taxonomyAsFilter" class="browser-default js-ajax-loading-control">
|
243 |
<option></option>
|
244 |
-
<?php
|
245 |
-
foreach ( get_taxonomies( array(), "objects" ) as $taxonomy => $t ) {
|
246 |
-
?>
|
247 |
-
<?php
|
248 |
-
|
249 |
-
if ( $t->publicly_queryable ) {
|
250 |
-
?>
|
251 |
-
<option <?php
|
252 |
-
ftg_sel( $gallery, "taxonomyAsFilter", $t->label );
|
253 |
-
?> value="<?php
|
254 |
-
|
255 |
-
?>"><?php
|
256 |
-
|
257 |
?></option>
|
258 |
-
<?php
|
259 |
-
}
|
260 |
-
|
261 |
-
?>
|
262 |
-
<?php
|
263 |
-
}
|
264 |
-
?>
|
265 |
</select>
|
266 |
</div>
|
267 |
<div class="row checkboxes">
|
268 |
-
<strong class="label"><?php
|
269 |
-
|
270 |
?></strong>
|
271 |
<span>
|
272 |
-
<?php
|
273 |
-
$idx = 0;
|
274 |
-
?>
|
275 |
-
<?php
|
276 |
-
foreach ( get_post_types( '', 'names' ) as $t ) {
|
277 |
-
?>
|
278 |
-
<?php
|
279 |
-
|
280 |
-
if ( !in_array( $t, $excluded_post_types ) ) {
|
281 |
-
?>
|
282 |
<span class="tax-item">
|
283 |
-
<input class="browser-default" id="post-type-<?php
|
284 |
-
|
285 |
-
?>" type="checkbox" name="post_types" value="<?php
|
286 |
-
|
287 |
?>">
|
288 |
-
<label for="post-type-<?php
|
289 |
-
|
290 |
-
?>"><?php
|
291 |
-
|
292 |
?></label>
|
293 |
</span>
|
294 |
-
<?php
|
295 |
-
$idx++;
|
296 |
-
?>
|
297 |
-
<?php
|
298 |
-
}
|
299 |
-
|
300 |
-
?>
|
301 |
-
<?php
|
302 |
-
}
|
303 |
-
?>
|
304 |
-
<input type="hidden" name="ftg_post_types" value="<?php
|
305 |
-
|
306 |
?>" />
|
307 |
</span>
|
308 |
</div>
|
309 |
-
<?php
|
310 |
-
//print_r(get_taxonomies(array(), "objects")); exit();
|
311 |
-
?>
|
312 |
-
<?php
|
313 |
-
foreach ( get_taxonomies( array(), "objects" ) as $taxonomy => $t ) {
|
314 |
-
?>
|
315 |
-
<?php
|
316 |
-
|
317 |
-
if ( $t->publicly_queryable ) {
|
318 |
-
?>
|
319 |
-
<?php
|
320 |
-
$items = get_terms( $taxonomy, array(
|
321 |
-
"hide_empty" => false,
|
322 |
-
) );
|
323 |
-
?>
|
324 |
-
<?php
|
325 |
-
|
326 |
-
if ( count( $items ) > 0 ) {
|
327 |
-
?>
|
328 |
-
<?php
|
329 |
-
//print_r($items);
|
330 |
-
?>
|
331 |
<div class="row checkboxes">
|
332 |
-
<strong class="label"><?php
|
333 |
-
echo $t->label ;
|
334 |
?></strong>
|
335 |
<span>
|
336 |
-
<?php
|
337 |
-
$idx = 0;
|
338 |
-
?>
|
339 |
-
<?php
|
340 |
-
foreach ( $items as $c ) {
|
341 |
-
?>
|
342 |
<span class="tax-item">
|
343 |
-
<input id="post-tax-<?php
|
344 |
-
|
345 |
-
?>" type="checkbox" name="post_taxonomy" data-taxonomy="<?php
|
346 |
-
|
347 |
-
?>" value="<?php
|
348 |
-
|
349 |
?>">
|
350 |
-
<label for="post-tax-<?php
|
351 |
-
|
352 |
-
?>"><?php
|
353 |
-
|
354 |
?></label>
|
355 |
</span>
|
356 |
-
<?php
|
357 |
-
$idx++;
|
358 |
-
?>
|
359 |
-
<?php
|
360 |
-
}
|
361 |
-
?>
|
362 |
</span>
|
363 |
</div>
|
364 |
-
<?php
|
365 |
-
}
|
366 |
-
|
367 |
-
?>
|
368 |
-
<?php
|
369 |
-
}
|
370 |
-
|
371 |
-
?>
|
372 |
-
<?php
|
373 |
-
}
|
374 |
-
?>
|
375 |
-
<input type="hidden" name="ftg_post_taxonomies" value="<?php
|
376 |
-
|
377 |
?>" />
|
378 |
<div class="row checkboxes">
|
379 |
-
<strong class="label"><?php
|
380 |
-
|
381 |
?></strong>
|
382 |
<span class="aside">
|
383 |
-
<input type="text" name="ftg_max_posts" value="<?php
|
384 |
-
echo $gallery->max_posts ;
|
385 |
?>">
|
386 |
-
<span><?php
|
387 |
-
|
388 |
?></span>
|
389 |
</span>
|
390 |
</div>
|
391 |
</div>
|
392 |
-
<?php
|
393 |
-
|
394 |
-
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
395 |
-
?>
|
396 |
<div class="actions source-woocommerce source-panel">
|
397 |
<div class="row checkboxes">
|
398 |
-
<strong class="label"><?php
|
399 |
-
_e( 'Categories', 'final-tiles-grid-gallery-lite' );
|
400 |
?>:</strong>
|
401 |
<span>
|
402 |
-
<?php
|
403 |
-
$idx = 0;
|
404 |
-
?>
|
405 |
-
<?php
|
406 |
-
foreach ( $woo_categories as $c ) {
|
407 |
-
?>
|
408 |
-
<input class="browser-default" id="woo-cat-<?php
|
409 |
-
|
410 |
-
?>" type="checkbox" name="woo_cat" value="<?php
|
411 |
-
|
412 |
?>">
|
413 |
-
<label for="woo-cat-<?php
|
414 |
-
|
415 |
-
?>"><?php
|
416 |
-
|
417 |
?></label>
|
418 |
-
<?php
|
419 |
-
$idx++;
|
420 |
-
?>
|
421 |
-
<?php
|
422 |
-
}
|
423 |
-
?>
|
424 |
-
<input type="hidden" name="ftg_woo_categories" value="<?php
|
425 |
-
|
426 |
?>" />
|
427 |
</span>
|
428 |
</div>
|
429 |
</div>
|
430 |
-
<?php
|
431 |
-
}
|
432 |
-
|
433 |
-
?>
|
434 |
</div>
|
435 |
</div>
|
436 |
</li>
|
437 |
-
<?php
|
438 |
-
foreach ( $ftg_fields as $section => $s ) {
|
439 |
-
?>
|
440 |
-
<li id="<?php
|
441 |
-
_e( FinalTiles_Gallery::slugify( $section ) );
|
442 |
?>">
|
443 |
<div class="collapsible-header">
|
444 |
-
<i class="<?php
|
445 |
-
echo $s["icon"] ;
|
446 |
-
?> light-green darken-1 white-text ftg-section-icon"></i> <?php
|
447 |
-
|
448 |
-
?>
|
449 |
</div>
|
450 |
<div class="collapsible-body tab form-fields">
|
451 |
<div class="jump-head">
|
452 |
-
<?php
|
453 |
-
$jumpFields = array();
|
454 |
-
foreach ( $s["fields"] as $f => $data ) {
|
455 |
-
$jumpFields[$f] = $data;
|
456 |
-
$jumpFields[$f]['_code'] = $f;
|
457 |
-
}
|
458 |
-
unset( $f );
|
459 |
-
unset( $data );
|
460 |
-
usort( $jumpFields, "ftgSortByName" );
|
461 |
-
?>
|
462 |
<select class="browser-default jump">
|
463 |
-
<option><?php
|
464 |
-
|
465 |
?></option>
|
466 |
-
<?php
|
467 |
-
foreach ( $jumpFields as $f => $data ) {
|
468 |
-
?>
|
469 |
-
<?php
|
470 |
-
|
471 |
-
if ( is_array( $data["excludeFrom"] ) && !in_array( $ftg_parent_page, $data["excludeFrom"] ) ) {
|
472 |
-
?>
|
473 |
-
<option value="<?php
|
474 |
-
|
475 |
?>">
|
476 |
-
<?php
|
477 |
-
|
478 |
-
?>
|
479 |
</option>
|
480 |
-
<?php
|
481 |
-
}
|
482 |
-
|
483 |
-
?>
|
484 |
-
<?php
|
485 |
-
}
|
486 |
-
?>
|
487 |
</select>
|
488 |
|
489 |
-
<?php
|
490 |
-
|
491 |
-
if ( array_key_exists( "presets", $s ) ) {
|
492 |
-
?>
|
493 |
-
<select class="browser-default presets" data-field-idx="<?php
|
494 |
-
echo $idx ;
|
495 |
?>">
|
496 |
<option value="">Select preset</option>
|
497 |
-
<?php
|
498 |
-
foreach ( $s["presets"] as $preset => $data ) {
|
499 |
-
?>
|
500 |
-
<option><?php
|
501 |
-
echo $preset ;
|
502 |
?></option>
|
503 |
-
<?php
|
504 |
-
}
|
505 |
-
?>
|
506 |
</select>
|
507 |
-
<?php
|
508 |
-
}
|
509 |
-
|
510 |
-
?>
|
511 |
</div>
|
512 |
<table>
|
513 |
<tbody>
|
514 |
-
<?php
|
515 |
-
foreach ( $s["fields"] as $f => $data ) {
|
516 |
-
?>
|
517 |
-
<?php
|
518 |
-
|
519 |
-
if ( is_array( $data["excludeFrom"] ) && !in_array( $ftg_parent_page, $data["excludeFrom"] ) ) {
|
520 |
-
?>
|
521 |
|
522 |
-
<tr class="field-row row-<?php
|
523 |
-
|
524 |
-
?> <?php
|
525 |
-
|
526 |
?>">
|
527 |
<th scope="row">
|
528 |
-
<label><?php
|
529 |
-
|
530 |
-
?>
|
531 |
-
<?php
|
532 |
-
|
533 |
-
if ( $data["mu"] ) {
|
534 |
-
?>
|
535 |
-
(<?php
|
536 |
-
|
537 |
?>)
|
538 |
-
<?php
|
539 |
-
}
|
540 |
-
|
541 |
-
?>
|
542 |
|
543 |
-
<?php
|
544 |
-
|
545 |
-
if ( strlen( $data["description"] ) ) {
|
546 |
-
?>
|
547 |
<div class="tab-header-tooltip-container ftg-tooltip">
|
548 |
<span>[?]</span>
|
549 |
<div class="tab-header-description ftg-tooltip-content">
|
550 |
-
<?php
|
551 |
-
echo wp_kses_post( $data["description"] ) ;
|
552 |
-
?>
|
553 |
</div>
|
554 |
</div>
|
555 |
-
<?php
|
556 |
-
}
|
557 |
-
|
558 |
-
?>
|
559 |
</label>
|
560 |
</th>
|
561 |
<td>
|
562 |
-
<div class="field <?php
|
563 |
-
echo ( in_array( 'shortcode', $data["excludeFrom"] ) ? "" : "js-update-shortcode" ) ;
|
564 |
?>">
|
565 |
-
<?php
|
566 |
-
|
567 |
-
if ( $data["type"] == "text" ) {
|
568 |
-
?>
|
569 |
<div class="text">
|
570 |
-
<input type="text" size="30" name="ftg_<?php
|
571 |
-
|
572 |
-
?>" value="<?php
|
573 |
-
ftg_p( $gallery, $f, $data["default"] );
|
574 |
?>" />
|
575 |
</div>
|
576 |
-
<?php
|
577 |
-
} elseif ( $data["type"] == "cta" ) {
|
578 |
-
?>
|
579 |
<div class="text">
|
580 |
-
<a class="in-table-cta" href="<?php
|
581 |
-
echo ftg_fs()->get_upgrade_url() ;
|
582 |
?>"><i class="mdi mdi-bell-ring-outline"></i>
|
583 |
-
<?php
|
584 |
-
|
585 |
-
?>
|
586 |
</a>
|
587 |
</div>
|
588 |
-
<?php
|
589 |
-
} elseif ( $data["type"] == "select" ) {
|
590 |
-
?>
|
591 |
<div class="text">
|
592 |
-
<select class="browser-default" name="ftg_<?php
|
593 |
-
print $f;
|
594 |
?>">
|
595 |
-
<?php
|
596 |
-
foreach ( array_keys( $data["values"] ) as $optgroup ) {
|
597 |
-
?>
|
598 |
-
<optgroup label="<?php
|
599 |
-
|
600 |
?>">
|
601 |
-
<?php
|
602 |
-
foreach ( $data["values"][$optgroup] as $option ) {
|
603 |
-
?>
|
604 |
|
605 |
-
<?php
|
606 |
-
$v = explode( "|", $option );
|
607 |
-
?>
|
608 |
|
609 |
-
<option <?php
|
610 |
-
echo ftg_checkFieldDisabled( $v ) ;
|
611 |
-
?> <?php
|
612 |
-
ftg_sel( $gallery, $f, $v[0] );
|
613 |
-
?> value="<?php
|
614 |
-
|
615 |
-
?>"><?php
|
616 |
-
|
617 |
-
echo ftg_printFieldPro( $v ) ;
|
618 |
?></option>
|
619 |
-
<?php
|
620 |
-
}
|
621 |
-
?>
|
622 |
</optgroup>
|
623 |
-
<?php
|
624 |
-
}
|
625 |
-
?>
|
626 |
</select>
|
627 |
-
<?php
|
628 |
-
|
629 |
-
if ( $f == "lightbox" ) {
|
630 |
-
?>
|
631 |
<div class="col s12 ftg-everlightbox-settings">
|
632 |
-
<?php
|
633 |
-
|
634 |
-
if ( class_exists( 'Everlightbox_Public' ) ) {
|
635 |
-
?>
|
636 |
<div class="card-panel light-green lighten-4">
|
637 |
-
<a href="?page=everlightbox_options" target="_blank"><?php
|
638 |
-
|
639 |
?></a>
|
640 |
</div>
|
641 |
-
<?php
|
642 |
-
} else {
|
643 |
-
?>
|
644 |
<div class="card-panel yellow lighten-3">
|
645 |
-
<?php
|
646 |
-
|
647 |
-
?>. <a target="_blank" class="open-checkout" href="https://checkout.freemius.com/mode/dialog/plugin/1981/plan/2954/"><?php
|
648 |
-
|
649 |
?></a>
|
650 |
</div>
|
651 |
-
<?php
|
652 |
-
}
|
653 |
-
|
654 |
-
?>
|
655 |
</div>
|
656 |
-
<?php
|
657 |
-
}
|
658 |
-
|
659 |
-
?>
|
660 |
</div>
|
661 |
-
<?php
|
662 |
-
} elseif ( $data["type"] == "toggle" ) {
|
663 |
-
?>
|
664 |
<div class="switch">
|
665 |
<label>
|
666 |
Off
|
667 |
-
<input disabled type="checkbox" id="ftg_<?php
|
668 |
-
|
669 |
-
?>" name="ftg_<?php
|
670 |
-
|
671 |
-
?>" value="<?php
|
672 |
-
ftg_p( $gallery, $f, $data["default"] );
|
673 |
-
?>" <?php
|
674 |
-
ftg_sel(
|
675 |
-
$gallery,
|
676 |
-
$f,
|
677 |
-
"T",
|
678 |
-
"checked"
|
679 |
-
);
|
680 |
?> >
|
681 |
<span class="lever"></span>
|
682 |
On
|
683 |
</label>
|
684 |
</div>
|
685 |
-
<?php
|
686 |
-
} elseif ( $data["type"] == "slider" ) {
|
687 |
-
?>
|
688 |
|
689 |
<div class="text">
|
690 |
-
<b id="preview-<?php
|
691 |
-
|
692 |
-
?>" class="range-preview"><?php
|
693 |
-
ftg_p( $gallery, $f, $data["default"] );
|
694 |
?></b>
|
695 |
<p class="range-field">
|
696 |
-
<input data-preview="<?php
|
697 |
-
echo $f ;
|
698 |
-
?>" name="ftg_<?php
|
699 |
-
|
700 |
-
?>" value="<?php
|
701 |
-
ftg_p( $gallery, $f, $data["default"] );
|
702 |
-
?>" type="range" min="<?php
|
703 |
-
|
704 |
-
?>" max="<?php
|
705 |
-
|
706 |
?>" />
|
707 |
</p>
|
708 |
</div>
|
709 |
|
710 |
-
<?php
|
711 |
-
} elseif ( $data["type"] == "number" ) {
|
712 |
-
?>
|
713 |
<div class="text">
|
714 |
-
<input type="text" name="ftg_<?php
|
715 |
-
|
716 |
-
?>" class="integer-only" value="<?php
|
717 |
-
ftg_p( $gallery, $f, $data["default"] );
|
718 |
?>" >
|
719 |
</div>
|
720 |
|
721 |
-
<?php
|
722 |
-
} elseif ( $data["type"] == "color" ) {
|
723 |
-
?>
|
724 |
<div class="text">
|
725 |
-
<input type="text" size="6" data-default-color="<?php
|
726 |
-
|
727 |
-
?>" name="ftg_<?php
|
728 |
-
|
729 |
-
?>" value="<?php
|
730 |
-
ftg_p( $gallery, $f, $data["default"] );
|
731 |
?>" class='pickColor' /> </div>
|
732 |
|
733 |
-
<?php
|
734 |
-
} elseif ( $data["type"] == "filter" ) {
|
735 |
-
?>
|
736 |
|
737 |
<div class="filters gallery-filters dynamic-table">
|
738 |
<div class="text"></div>
|
739 |
-
<a href="#" class="add button"><?php
|
740 |
-
|
741 |
?></a>
|
742 |
-
<a href="#" class="reset-default-filter button"><?php
|
743 |
-
|
744 |
?></a>
|
745 |
-
<input type="hidden" name="ftg_filters" value="<?php
|
746 |
-
ftg_p( $gallery, "filters" );
|
747 |
?>" />
|
748 |
-
<input type="hidden" name="filter_def" value="<?php
|
749 |
-
ftg_p( $gallery, "defaultFilter" );
|
750 |
?>" />
|
751 |
</div>
|
752 |
|
753 |
-
<?php
|
754 |
-
} elseif ( $data["type"] == "textarea" ) {
|
755 |
-
?>
|
756 |
<div class="text">
|
757 |
-
<textarea name="ftg_<?php
|
758 |
-
|
759 |
-
?>"><?php
|
760 |
-
ftg_p( $gallery, $f );
|
761 |
?></textarea>
|
762 |
</div>
|
763 |
-
<?php
|
764 |
-
} elseif ( $data["type"] == "custom_isf" ) {
|
765 |
-
?>
|
766 |
<div class="custom_isf dynamic-table">
|
767 |
<table class="striped">
|
768 |
<thead>
|
769 |
<tr>
|
770 |
<th></th>
|
771 |
-
<th><?php
|
772 |
-
|
773 |
?> (px)</th>
|
774 |
-
<th><?php
|
775 |
-
|
776 |
?> (%)</th>
|
777 |
</tr>
|
778 |
</thead>
|
779 |
<tbody>
|
780 |
</tbody>
|
781 |
</table>
|
782 |
-
<input type="hidden" name="ftg_imageSizeFactorCustom" value="<?php
|
783 |
-
ftg_p( $gallery, "imageSizeFactorCustom" );
|
784 |
?>" />
|
785 |
<a href="#" class="add button">
|
786 |
-
<?php
|
787 |
-
|
788 |
?></a>
|
789 |
</div>
|
790 |
-
<?php
|
791 |
-
}
|
792 |
-
|
793 |
-
?>
|
794 |
-
<div class="help" id="help-<?php
|
795 |
-
echo $f ;
|
796 |
?>">
|
797 |
-
<?php
|
798 |
-
|
799 |
-
if ( !in_array( 'shortcode', $data["excludeFrom"] ) && $data["type"] != "cta" ) {
|
800 |
-
?>
|
801 |
<div class="ftg-code">
|
802 |
-
<a href="#" class="toggle-shortcode" data-code="<?php
|
803 |
-
print $f;
|
804 |
?>"><i class="fa fa-eye-slash"></i></a>
|
805 |
-
<span id="shortcode-<?php
|
806 |
-
|
807 |
?>">
|
808 |
-
<?php
|
809 |
-
_e( 'Shortcode attribute', 'final-tiles-grid-gallery-lite' );
|
810 |
?>:
|
811 |
-
<code class="shortcode-val"><?php
|
812 |
-
_e( FinalTilesGalleryUtils::fieldNameToShortcode( $f ) );
|
813 |
-
?>="<?php
|
814 |
-
ftg_p( $gallery, $f, $data["default"] );
|
815 |
?>"</code>
|
816 |
</span>
|
817 |
</div>
|
818 |
-
<?php
|
819 |
-
}
|
820 |
-
|
821 |
-
?>
|
822 |
</div>
|
823 |
|
824 |
</div>
|
825 |
</td>
|
826 |
</tr>
|
827 |
-
<?php
|
828 |
-
}
|
829 |
-
|
830 |
-
?>
|
831 |
-
<?php
|
832 |
-
}
|
833 |
-
?>
|
834 |
</tbody>
|
835 |
</table>
|
836 |
</div>
|
837 |
</li>
|
838 |
-
<?php
|
839 |
-
$idx++;
|
840 |
-
?>
|
841 |
-
<?php
|
842 |
-
}
|
843 |
-
?>
|
844 |
|
845 |
</ul>
|
846 |
</div>
|
847 |
<div class="col s3">
|
848 |
-
<?php
|
849 |
-
|
850 |
-
if ( ftg_fs()->is_not_paying() ) {
|
851 |
-
?>
|
852 |
<ul class="collapsible gallery-actions">
|
853 |
<li class="active">
|
854 |
-
<div class="collapsible-header"><?php
|
855 |
-
_e( 'Upgrade', 'final-tiles-grid-gallery-lite' );
|
856 |
-
?>: <?php
|
857 |
-
|
858 |
?></div>
|
859 |
<div class="collapsible-body">
|
860 |
<div class="ftg-upsell">
|
861 |
-
<a href="<?php
|
862 |
-
echo ftg_fs()->get_upgrade_url() ;
|
863 |
-
?>"><i class="fa fa-hand-o-right"></i> <?php
|
864 |
-
|
865 |
?></a>
|
866 |
</div>
|
867 |
-
<p
|
|
|
|
|
|
|
|
|
868 |
<div class="ftg-upsell">
|
869 |
<a target="_blank" href="https://www.final-tiles-gallery.com/wordpress/bundle">
|
870 |
<i class="fa fa-star"></i>
|
871 |
-
|
872 |
-
|
|
|
|
|
873 |
?></a>
|
874 |
</div>
|
875 |
<p class="upsell-info">
|
876 |
-
<?php
|
877 |
-
|
878 |
?>: Final Tiles Gallery Ultimate + EverlightBox + PostSnippet
|
879 |
</p>
|
880 |
</div>
|
881 |
</li>
|
882 |
</ul>
|
883 |
-
<?php
|
884 |
-
}
|
885 |
-
|
886 |
-
?>
|
887 |
<ul class="collapsible gallery-actions">
|
888 |
<li class="active">
|
889 |
-
<div class="collapsible-header"><?php
|
890 |
-
|
891 |
?> <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>
|
892 |
<div class="collapsible-body">
|
893 |
<div>
|
894 |
-
<input readonly="" type="text" value="[FinalTilesGallery id='<?php
|
895 |
-
|
896 |
?>']" style="max-width:200px;display:inline-block;">
|
897 |
<a href="#" title="Click to copy shortcode" class="copy-ftg-shortcode button button-primary dashicons dashicons-format-gallery" style="width:40px; display: inline-block;"></a><span style="margin-left:15px;"></span>
|
898 |
</div>
|
899 |
<div>
|
900 |
-
<button data-update-gallery class="button components-button is-primary"><?php
|
901 |
-
|
902 |
?></button>
|
903 |
</div>
|
904 |
</div>
|
905 |
</li>
|
906 |
<li>
|
907 |
-
<div class="collapsible-header"><?php
|
908 |
-
_e( 'Import settings', 'final-tiles-grid-gallery-lite' );
|
909 |
?> <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>
|
910 |
<div class="collapsible-body">
|
911 |
-
<p><?php
|
912 |
-
|
913 |
?></p>
|
914 |
<div><textarea data-import-text></textarea></div>
|
915 |
-
<button data-ftg-import class="button"><i class="fa fa-upload"></i> <?php
|
916 |
-
|
917 |
?></button>
|
918 |
</div>
|
919 |
</li>
|
920 |
<li>
|
921 |
-
<div class="collapsible-header"><?php
|
922 |
-
_e( 'Export settings', 'final-tiles-grid-gallery-lite' );
|
923 |
?> <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>
|
924 |
<div class="collapsible-body">
|
925 |
-
<p><?php
|
926 |
-
_e( 'Settings', 'final-tiles-grid-gallery-lite' );
|
927 |
?></p>
|
928 |
<div><textarea readonly id="ftg-export-code"></textarea></div>
|
929 |
-
<button id="ftg-export" class="button"><i class="fa fa-download"></i> <?php
|
930 |
-
_e( 'Refresh code', 'final-tiles-grid-gallery-lite' );
|
931 |
?></button>
|
932 |
</div>
|
933 |
</li>
|
934 |
<li>
|
935 |
-
<div class="collapsible-header"><?php
|
936 |
-
_e( 'Help', 'final-tiles-grid-gallery-lite' );
|
937 |
?> <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>
|
938 |
<div class="collapsible-body">
|
939 |
<ul class="collection">
|
940 |
<li class="collection-item">
|
941 |
<i class="fa fa-chevron-right"></i>
|
942 |
-
<a href="http://issuu.com/greentreelabs/docs/finaltilesgridgallery-documentation?e=17859916/13243836" target="_blank"><?php
|
943 |
-
_e( 'Documentation', 'final-tiles-grid-gallery-lite' );
|
944 |
?></a></li>
|
945 |
<li class="collection-item">
|
946 |
<i class="fa fa-chevron-right"></i>
|
947 |
<a target="_blank" href="https://www.youtube.com/watch?v=RNT4JGjtyrs">
|
948 |
-
<?php
|
949 |
-
_e( 'Tutorial', 'final-tiles-grid-gallery-lite' );
|
950 |
?></a>
|
951 |
</li>
|
952 |
<li class="collection-item">
|
953 |
<i class="fa fa-chevron-right"></i>
|
954 |
-
<a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-additional-image-sizes-in-wordpress/" target="_blank"><?php
|
955 |
-
_e( 'How to add additional image sizes', 'final-tiles-grid-gallery-lite' );
|
956 |
?></a>
|
957 |
</li>
|
958 |
</ul>
|
@@ -961,38 +971,38 @@ _e( 'How to add additional image sizes', 'final-tiles-grid-gallery-lite' );
|
|
961 |
</ul>
|
962 |
<ul class="collapsible gallery-actions">
|
963 |
<li>
|
964 |
-
<div class="collapsible-header"><?php
|
965 |
-
_e( 'FAQ', 'final-tiles-grid-gallery-lite' );
|
966 |
?> <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>
|
967 |
<div class="collapsible-body">
|
968 |
<ul class="collapsible gallery-actions">
|
969 |
<li>
|
970 |
-
<div class="collapsible-header"><?php
|
971 |
-
_e( 'How can I change the grid on mobile?', 'final-tiles-grid-gallery-lite' );
|
972 |
?> <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>
|
973 |
<div class="collapsible-body">
|
974 |
-
<p><?php
|
975 |
-
_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' );
|
976 |
?></p>
|
977 |
</div>
|
978 |
</li>
|
979 |
<li>
|
980 |
-
<div class="collapsible-header"><?php
|
981 |
-
_e( 'How to add a link to a picture?', 'final-tiles-grid-gallery-lite' );
|
982 |
?> <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>
|
983 |
<div class="collapsible-body">
|
984 |
-
<p><?php
|
985 |
-
_e( 'Click the edit (pencil) icon on the image and insert the link inside the "Link" field', 'final-tiles-grid-gallery-lite' );
|
986 |
?></p>
|
987 |
</div>
|
988 |
</li>
|
989 |
<li>
|
990 |
-
<div class="collapsible-header"><?php
|
991 |
-
_e( 'Why my images look blurry?', 'final-tiles-grid-gallery-lite' );
|
992 |
?> <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>
|
993 |
<div class="collapsible-body">
|
994 |
-
<p><?php
|
995 |
-
_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' );
|
996 |
?></p>
|
997 |
</div>
|
998 |
</li>
|
@@ -1008,35 +1018,35 @@ _e( 'You probably have chosen a small image size. Click the edit (pencil) icon o
|
|
1008 |
<!-- video panel -->
|
1009 |
<div id="video-panel-model" class="modal">
|
1010 |
<div class="modal-content">
|
1011 |
-
<p><?php
|
1012 |
-
_e( 'Paste here the embed code (it must be an ', 'final-tiles-grid-gallery-lite' );
|
1013 |
-
?><strong><?php
|
1014 |
-
_e( 'iframe', 'final-tiles-grid-gallery-lite' );
|
1015 |
?></strong>
|
1016 |
-
<?php
|
1017 |
-
_e( 'and it must contain the attributes', 'final-tiles-grid-gallery-lite' );
|
1018 |
-
?> <strong><?php
|
1019 |
-
_e( 'width', 'final-tiles-grid-gallery-lite' );
|
1020 |
-
?></strong> <?php
|
1021 |
-
_e( 'and', 'final-tiles-grid-gallery-lite' );
|
1022 |
-
?><strong><?php
|
1023 |
-
_e( ' height', 'final-tiles-grid-gallery-lite' );
|
1024 |
?></strong>)</p>
|
1025 |
<div class="text dark">
|
1026 |
<textarea></textarea>
|
1027 |
</div>
|
1028 |
<div class="field video-filters clearfix" ></div>
|
1029 |
-
<input type="hidden" id="filter-video" value="<?php
|
1030 |
-
print $gallery->filters;
|
1031 |
?>">
|
1032 |
</div>
|
1033 |
<input type="hidden" id="video-panel-action" >
|
1034 |
<div class="field buttons modal-footer">
|
1035 |
-
<a href="#" data-action="edit" class="action positive save modal-action modal-close waves-effect waves-green btn-flat"><?php
|
1036 |
-
_e( 'Save', 'final-tiles-grid-gallery-lite' );
|
1037 |
?></a>
|
1038 |
-
<a href="#" data-action="cancel" class="action neutral modal-action modal-close waves-effect waves-yellow btn-flat"><?php
|
1039 |
-
_e( 'Cancel', 'final-tiles-grid-gallery-lite' );
|
1040 |
?></a>
|
1041 |
</div>
|
1042 |
</div>
|
@@ -1045,8 +1055,8 @@ _e( 'Cancel', 'final-tiles-grid-gallery-lite' );
|
|
1045 |
<!-- image panel -->
|
1046 |
<div id="image-panel-model" class="modal">
|
1047 |
<div class="modal-content cf">
|
1048 |
-
<h4><?php
|
1049 |
-
_e( 'Edit image', 'final-tiles-grid-gallery-lite' );
|
1050 |
?></h4>
|
1051 |
<div class="left">
|
1052 |
<div class="figure"></div>
|
@@ -1054,26 +1064,26 @@ _e( 'Edit image', 'final-tiles-grid-gallery-lite' );
|
|
1054 |
</div>
|
1055 |
<div class="right-side">
|
1056 |
<div class="field">
|
1057 |
-
<label><?php
|
1058 |
-
_e( 'Title', 'final-tiles-grid-gallery-lite' );
|
1059 |
?></label>
|
1060 |
<div class="text">
|
1061 |
<textarea name="imageTitle"></textarea>
|
1062 |
</div>
|
1063 |
</div>
|
1064 |
<div class="field">
|
1065 |
-
<label><?php
|
1066 |
-
_e( 'Caption', 'final-tiles-grid-gallery-lite' );
|
1067 |
?></label>
|
1068 |
<div class="text">
|
1069 |
<textarea name="description"></textarea>
|
1070 |
</div>
|
1071 |
</div>
|
1072 |
<div class="field">
|
1073 |
-
<label><?php
|
1074 |
-
_e( 'Alt', 'final-tiles-grid-gallery-lite' );
|
1075 |
-
?> <?php
|
1076 |
-
_e( '(leave empty to use title or description as ALT attribute)', 'final-tiles-grid-gallery-lite' );
|
1077 |
?></label>
|
1078 |
<div class="text">
|
1079 |
<input type="text" name="alt" />
|
@@ -1082,9 +1092,9 @@ _e( '(leave empty to use title or description as ALT attribute)', 'final-tiles-g
|
|
1082 |
<div class="field">
|
1083 |
<input class="browser-default" id="hidden-image" type="checkbox" name="hidden" value="T" />
|
1084 |
<label for="hidden-image">
|
1085 |
-
<?php
|
1086 |
-
_e( 'Hidden, visible only with lightbox', 'final-tiles-grid-gallery-lite' );
|
1087 |
-
?>
|
1088 |
</label>
|
1089 |
</div>
|
1090 |
<div class="field js-no-hidden">
|
@@ -1092,43 +1102,43 @@ _e( 'Hidden, visible only with lightbox', 'final-tiles-grid-gallery-lite' );
|
|
1092 |
<table>
|
1093 |
<tr>
|
1094 |
<td style="width: 60%">
|
1095 |
-
<label><?php
|
1096 |
-
_e( 'Link', 'final-tiles-grid-gallery-lite' );
|
1097 |
?></label><br>
|
1098 |
<input type="text" size="20" value="" name="link" />
|
1099 |
</td>
|
1100 |
<td>
|
1101 |
-
<label><?php
|
1102 |
-
_e( 'Link target', 'final-tiles-grid-gallery-lite' );
|
1103 |
?></label>
|
1104 |
<select name="target" class="browser-default">
|
1105 |
-
<option value="default"><?php
|
1106 |
-
_e( 'Default target', 'final-tiles-grid-gallery-lite' );
|
1107 |
?></option>
|
1108 |
-
<option value="_self"><?php
|
1109 |
-
_e( 'Open in same page', 'final-tiles-grid-gallery-lite' );
|
1110 |
?></option>
|
1111 |
-
<option value="_blank"><?php
|
1112 |
-
_e( 'Open in _blank', 'final-tiles-grid-gallery-lite' );
|
1113 |
?></option>
|
1114 |
-
<option value="_lightbox"><?php
|
1115 |
-
_e( 'Open in lightbox (when using a lightbox)', 'final-tiles-grid-gallery-lite' );
|
1116 |
?></option>
|
1117 |
</select>
|
1118 |
</td>
|
1119 |
</tr>
|
1120 |
</table>
|
1121 |
</div>
|
1122 |
-
<?php
|
1123 |
-
?>
|
1124 |
</div>
|
1125 |
</div>
|
1126 |
<div class="field buttons modal-footer">
|
1127 |
-
<a href="#" data-action="cancel" class="modal-close action button"><i class="mdi-content-reply"></i> <?php
|
1128 |
-
_e( 'Cancel', 'final-tiles-grid-gallery-lite' );
|
1129 |
?></a>
|
1130 |
-
<a href="#" data-action="save" class="modal-close button components-button is-primary"><i class="fa fa-save"></i> <?php
|
1131 |
-
_e( 'Save', 'final-tiles-grid-gallery-lite' );
|
1132 |
?></a>
|
1133 |
</div>
|
1134 |
</div>
|
@@ -1150,20 +1160,20 @@ _e( 'Save', 'final-tiles-grid-gallery-lite' );
|
|
1150 |
|
1151 |
<script>
|
1152 |
var presets = {};
|
1153 |
-
<?php
|
1154 |
-
$presetIdx = 0;
|
1155 |
-
foreach ( $ftg_fields as $section => $s ) {
|
1156 |
-
if ( array_key_exists( "presets", $s ) ) {
|
1157 |
-
foreach ( $s["presets"] as $preset => $values ) {
|
1158 |
-
echo "presets['preset_" . $presetIdx . "_" . $preset . "'] = " . json_encode( $values ) . ";\n" ;
|
1159 |
-
}
|
1160 |
-
}
|
1161 |
-
$presetIdx++;
|
1162 |
-
}
|
1163 |
-
?>
|
1164 |
|
1165 |
-
var ftg_wp_caption_field = '<?php
|
1166 |
-
ftg_p( $gallery, "wp_field_caption" );
|
1167 |
?>';
|
1168 |
(function ($) {
|
1169 |
$("[name=captionFullHeight]").change(function () {
|
@@ -1177,8 +1187,8 @@ ftg_p( $gallery, "wp_field_caption" );
|
|
1177 |
}
|
1178 |
});
|
1179 |
|
1180 |
-
<?php
|
1181 |
-
?>
|
1182 |
|
1183 |
})(jQuery);
|
1184 |
</script>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !function_exists( 'ftg_p' ) ) {
|
4 |
+
function ftg_p( $gallery, $field, $default = NULL )
|
5 |
+
{
|
6 |
+
global $ftg_options ;
|
7 |
+
|
8 |
+
if ( $ftg_options ) {
|
9 |
+
if ( array_key_exists( $field, $ftg_options ) ) {
|
10 |
+
print stripslashes( $ftg_options[$field] );
|
11 |
+
}
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
|
15 |
+
|
16 |
+
if ( $gallery == NULL || $gallery->{$field} === NULL ) {
|
17 |
+
|
18 |
+
if ( $default === NULL ) {
|
19 |
+
print "";
|
20 |
+
} else {
|
21 |
+
print stripslashes( $default );
|
22 |
+
}
|
23 |
+
|
24 |
+
} else {
|
25 |
+
print stripslashes( $gallery->{$field} );
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
function ftg_sel(
|
31 |
+
$gallery,
|
32 |
+
$field,
|
33 |
+
$value,
|
34 |
+
$type = "selected"
|
35 |
+
)
|
36 |
+
{
|
37 |
+
global $ftg_options ;
|
38 |
+
|
39 |
+
if ( $ftg_options && $ftg_options[$field] == $value ) {
|
40 |
+
print $type;
|
41 |
+
return;
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
if ( $gallery == NULL || !isset( $gallery->{$field} ) ) {
|
46 |
+
print "";
|
47 |
+
} else {
|
48 |
+
if ( $gallery->{$field} == $value ) {
|
49 |
+
print $type;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
function ftg_checkFieldDisabled( $options )
|
56 |
+
{
|
57 |
+
if ( is_array( $options ) && count( $options ) == 3 && $options[2] == "disabled" ) {
|
58 |
+
return "disabled";
|
59 |
+
}
|
60 |
+
return "";
|
61 |
+
}
|
62 |
+
|
63 |
+
function ftg_checkDisabledOption( $plan )
|
64 |
+
{
|
65 |
+
return "disabled";
|
66 |
+
return "";
|
67 |
+
}
|
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 |
+
}
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
global $ftg_parent_page ;
|
86 |
+
global $ftg_fields ;
|
87 |
+
$filters = array();
|
88 |
+
//print_r($gallery);
|
89 |
+
$idx = 0;
|
90 |
+
function ftgSortByName( $a, $b )
|
91 |
+
{
|
92 |
+
return $a["name"] > $b["name"];
|
93 |
+
}
|
94 |
+
|
95 |
+
?>
|
96 |
|
97 |
<div class="row">
|
98 |
<div class="col s9">
|
99 |
<ul class="collapsible" id="all-settings" data-collapsible="accordion">
|
100 |
<li id="images" class="active">
|
101 |
<div class="collapsible-header">
|
102 |
+
<i class="fa fa-picture-o light-green darken-1 white-text ftg-section-icon"></i> <?php
|
103 |
+
esc_html_e( 'Images', 'final-tiles-grid-gallery-lite' );
|
104 |
+
?>
|
105 |
</div>
|
106 |
<div class="collapsible-body" style="display:block">
|
107 |
<div class="actions">
|
108 |
<div class="images-bar">
|
109 |
<select name="ftg_source" class="browser-default">
|
110 |
+
<option <?php
|
111 |
+
ftg_sel( $gallery, "source", "images" );
|
112 |
+
?> value="images"><?php
|
113 |
+
esc_html_e( 'User images', 'final-tiles-grid-gallery-lite' );
|
114 |
?></option>
|
115 |
+
<option <?php
|
116 |
+
ftg_sel( $gallery, "source", "posts" );
|
117 |
+
?> value="posts" <?php
|
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 |
+
|
125 |
+
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
126 |
+
?>
|
127 |
+
<option <?php
|
128 |
+
ftg_sel( $gallery, "source", "woocommerce" );
|
129 |
+
?> value="woocommerce" <?php
|
130 |
+
echo ftg_checkDisabledOption( 'ultimate' ) ;
|
131 |
+
?>><?php
|
132 |
+
_e( 'WooCommerce products', 'final-tiles-grid-gallery-lite' );
|
133 |
+
echo ftg_printPro( 'ultimate' ) ;
|
134 |
?></option>
|
135 |
+
<?php
|
136 |
+
}
|
137 |
+
|
138 |
+
?>
|
139 |
</select>
|
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>
|
147 |
|
148 |
<a href="#" class="open-media-panel button">
|
149 |
+
<?php
|
150 |
+
esc_html_e( 'Add images', 'final-tiles-grid-gallery-lite' );
|
151 |
+
?>
|
152 |
</a>
|
153 |
+
<?php
|
154 |
+
?>
|
155 |
+
<a onclick="alert('Upgrade to unlock')" href="#" class=" button"><?php
|
156 |
+
esc_html_e( 'Add video', 'final-tiles-grid-gallery-lite' );
|
157 |
?></a>
|
158 |
+
<?php
|
159 |
+
?>
|
160 |
+
<a class="button button-delete" data-remove-images href="#!"><?php
|
161 |
+
esc_html_e( 'Remove selected', 'final-tiles-grid-gallery-lite' );
|
162 |
?></a>
|
163 |
</div>
|
164 |
<div class="row selection-row">
|
165 |
<div class="bulk options">
|
166 |
<span>
|
167 |
+
<a class="button" href="#" data-action="select"><?php
|
168 |
+
esc_html_e( 'Select all', 'final-tiles-grid-gallery-lite' );
|
169 |
?></a>
|
170 |
+
<a class="button" href="#" data-action="deselect"><?php
|
171 |
+
esc_html_e( 'Deselect all', 'final-tiles-grid-gallery-lite' );
|
172 |
?></a>
|
173 |
+
<a class="button" href="#" data-action="toggle"><?php
|
174 |
+
esc_html_e( 'Toggle selection', 'final-tiles-grid-gallery-lite' );
|
175 |
?></a>
|
176 |
</span>
|
177 |
<span>
|
178 |
+
<?php
|
179 |
+
?>
|
180 |
+
<?php
|
181 |
+
?>
|
182 |
</span>
|
183 |
<span>
|
184 |
+
<a class="button" href="#" data-action="show-hide"><?php
|
185 |
+
esc_html_e( 'Toggle visibility', 'final-tiles-grid-gallery-lite' );
|
186 |
?></a>
|
187 |
</span>
|
188 |
</div>
|
189 |
</div>
|
190 |
+
<?php
|
191 |
+
|
192 |
+
if ( is_array( $filters ) && count( $filters ) > 1 ) {
|
193 |
+
?>
|
194 |
<div class="row filter-list">
|
195 |
+
<b> <?php
|
196 |
+
esc_html_e( 'Select by filter:', 'final-tiles-grid-gallery-lite' );
|
197 |
?> </b>
|
198 |
<span class="filter-select-control">
|
199 |
+
<?php
|
200 |
+
foreach ( $filters as $filter ) {
|
201 |
+
?>
|
202 |
+
<em class='button filter-item' ><?php
|
203 |
+
echo esc_html( $filter ) ;
|
204 |
?></em>
|
205 |
+
<?php
|
206 |
+
}
|
207 |
+
?>
|
208 |
</span>
|
209 |
</div>
|
210 |
+
<?php
|
211 |
+
}
|
212 |
+
|
213 |
+
?>
|
214 |
</div>
|
215 |
<div id="image-list" class="row"></div>
|
216 |
|
217 |
<div class="actions">
|
218 |
<div class="row">
|
219 |
+
<?php
|
220 |
+
esc_html_e( 'Add links by clicking the EDIT (pencil) button', 'final-tiles-grid-gallery-lite' );
|
221 |
?><br>
|
222 |
+
<?php
|
223 |
+
esc_html_e( 'Drag the images to change their order.', 'final-tiles-grid-gallery-lite' );
|
224 |
+
?>
|
225 |
</div>
|
226 |
</div>
|
227 |
<div id="images" class="ftg-section form-fields">
|
229 |
<div class="row">
|
230 |
<label>Taxonomy operator</label>
|
231 |
<select name="ftg_taxonomyOperator" class="browser-default js-ajax-loading-control">
|
232 |
+
<option <?php
|
233 |
+
ftg_sel( $gallery, "taxonomyOperator", "OR" );
|
234 |
+
?> value="OR"><?php
|
235 |
+
esc_html_e( 'OR: all posts matching 1 ore more selected taxonomies', 'final-tiles-grid-gallery-lite' );
|
236 |
+
?></option>
|
237 |
+
<option <?php
|
238 |
+
ftg_sel( $gallery, "taxonomyOperator", "AND" );
|
239 |
+
?> value="AND"><?php
|
240 |
+
esc_html_e( 'AND: all posts matching all the selected taxonomies', 'final-tiles-grid-gallery-lite' );
|
241 |
+
?> </option>
|
242 |
</select>
|
243 |
</div>
|
244 |
<div class="row">
|
245 |
<label>Taxonomy as filter</label>
|
246 |
<select name="ftg_taxonomyAsFilter" class="browser-default js-ajax-loading-control">
|
247 |
<option></option>
|
248 |
+
<?php
|
249 |
+
foreach ( get_taxonomies( array(), "objects" ) as $taxonomy => $t ) {
|
250 |
+
?>
|
251 |
+
<?php
|
252 |
+
|
253 |
+
if ( $t->publicly_queryable ) {
|
254 |
+
?>
|
255 |
+
<option <?php
|
256 |
+
ftg_sel( $gallery, "taxonomyAsFilter", $t->label );
|
257 |
+
?> value="<?php
|
258 |
+
esc_attr_e( $t->label );
|
259 |
+
?>"><?php
|
260 |
+
echo esc_html( $t->label ) ;
|
261 |
?></option>
|
262 |
+
<?php
|
263 |
+
}
|
264 |
+
|
265 |
+
?>
|
266 |
+
<?php
|
267 |
+
}
|
268 |
+
?>
|
269 |
</select>
|
270 |
</div>
|
271 |
<div class="row checkboxes">
|
272 |
+
<strong class="label"><?php
|
273 |
+
esc_html_e( 'Post type:', 'final-tiles-grid-gallery-lite' );
|
274 |
?></strong>
|
275 |
<span>
|
276 |
+
<?php
|
277 |
+
$idx = 0;
|
278 |
+
?>
|
279 |
+
<?php
|
280 |
+
foreach ( get_post_types( '', 'names' ) as $t ) {
|
281 |
+
?>
|
282 |
+
<?php
|
283 |
+
|
284 |
+
if ( !in_array( $t, $excluded_post_types ) ) {
|
285 |
+
?>
|
286 |
<span class="tax-item">
|
287 |
+
<input class="browser-default" id="post-type-<?php
|
288 |
+
echo esc_attr( $idx ) ;
|
289 |
+
?>" type="checkbox" name="post_types" value="<?php
|
290 |
+
echo esc_attr( $t ) ;
|
291 |
?>">
|
292 |
+
<label for="post-type-<?php
|
293 |
+
echo esc_attr( $idx ) ;
|
294 |
+
?>"><?php
|
295 |
+
echo esc_html( $t ) ;
|
296 |
?></label>
|
297 |
</span>
|
298 |
+
<?php
|
299 |
+
$idx++;
|
300 |
+
?>
|
301 |
+
<?php
|
302 |
+
}
|
303 |
+
|
304 |
+
?>
|
305 |
+
<?php
|
306 |
+
}
|
307 |
+
?>
|
308 |
+
<input type="hidden" name="ftg_post_types" value="<?php
|
309 |
+
echo esc_attr( $gallery->post_types ) ;
|
310 |
?>" />
|
311 |
</span>
|
312 |
</div>
|
313 |
+
<?php
|
314 |
+
//print_r(get_taxonomies(array(), "objects")); exit();
|
315 |
+
?>
|
316 |
+
<?php
|
317 |
+
foreach ( get_taxonomies( array(), "objects" ) as $taxonomy => $t ) {
|
318 |
+
?>
|
319 |
+
<?php
|
320 |
+
|
321 |
+
if ( $t->publicly_queryable ) {
|
322 |
+
?>
|
323 |
+
<?php
|
324 |
+
$items = get_terms( $taxonomy, array(
|
325 |
+
"hide_empty" => false,
|
326 |
+
) );
|
327 |
+
?>
|
328 |
+
<?php
|
329 |
+
|
330 |
+
if ( count( $items ) > 0 ) {
|
331 |
+
?>
|
332 |
+
<?php
|
333 |
+
//print_r($items);
|
334 |
+
?>
|
335 |
<div class="row checkboxes">
|
336 |
+
<strong class="label"><?php
|
337 |
+
echo esc_html( $t->label ) ;
|
338 |
?></strong>
|
339 |
<span>
|
340 |
+
<?php
|
341 |
+
$idx = 0;
|
342 |
+
?>
|
343 |
+
<?php
|
344 |
+
foreach ( $items as $c ) {
|
345 |
+
?>
|
346 |
<span class="tax-item">
|
347 |
+
<input id="post-tax-<?php
|
348 |
+
echo esc_attr( $c->term_id ) ;
|
349 |
+
?>" type="checkbox" name="post_taxonomy" data-taxonomy="<?php
|
350 |
+
echo esc_attr( $t->name ) ;
|
351 |
+
?>" value="<?php
|
352 |
+
echo esc_attr( $c->term_id ) ;
|
353 |
?>">
|
354 |
+
<label for="post-tax-<?php
|
355 |
+
echo esc_attr( $c->term_id ) ;
|
356 |
+
?>"><?php
|
357 |
+
echo esc_html( $c->name ) ;
|
358 |
?></label>
|
359 |
</span>
|
360 |
+
<?php
|
361 |
+
$idx++;
|
362 |
+
?>
|
363 |
+
<?php
|
364 |
+
}
|
365 |
+
?>
|
366 |
</span>
|
367 |
</div>
|
368 |
+
<?php
|
369 |
+
}
|
370 |
+
|
371 |
+
?>
|
372 |
+
<?php
|
373 |
+
}
|
374 |
+
|
375 |
+
?>
|
376 |
+
<?php
|
377 |
+
}
|
378 |
+
?>
|
379 |
+
<input type="hidden" name="ftg_post_taxonomies" value="<?php
|
380 |
+
echo esc_attr( $gallery->post_taxonomies ) ;
|
381 |
?>" />
|
382 |
<div class="row checkboxes">
|
383 |
+
<strong class="label"><?php
|
384 |
+
esc_html_e( 'Max posts:', 'final-tiles-grid-gallery-lite' );
|
385 |
?></strong>
|
386 |
<span class="aside">
|
387 |
+
<input type="text" name="ftg_max_posts" value="<?php
|
388 |
+
echo esc_attr( $gallery->max_posts ) ;
|
389 |
?>">
|
390 |
+
<span><?php
|
391 |
+
esc_html_e( '(enter 0 for unlimited posts)', 'final-tiles-grid-gallery-lite' );
|
392 |
?></span>
|
393 |
</span>
|
394 |
</div>
|
395 |
</div>
|
396 |
+
<?php
|
397 |
+
|
398 |
+
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
399 |
+
?>
|
400 |
<div class="actions source-woocommerce source-panel">
|
401 |
<div class="row checkboxes">
|
402 |
+
<strong class="label"><?php
|
403 |
+
_e( 'Categories', 'final-tiles-grid-gallery-lite' );
|
404 |
?>:</strong>
|
405 |
<span>
|
406 |
+
<?php
|
407 |
+
$idx = 0;
|
408 |
+
?>
|
409 |
+
<?php
|
410 |
+
foreach ( $woo_categories as $c ) {
|
411 |
+
?>
|
412 |
+
<input class="browser-default" id="woo-cat-<?php
|
413 |
+
echo esc_attr( $idx ) ;
|
414 |
+
?>" type="checkbox" name="woo_cat" value="<?php
|
415 |
+
echo esc_attr( $c->term_id ) ;
|
416 |
?>">
|
417 |
+
<label for="woo-cat-<?php
|
418 |
+
echo esc_attr( $idx ) ;
|
419 |
+
?>"><?php
|
420 |
+
echo esc_html( $c->cat_name ) ;
|
421 |
?></label>
|
422 |
+
<?php
|
423 |
+
$idx++;
|
424 |
+
?>
|
425 |
+
<?php
|
426 |
+
}
|
427 |
+
?>
|
428 |
+
<input type="hidden" name="ftg_woo_categories" value="<?php
|
429 |
+
echo esc_attr( $gallery->woo_categories ) ;
|
430 |
?>" />
|
431 |
</span>
|
432 |
</div>
|
433 |
</div>
|
434 |
+
<?php
|
435 |
+
}
|
436 |
+
|
437 |
+
?>
|
438 |
</div>
|
439 |
</div>
|
440 |
</li>
|
441 |
+
<?php
|
442 |
+
foreach ( $ftg_fields as $section => $s ) {
|
443 |
+
?>
|
444 |
+
<li id="<?php
|
445 |
+
_e( FinalTiles_Gallery::slugify( $section ) );
|
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 |
+
?>
|
453 |
</div>
|
454 |
<div class="collapsible-body tab form-fields">
|
455 |
<div class="jump-head">
|
456 |
+
<?php
|
457 |
+
$jumpFields = array();
|
458 |
+
foreach ( $s["fields"] as $f => $data ) {
|
459 |
+
$jumpFields[$f] = $data;
|
460 |
+
$jumpFields[$f]['_code'] = $f;
|
461 |
+
}
|
462 |
+
unset( $f );
|
463 |
+
unset( $data );
|
464 |
+
usort( $jumpFields, "ftgSortByName" );
|
465 |
+
?>
|
466 |
<select class="browser-default jump">
|
467 |
+
<option><?php
|
468 |
+
esc_html_e( 'Jump to setting', 'final-tiles-grid-gallery-lite' );
|
469 |
?></option>
|
470 |
+
<?php
|
471 |
+
foreach ( $jumpFields as $f => $data ) {
|
472 |
+
?>
|
473 |
+
<?php
|
474 |
+
|
475 |
+
if ( is_array( $data["excludeFrom"] ) && !in_array( $ftg_parent_page, $data["excludeFrom"] ) ) {
|
476 |
+
?>
|
477 |
+
<option value="<?php
|
478 |
+
esc_attr_e( $data['_code'], 'final-tiles-grid-gallery-lite' );
|
479 |
?>">
|
480 |
+
<?php
|
481 |
+
esc_html_e( $data["name"], 'final-tiles-grid-gallery-lite' );
|
482 |
+
?>
|
483 |
</option>
|
484 |
+
<?php
|
485 |
+
}
|
486 |
+
|
487 |
+
?>
|
488 |
+
<?php
|
489 |
+
}
|
490 |
+
?>
|
491 |
</select>
|
492 |
|
493 |
+
<?php
|
494 |
+
|
495 |
+
if ( array_key_exists( "presets", $s ) ) {
|
496 |
+
?>
|
497 |
+
<select class="browser-default presets" data-field-idx="<?php
|
498 |
+
echo esc_attr( $idx ) ;
|
499 |
?>">
|
500 |
<option value="">Select preset</option>
|
501 |
+
<?php
|
502 |
+
foreach ( $s["presets"] as $preset => $data ) {
|
503 |
+
?>
|
504 |
+
<option><?php
|
505 |
+
echo esc_html( $preset ) ;
|
506 |
?></option>
|
507 |
+
<?php
|
508 |
+
}
|
509 |
+
?>
|
510 |
</select>
|
511 |
+
<?php
|
512 |
+
}
|
513 |
+
|
514 |
+
?>
|
515 |
</div>
|
516 |
<table>
|
517 |
<tbody>
|
518 |
+
<?php
|
519 |
+
foreach ( $s["fields"] as $f => $data ) {
|
520 |
+
?>
|
521 |
+
<?php
|
522 |
+
|
523 |
+
if ( is_array( $data["excludeFrom"] ) && !in_array( $ftg_parent_page, $data["excludeFrom"] ) ) {
|
524 |
+
?>
|
525 |
|
526 |
+
<tr class="field-row row-<?php
|
527 |
+
echo esc_attr( $f ) ;
|
528 |
+
?> <?php
|
529 |
+
echo esc_attr( $data["type"] ) ;
|
530 |
?>">
|
531 |
<th scope="row">
|
532 |