Skip to content
Snippets Groups Projects
Commit ae7d1649 authored by Prasath Nadarajah's avatar Prasath Nadarajah
Browse files

more escaping and realiging

parent 77ed19c8
Branches
No related tags found
No related merge requests found
...@@ -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
} }
......
...@@ -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)
......
...@@ -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
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment