PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.2.4
Pods – Custom Content Types and Fields v3.2.4
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-content.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-content.php
35 lines
1 <?php if ( ! empty( $atts['pod'] ) ) : ?>
2 <p><?php esc_html_e( 'Magic tags can be used in your template code to reference field values from the pod.', 'pods' ); ?></p>
3 <p><strong><?php esc_html_e( 'Example', 'pods' ); ?>:</strong> <code>{@field_name}</code></p>
4 <p>
5 <a href="https://docs.pods.io/displaying-pods/magic-tags/" target="_blank" rel="noreferrer noopener"><?php esc_html_e( 'Read more about magic tags', 'pods' ); ?></a>
6 | <a href="https://docs.pods.io/displaying-pods/template-tags/" target="_blank" rel="noreferrer noopener"><?php esc_html_e( 'Read more about template tags like [if], [else], [each], and more', 'pods' ); ?></a>
7 </p>
8 <?php
9 $fields = pq_loadpod( $atts['pod'] );
10 if ( ! empty( $fields ) ) :
11 ?>
12 <div id="pods-magic-tag-list" class="pods-magic-tag-list">
13 <dl>
14 <dt><?php esc_html_e( 'Available magic tags', 'pods' ); ?></dt>
15 <dd><em><?php esc_html_e( 'You can click to copy any tag', 'pods' ); ?></em></dd>
16 <?php
17 foreach ( $fields as $field ) :
18 ?>
19 <dd class="pods-magic-tag-option" data-tag="<?php echo esc_attr( $field ); ?>" title="<?php esc_attr_e( 'Field', 'pods' ); ?>: <?php echo esc_attr( $field ); ?>">
20 <span><?php echo esc_html( $field ); ?></span>
21 </dd>
22 <?php
23 endforeach;
24 ?>
25 </dl>
26 </div>
27 <?php
28 endif;
29 ?>
30 <?php else : ?>
31 <p><?php esc_html_e( 'Selecting a Pod will allow you to see the list of available magic tags that can be used in your template code.', 'pods' ); ?></p>
32 <p><strong><?php esc_html_e( 'Example', 'pods' ); ?>: <code>{@field_name}</code></p>
33 <?php
34 endif;
35