PluginProbe ʕ •ᴥ•ʔ
Starter Sites & Templates by Neve / 1.4.1
Starter Sites & Templates by Neve v1.4.1
1.4.1 1.4.0 1.3.0 1.2.29 1.2.28 1.2.6 1.2.7 1.2.8 1.2.9 trunk 1.0.10 1.0.11 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.20 1.1.21 1.1.22 1.1.23 1.1.24 1.1.25 1.1.26 1.1.27 1.1.28 1.1.29 1.1.3 1.1.30 1.1.31 1.1.32 1.1.33 1.1.34 1.1.35 1.1.36 1.1.37 1.1.38 1.1.39 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.3 1.2.4 1.2.5
templates-patterns-collection / includes / Importers / WP / Beaver_ParserXML.php
templates-patterns-collection / includes / Importers / WP Last commit date
Atomic_Wind_Meta_Handler.php 3 months ago Beaver_Data_Fix.php 5 years ago Beaver_ParserXML.php 5 years ago Elementor_Meta_Handler.php 3 months ago WP_Import.php 3 months ago WXR_Parser.php 5 years ago WXR_Parser_SimpleXML.php 4 years ago WXR_Parser_XML.php 5 years ago
Beaver_ParserXML.php
83 lines
1 <?php
2
3 namespace TIOB\Importers\WP;
4
5 /**
6 * Class Beaver_ParserXML
7 *
8 * Brought in from Beaver Builder Lite.
9 *
10 * Beaver XML Parser
11 */
12 class Beaver_ParserXML extends WXR_Parser_XML {
13
14 function tag_close( $parser, $tag ) {
15 switch ( $tag ) {
16 case 'wp:comment':
17 unset( $this->sub_data['key'], $this->sub_data['value'] ); // remove meta sub_data
18 if ( ! empty( $this->sub_data ) ) {
19 $this->data['comments'][] = $this->sub_data;
20 }
21 $this->sub_data = false;
22 break;
23 case 'wp:commentmeta':
24 $this->sub_data['commentmeta'][] = array(
25 'key' => $this->sub_data['key'],
26 'value' => $this->sub_data['value'],
27 );
28 break;
29 case 'category':
30 if ( ! empty( $this->sub_data ) ) {
31 $this->sub_data['name'] = $this->cdata;
32 $this->data['terms'][] = $this->sub_data;
33 }
34 $this->sub_data = false;
35 break;
36 case 'wp:postmeta':
37 if ( ! empty( $this->sub_data ) ) {
38 if ( stristr( $this->sub_data['key'], '_fl_builder_' ) ) {
39 $this->sub_data['value'] = Beaver_Data_Fix::run( serialize( $this->sub_data['value'] ) );
40 }
41 $this->data['postmeta'][] = $this->sub_data;
42 }
43 $this->sub_data = false;
44 break;
45 case 'item':
46 $this->posts[] = $this->data;
47 $this->data = false;
48 break;
49 case 'wp:category':
50 case 'wp:tag':
51 case 'wp:term':
52 $n = substr( $tag, 3 );
53 array_push( $this->$n, $this->data );
54 $this->data = false;
55 break;
56 case 'wp:author':
57 if ( ! empty( $this->data['author_login'] ) ) {
58 $this->authors[ $this->data['author_login'] ] = $this->data;
59 }
60 $this->data = false;
61 break;
62 case 'wp:base_site_url':
63 $this->base_url = $this->cdata;
64 break;
65 case 'wp:base_blog_url':
66 $this->base_blog_url = $this->cdata;
67 break;
68 case 'wp:wxr_version':
69 $this->wxr_version = $this->cdata;
70 break;
71 default:
72 if ( $this->in_sub_tag ) {
73 $this->sub_data[ $this->in_sub_tag ] = ! empty( $this->cdata ) ? $this->cdata : '';
74 $this->in_sub_tag = false;
75 } elseif ( $this->in_tag ) {
76 $this->data[ $this->in_tag ] = ! empty( $this->cdata ) ? $this->cdata : '';
77 $this->in_tag = false;
78 }
79 }
80 $this->cdata = false;
81 }
82 }
83