PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.2.5
Pods – Custom Content Types and Fields v3.2.5
trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / components / Templates / includes / element-pod_reference.php
pods / components / Templates / includes Last commit date
auto-template 2 years ago element-pod_reference-content.php 2 years ago element-pod_reference.php 2 years ago element-view_template.php 7 years ago functions-pod_reference.php 2 years ago functions-view_template.php 2 years ago
element-pod_reference.php
37 lines
1 <div class="pod-queries-tools"><?php
2
3 $defaults = array(
4 'pod' => '',
5 );
6 if ( empty( $atts ) ) {
7 $atts = $defaults;
8 } else {
9 $atts = wp_parse_args( $atts, $defaults );
10 }
11
12 $api = pods_api();
13 $_pods = $api->load_pods();
14 echo '<select name="pod_reference[pod]" id="pod-reference" class="pod-switch" data-template="#podref-tmpl" data-target="#pods-magic-tag-list" data-action="pq_loadpod" data-event="change" />';
15 echo '<option value="">' . esc_html__( 'Select Pod to use as reference', 'pods' ) . '</option>';
16 foreach ( $_pods as $pod ) {
17 echo '<option value="' . esc_attr( $pod['name'] ) . '" ' . ( $atts['pod'] == $pod['name'] ? 'selected="selected"' : '' ) . '>' . esc_html( $pod['label'] ) . '</option>';
18 }
19 echo '</select>';
20 ?></div>
21 <div id="pod-reference-wrapper" class="pod-reference-wrapper">
22 <?php include_once __DIR__ . '/element-pod_reference-content.php'; ?>
23 </div>
24 <script id="podref-tmpl" type="text/html">
25 {{#if this.length}}
26 <dl>
27 <dt><?php esc_html_e( 'Available magic tags', 'pods' ); ?></dt>
28 <dd><em><?php esc_html_e( 'You can click to copy any tag', 'pods' ); ?></em></dd>
29 {{#each this}}
30 <dd class="pods-magic-tag-option" data-tag="{{this}}" title="<?php esc_attr_e( 'Field', 'pods' ); ?>: {{this}}">
31 <span>{{this}}</span>
32 </dd>
33 {{/each}}
34 </dl>
35 {{/if}}
36 </script>
37