PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / trunk
Pods – Custom Content Types and Fields vtrunk
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 4 months ago element-pod_reference-content.php 4 months ago element-pod_reference.php 4 months ago element-view_template.php 4 months ago functions-pod_reference.php 4 months ago functions-view_template.php 4 months ago
element-pod_reference-content.php
45 lines
1 <?php
2
3 // Don't load directly.
4 if ( ! defined( 'ABSPATH' ) ) {
5 die( '-1' );
6 }
7
8 // phpcs:ignoreFile WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
9 ?>
10 <?php if ( ! empty( $atts['pod'] ) ) : ?>
11 <p><?php esc_html_e( 'Magic tags can be used in your template code to reference field values from the pod.', 'pods' ); ?></p>
12 <p><strong><?php esc_html_e( 'Example', 'pods' ); ?>:</strong> <code>{@field_name}</code></p>
13 <p>
14 <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>
15 | <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>
16 </p>
17 <?php
18 $fields = pq_loadpod( $atts['pod'] );
19 if ( ! empty( $fields ) ) :
20 ?>
21 <div id="pods-magic-tag-list" class="pods-magic-tag-list">
22 <dl>
23 <dt><?php esc_html_e( 'Available magic tags', 'pods' ); ?></dt>
24 <dd><em><?php esc_html_e( 'You can click to copy any tag', 'pods' ); ?></em></dd>
25 <?php
26 foreach ( $fields as $field ) :
27 ?>
28 <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 ); ?>">
29 <span><?php echo esc_html( $field ); ?></span>
30 </dd>
31 <?php
32 endforeach;
33 ?>
34 </dl>
35 </div>
36 <?php
37 endif;
38 ?>
39 <?php else : ?>
40 <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>
41 <p><strong><?php esc_html_e( 'Example', 'pods' ); ?>:</strong> <code>{@field_name}</code></p>
42 <p><?php esc_html_e( 'Save your Pod Template to have the reference update here.', 'pods' ); ?></p>
43 <?php
44 endif;
45