PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 2.21
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v2.21
3.36 3.35 3.34 3.33 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.40 2.41 2.42 2.43 2.44 All 141 releases
photonic / admin / edit-gallery-templates.php

edit-gallery-templates.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others 2.21, at admin/edit-gallery-templates.php

50 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 require_once(trailingslashit(plugin_dir_path(__FILE__)).'/../photonic-form.php');
4 $providers = array('default', 'flickr', 'google', 'smugmug', 'zenfolio', 'instagram');
5
6 foreach ($providers as $provider) {
7 ?>
8 <script type="text/html" id="tmpl-photonic-editor-<?php echo $provider; ?>">
9 <?php
10 $field_list = $fields[$provider]['fields'];
11 echo "<div class='photonic-form'>\n";
12 echo "<h2>Photonic ".($provider == 'default' ? 'WP' : $provider)." Gallery Settings</h2>\n";
13 foreach ($field_list as $field) {
14 echo "\t<label class='setting'>\n";
15 echo "\t\t<span class='label'>{$field['name']} " . (isset($field['req']) && $field['req'] ? '(*)' : '') . " </span>\n";
16 $alt_id = !empty($field['alt_id']) ? " alt_id='{$field['alt_id']}' " : '';
17 switch ($field['type']) {
18 case 'text':
19 echo "\t\t<input type='text' name='{$field['id']}' value='" . (isset($field['std']) ? $field['std'] : '') . "' $alt_id/>\n";
20 break;
21
22 case 'select':
23 echo "\t\t<select name='{$field['id']}' $alt_id>\n";
24 $default = isset($field['std']) ? $field['std'] : '';
25 foreach ($field['options'] as $option_name => $option_value) {
26 if ($option_name == $default) {
27 $selected = 'selected';
28 }
29 else {
30 $selected = '';
31 }
32 echo "\t\t\t<option value='$option_name' $selected>" . esc_attr($option_value) . "</option>\n";
33 }
34 echo "\t\t</select>\n";
35 break;
36
37 case 'raw':
38 echo "\t\t" . $field['std'] . "\n";
39 break;
40 }
41 echo "\t\t<span class='hint'>" . (isset($field['hint']) ? $field['hint'] : '') . "</span>\n";
42 echo "\t</label>\n";
43 }
44 echo "</div>\n";
45 ?>
46 </script>
47 <?php
48 }
49
50