Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Syndication
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
WP Plugins
Syndication
Commits
83878a2c
Commit
83878a2c
authored
12 years ago
by
Mohammad Jangda
Browse files
Options
Downloads
Patches
Plain Diff
Pass null into simple_xml_load_string so that PHP fallsback to SimpleXMLElement
parent
a76d5f5a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/class-syndication-wp-xml-client.php
+4
-3
4 additions, 3 deletions
includes/class-syndication-wp-xml-client.php
with
4 additions
and
3 deletions
includes/class-syndication-wp-xml-client.php
+
4
−
3
View file @
83878a2c
...
...
@@ -142,7 +142,7 @@ class Syndication_WP_XML_Client implements Syndication_Client {
return
;
}
$xml
=
simplexml_load_string
(
$feed
,
false
,
0
,
$namespace
,
false
);
$xml
=
simplexml_load_string
(
$feed
,
null
,
0
,
$namespace
,
false
);
if
(
!
$xml
)
{
self
::
log_post
(
'n/a'
,
null
,
get_post
(
$this
->
site_ID
),
sprintf
(
__
(
'Failed to parse feed at: %s'
,
'push-syndication'
),
$this
->
feed_url
)
);
...
...
@@ -324,7 +324,6 @@ class Syndication_WP_XML_Client implements Syndication_Client {
* @param object $site The site object to display settings.
*/
public
static
function
display_settings
(
$site
)
{
//TODO: MOVE STYLES to appropriate CSS
//TODO: JS if is_meta show text box, if is_photo show photo select with numbers as values, else show select of post fields
//TODO: JS Validation
//TODO: deal with ability to select, i.e. media:group/media:thumbnail[@width="75"]/@url (can't be unserialized as is with quotes around 75)
...
...
@@ -507,7 +506,7 @@ class Syndication_WP_XML_Client implements Syndication_Client {
</ul>
<?php
$rowcount
=
0
;
$rowcount
=
0
;
if
(
!
empty
(
$custom_nodes
)
)
{
foreach
(
$custom_nodes
as
$key
=>
$storage_locations
)
{
foreach
(
$storage_locations
as
$storage_location
)
{
?>
...
...
@@ -635,10 +634,12 @@ class Syndication_WP_XML_Client implements Syndication_Client {
//if no new has been added to the empty row at the end, ignore it
if
(
!
empty
(
$row
[
'xpath'
]
)
)
{
foreach
(
array
(
'is_item'
,
'is_meta'
,
'is_tax'
,
'is_photo'
)
as
$field
)
{
$row_data
[
$field
]
=
isset
(
$row
[
$field
]
)
&&
in_array
(
$row
[
$field
],
array
(
'true'
,
'on'
)
)
?
1
:
0
;
}
$xpath
=
html_entity_decode
(
$row
[
'xpath'
]
);
unset
(
$row
[
'xpath'
]);
$row_data
[
'field'
]
=
sanitize_key
(
$row
[
'field'
]
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment