PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.2.8.3
Pods – Custom Content Types and Fields v3.2.8.3
2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 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-view_template.php
pods / components / Templates / includes Last commit date
auto-template 2 weeks ago element-pod_reference-content.php 2 weeks ago element-pod_reference.php 2 weeks ago element-view_template.php 2 weeks ago functions-pod_reference.php 2 weeks ago functions-view_template.php 2 weeks ago
element-view_template.php
87 lines
1 <?php
2 /**
3 * Frontier Template code editor metabox
4 *
5 * @package Pods_templates
6 */
7
8 $has_php = false;
9
10 $pods_output = '';
11
12 if ( isset( $content ) ) {
13 $has_php = false !== strpos( $content, '<?' );
14
15 // WordPress will already call esc_textarea() if richedit is off, don't escape twice (see #3462)
16 if ( ! user_can_richedit() ) {
17 // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
18 $pods_output = $content;
19 } else {
20 $pods_output = esc_textarea( $content );
21 }
22 }
23 ?>
24 <?php if ( $has_php ) : ?>
25 <?php
26 pods_deprecated( 'Pod Template PHP code has been deprecated, please use WP Templates instead of embedding PHP.', '2.3' );
27
28 printf(
29 '
30 <div class="pods-ui-notice-admin pods-ui-notice-warning">
31 <p>⚠️&nbsp;&nbsp;%1$s</p>
32 <p><a href="%2$s" target="_blank" rel="noopener noreferrer">%3$s</a> | <a href="%4$s" target="_blank" rel="noopener noreferrer">%5$s</a></p>
33 </div>
34 ',
35 esc_html__( 'PHP detected, this feature is deprecated', 'pods' ),
36 'https://docs.pods.io/displaying-pods/pod-template-hierarchy-for-themes/',
37 esc_html__( 'Read more about file-based templates', 'pods' ),
38 admin_url( 'admin.php?page=pods-components' ),
39 esc_html__( 'Switch to file-based Pod Templates using our Migrate PHP into File-based templates component', 'pods' )
40 );
41 ?>
42
43 <?php if ( PODS_DISABLE_EVAL ) : ?>
44 <?php
45 pods_message(
46 sprintf(
47 '
48 <p><strong>%1$s:</strong> %2$s</p>
49 <p><a href="%3$s" target="_blank" rel="noopener noreferrer">%4$s</a> | <a href="%5$s" target="_blank" rel="noopener noreferrer">%6$s</a></p>
50 ',
51 esc_html__( 'Pod Template Error', 'pods' ),
52 esc_html__( 'This template contains PHP code that will not run due to security restrictions in Pods. To enable PHP code, you must configure your website to allow PHP by setting the constant PODS_DISABLE_EVAL to false.', 'pods' ),
53 'https://docs.pods.io/displaying-pods/pod-template-hierarchy-for-themes/',
54 esc_html__( 'Read more about file-based templates', 'pods' ),
55 admin_url( 'admin.php?page=pods-components' ),
56 esc_html__( 'Switch to file-based Pod Templates using our Migrate PHP into File-based templates component', 'pods' )
57 ),
58 'error',
59 false,
60 false
61 );
62 ?>
63 <?php else : ?>
64 <?php
65 pods_message(
66 sprintf(
67 '
68 <p><strong>%1$s:</strong> %2$s</p>
69 <p><a href="%3$s" target="_blank" rel="noopener noreferrer">%4$s</a> | <a href="%5$s" target="_blank" rel="noopener noreferrer">%6$s</a></p>
70 ',
71 esc_html__( 'Pod Template Warning', 'pods' ),
72 esc_html__( 'This template contains PHP code that will no longer run in Pods 3.3+.', 'pods' ),
73 'https://docs.pods.io/displaying-pods/pod-template-hierarchy-for-themes/',
74 esc_html__( 'Read more about file-based templates', 'pods' ),
75 admin_url( 'admin.php?page=pods-components' ),
76 esc_html__( 'Switch to file-based Pod Pages using our Migrate PHP into File-based templates component', 'pods' )
77 ),
78 'warning'
79 );
80 ?>
81 <?php endif; ?>
82 <?php endif; ?>
83
84 <div class="pods-compat-container">
85 <textarea id="content" name="content"><?php echo $pods_output; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?></textarea>
86 </div>
87