PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.3.2
Pods – Custom Content Types and Fields v3.3.2
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 years ago element-pod_reference-content.php 1 year ago element-pod_reference.php 2 years ago element-view_template.php 1 year ago functions-pod_reference.php 2 years ago functions-view_template.php 11 months ago
element-view_template.php
51 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 && pods_eval_show_errors() ) : ?>
25 <?php
26 pods_deprecated( 'Pod Template PHP code has been deprecated, please use WP Templates instead of embedding PHP.', '2.3' );
27
28 pods_message(
29 sprintf(
30 '
31 <p><strong>%1$s:</strong> %2$s</p>
32 <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>
33 ',
34 esc_html__( 'Pod Template Error', 'pods' ),
35 esc_html__( 'This template contains PHP code that will not run due to security restrictions in Pods.', '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 'error',
42 false,
43 false
44 );
45 ?>
46 <?php endif; ?>
47
48 <div class="pods-compat-container">
49 <textarea id="content" name="content"><?php echo $pods_output; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?></textarea>
50 </div>
51