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
ae7d1649
Commit
ae7d1649
authored
12 years ago
by
Prasath Nadarajah
Browse files
Options
Downloads
Patches
Plain Diff
more escaping and realiging
parent
77ed19c8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
includes/class-wp-rest-client.php
+30
-30
30 additions, 30 deletions
includes/class-wp-rest-client.php
includes/class-wp-rss-client.php
+14
-1
14 additions, 1 deletion
includes/class-wp-rss-client.php
includes/class-wp-xmlrpc-client.php
+4
-2
4 additions, 2 deletions
includes/class-wp-xmlrpc-client.php
with
48 additions
and
33 deletions
includes/class-wp-rest-client.php
+
30
−
30
View file @
ae7d1649
...
@@ -214,40 +214,40 @@ class WP_REST_Client implements WP_Client{
...
@@ -214,40 +214,40 @@ class WP_REST_Client implements WP_Client{
return
$this
->
error_message
;
return
$this
->
error_message
;
}
}
public
static
function
display_settings
(
$
post
)
{
public
static
function
display_settings
(
$
site
)
{
$site_token
=
push_syndicate_decrypt
(
get_post_meta
(
$
post
->
ID
,
'syn_site_token'
,
true
)
);
$site_token
=
push_syndicate_decrypt
(
get_post_meta
(
$
site
->
ID
,
'syn_site_token'
,
true
)
);
$site_id
=
get_post_meta
(
$
post
->
ID
,
'syn_site_id'
,
true
);
$site_id
=
get_post_meta
(
$
site
->
ID
,
'syn_site_id'
,
true
);
$site_url
=
get_post_meta
(
$
post
->
ID
,
'syn_site_url'
,
true
);
$site_url
=
get_post_meta
(
$
site
->
ID
,
'syn_site_url'
,
true
);
// @TODO refresh UI
// @TODO refresh UI
?>
?>
<p>
<p>
<?php
echo
esc_html__
(
'To generate the following information automatically please visit the '
,
'push-syndication'
);
?>
<?php
echo
esc_html__
(
'To generate the following information automatically please visit the '
,
'push-syndication'
);
?>
<a
href=
"
<?php
echo
get_admin_url
();
?>
/options-general.php?page=push-syndicate-settings"
target=
"_blank"
>
<?php
echo
esc_html__
(
'settings page'
,
'push-syndication'
);
?>
</a>
<a
href=
"
<?php
echo
get_admin_url
();
?>
/options-general.php?page=push-syndicate-settings"
target=
"_blank"
>
<?php
echo
esc_html__
(
'settings page'
,
'push-syndication'
);
?>
</a>
</p>
</p>
<p>
<p>
<label
for=
site_token
>
<?php
echo
esc_html__
(
'Enter API Token'
,
'push-syndication'
);
?>
</label>
<label
for=
site_token
>
<?php
echo
esc_html__
(
'Enter API Token'
,
'push-syndication'
);
?>
</label>
</p>
</p>
<p>
<p>
<input
type=
"text"
name=
"site_token"
id=
"site_token"
size=
"100"
value=
"
<?php
echo
esc_
html
(
$site_token
);
?>
"
/>
<input
type=
"text"
name=
"site_token"
id=
"site_token"
size=
"100"
value=
"
<?php
echo
esc_
attr
(
$site_token
);
?>
"
/>
</p>
</p>
<p>
<p>
<label
for=
site_id
>
<?php
echo
esc_html__
(
'Enter Blog ID'
,
'push-syndication'
);
?>
</label>
<label
for=
site_id
>
<?php
echo
esc_html__
(
'Enter Blog ID'
,
'push-syndication'
);
?>
</label>
</p>
</p>
<p>
<p>
<input
type=
"text"
name=
"site_id"
id=
"site_id"
size=
"100"
value=
"
<?php
echo
esc_
html
(
$site_id
);
?>
"
/>
<input
type=
"text"
name=
"site_id"
id=
"site_id"
size=
"100"
value=
"
<?php
echo
esc_
attr
(
$site_id
);
?>
"
/>
</p>
</p>
<p>
<p>
<label
for=
site_url
>
<?php
echo
esc_html__
(
'Enter a valid Blog URL'
,
'push-syndication'
);
?>
</label>
<label
for=
site_url
>
<?php
echo
esc_html__
(
'Enter a valid Blog URL'
,
'push-syndication'
);
?>
</label>
</p>
</p>
<p>
<p>
<input
type=
"text"
name=
"site_url"
id=
"site_url"
size=
"100"
value=
"
<?php
echo
esc_
html
(
$site_url
);
?>
"
/>
<input
type=
"text"
name=
"site_url"
id=
"site_url"
size=
"100"
value=
"
<?php
echo
esc_
attr
(
$site_url
);
?>
"
/>
</p>
</p>
<?php
<?php
}
}
...
...
This diff is collapsed.
Click to expand it.
includes/class-wp-rss-client.php
+
14
−
1
View file @
ae7d1649
...
@@ -61,7 +61,20 @@ class WP_RSS_Client implements WP_Client{
...
@@ -61,7 +61,20 @@ class WP_RSS_Client implements WP_Client{
public
static
function
display_settings
(
$site
)
public
static
function
display_settings
(
$site
)
{
{
// TODO: Implement display_settings() method.
$feed_url
=
push_syndicate_decrypt
(
get_post_meta
(
$site
->
ID
,
'syn_feed_url'
,
true
)
);
?>
<p>
<label
for=
feed_url
>
<?php
echo
esc_html__
(
'Enter feed URL'
,
'push-syndication'
);
?>
</label>
</p>
<p>
<input
type=
"text"
name=
"site_token"
id=
"feed_url"
size=
"100"
value=
"
<?php
echo
esc_attr
(
$feed_url
);
?>
"
/>
</p>
<?php
}
}
public
static
function
save_settings
(
$site_ID
)
public
static
function
save_settings
(
$site_ID
)
...
...
This diff is collapsed.
Click to expand it.
includes/class-wp-xmlrpc-client.php
+
4
−
2
View file @
ae7d1649
...
@@ -242,7 +242,8 @@ class WP_XMLRPC_Client extends WP_HTTP_IXR_Client implements WP_Client {
...
@@ -242,7 +242,8 @@ class WP_XMLRPC_Client extends WP_HTTP_IXR_Client implements WP_Client {
$site_username
=
get_post_meta
(
$site
->
ID
,
'syn_site_username'
,
true
);
$site_username
=
get_post_meta
(
$site
->
ID
,
'syn_site_username'
,
true
);
$site_password
=
push_syndicate_decrypt
(
get_post_meta
(
$site
->
ID
,
'syn_site_password'
,
true
)
);
$site_password
=
push_syndicate_decrypt
(
get_post_meta
(
$site
->
ID
,
'syn_site_password'
,
true
)
);
?>
?>
<p>
<p>
<label
for=
site_url
>
<?php
echo
esc_html__
(
'Enter a valid site URL'
,
'push-syndication'
);
?>
</label>
<label
for=
site_url
>
<?php
echo
esc_html__
(
'Enter a valid site URL'
,
'push-syndication'
);
?>
</label>
</p>
</p>
...
@@ -261,7 +262,8 @@ class WP_XMLRPC_Client extends WP_HTTP_IXR_Client implements WP_Client {
...
@@ -261,7 +262,8 @@ class WP_XMLRPC_Client extends WP_HTTP_IXR_Client implements WP_Client {
<p>
<p>
<input
type=
"password"
name=
"site_password"
id=
"site_password"
size=
"100"
autocomplete=
"off"
value=
"
<?php
echo
esc_attr
(
$site_password
);
?>
"
/>
<input
type=
"password"
name=
"site_password"
id=
"site_password"
size=
"100"
autocomplete=
"off"
value=
"
<?php
echo
esc_attr
(
$site_password
);
?>
"
/>
</p>
</p>
<?php
<?php
}
}
...
...
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