PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 3.06.06
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v3.06.06
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/views/xml/posts_xml.php +12 -33 6.5.33.06.06 View file →
@@ -1,15 +1,6 @@
1 1 <?php
2 -/**
3 - * Generate the XML for export for posts and form actions.
4 - *
5 - * @phpcs:disable Generic.WhiteSpace.ScopeIndent.Incorrect
6 - */
7 2
8 -if ( ! defined( 'ABSPATH' ) ) {
9 - die( 'You are not allowed to call this page directly.' );
10 -}
11 -
12 3 if ( ! $item_ids ) {
13 4 return;
14 5 }
15 6
@@ -23,16 +14,16 @@
23 14 // Begin Loop
24 15 foreach ( $posts as $post ) {
25 16 setup_postdata( $post );
26 17 $is_sticky = is_sticky( $post->ID ) ? 1 : 0;
27 - ?>
18 +?>
28 19 <view>
29 20 <title><?php echo esc_html( apply_filters( 'the_title_rss', $post->post_title ) ); ?></title>
30 - <link><?php the_permalink_rss(); ?></link>
31 - <post_author><?php echo FrmXMLHelper::cdata( get_the_author_meta( 'login' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></post_author>
21 + <link><?php the_permalink_rss() ?></link>
22 + <post_author><?php echo FrmXMLHelper::cdata( get_the_author_meta( 'login' ) ); // WPCS: XSS ok. ?></post_author>
32 23 <description></description>
33 - <content><?php echo FrmXMLHelper::cdata( apply_filters( 'the_content_export', $post->post_content ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></content>
34 - <excerpt><?php echo FrmXMLHelper::cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></excerpt>
24 + <content><?php echo FrmXMLHelper::cdata( apply_filters( 'the_content_export', $post->post_content ) ); // WPCS: XSS ok. ?></content>
25 + <excerpt><?php echo FrmXMLHelper::cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) ); // WPCS: XSS ok. ?></excerpt>
35 26 <post_id><?php echo esc_html( $post->ID ); ?></post_id>
36 27 <post_date><?php echo esc_html( $post->post_date ); ?></post_date>
37 28 <post_date_gmt><?php echo esc_html( $post->post_date_gmt ); ?></post_date_gmt>
38 29 <comment_status><?php echo esc_html( $post->comment_status ); ?></comment_status>
@@ -41,9 +32,9 @@
41 32 <status><?php echo esc_html( $post->post_status ); ?></status>
42 33 <post_parent><?php echo esc_html( $post->post_parent ); ?></post_parent>
43 34 <menu_order><?php echo esc_html( $post->menu_order ); ?></menu_order>
44 35 <post_type><?php echo esc_html( $post->post_type ); ?></post_type>
45 - <post_password><?php echo FrmXMLHelper::cdata( $post->post_password ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></post_password>
36 + <post_password><?php echo FrmXMLHelper::cdata( $post->post_password ); // WPCS: XSS ok. ?></post_password>
46 37 <is_sticky><?php echo esc_html( $is_sticky ); ?></is_sticky>
47 38 <?php if ( 'attachment' === $post->post_type ) : ?>
48 39 <attachment_url><?php echo esc_url( wp_get_attachment_url( $post->ID ) ); ?></attachment_url>
49 40 <?php
@@ -53,12 +44,12 @@
53 44 foreach ( $postmeta as $meta ) :
54 45 if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) {
55 46 continue;
56 47 }
57 - ?>
48 + ?>
58 49 <postmeta>
59 50 <meta_key><?php echo esc_html( $meta->meta_key ); ?></meta_key>
60 - <meta_value><?php echo FrmXMLHelper::cdata( $meta->meta_value ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></meta_value>
51 + <meta_value><?php echo FrmXMLHelper::cdata( $meta->meta_value ); // WPCS: XSS ok. ?></meta_value>
61 52 </postmeta>
62 53 <?php
63 54 endforeach;
64 55
@@ -67,24 +58,12 @@
67 58 $terms = wp_get_object_terms( $post->ID, $taxonomies );
68 59
69 60 foreach ( (array) $terms as $term ) {
70 61 ?>
71 - <category domain="<?php echo esc_attr( $term->taxonomy ); ?>" nicename="<?php echo esc_attr( $term->slug ); ?>"><?php echo FrmXMLHelper::cdata( $term->name ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></category>
62 + <category domain="<?php echo esc_attr( $term->taxonomy ) ?>" nicename="<?php echo esc_attr( $term->slug ) ?>"><?php echo FrmXMLHelper::cdata( $term->name ); // WPCS: XSS ok. ?></category>
72 63 <?php
73 64 }
74 65 }
75 -
76 - if ( 'frm_display' === $post->post_type && is_callable( 'FrmViewsLayout::get_layouts_for_view' ) ) {
77 - $layouts = FrmViewsLayout::get_layouts_for_view( $post->ID );
78 - foreach ( $layouts as $layout ) {
79 - ?>
80 - <layout>
81 - <type><?php echo esc_html( $layout->type ); ?></type>
82 - <data><?php echo FrmXMLHelper::cdata( $layout->data ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></data>
83 - </layout>
84 -<?php
85 - }
86 - }
87 66 ?>
88 67 </view>
89 68 <?php
90 69 }
@@ -106,14 +85,14 @@
106 85
107 86 $frm_inc_tax[] = $term->term_id;
108 87 $label = ( 'category' === $term->taxonomy || 'tag' === $term->taxonomy ) ? $term->taxonomy : 'term';
109 88 ?>
110 - <term><term_id><?php echo esc_html( $term->term_id ); ?></term_id><term_taxonomy><?php echo esc_html( $term->taxonomy ); ?></term_taxonomy><?php
89 + <term><term_id><?php echo esc_html( $term->term_id ) ?></term_id><term_taxonomy><?php echo esc_html( $term->taxonomy ); ?></term_taxonomy><?php
111 90 if ( ! empty( $term->name ) ) {
112 - echo '<term_name>' . FrmXMLHelper::cdata( $term->name ) . '</term_name>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
91 + echo '<term_name>' . FrmXMLHelper::cdata( $term->name ) . '</term_name>'; // WPCS: XSS ok.
113 92 }
114 93 if ( ! empty( $term->description ) ) {
115 - echo '<term_description>' . FrmXMLHelper::cdata( $term->description ) . '</term_description>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
94 + echo '<term_description>' . FrmXMLHelper::cdata( $term->description ) . '</term_description>'; // WPCS: XSS ok.
116 95 }
117 96 echo '<term_slug>' . esc_html( $term->slug ) . '</term_slug>';
118 97 echo '</term>';
119 98 }