syndication_logger_table->prepare_items();
?>
diff --git a/includes/class-syndication-logger.php b/includes/class-syndication-logger.php
index ab5f834..3875976 100644
--- a/includes/class-syndication-logger.php
+++ b/includes/class-syndication-logger.php
@@ -180,10 +180,10 @@ private function log_post_event( $event, $result, $post, $site, $transport_type,
} else {
$message = 'fail';
}
- Syndication_Logger::log_post_error( $site->ID, $status = __( esc_attr( $event ), 'push-syndication' ), $message, $log_time, $extra );
+ Syndication_Logger::log_post_error( $site->ID, $status = esc_attr( $event ), $message, $log_time, $extra );
} else {
$message = sprintf( '%s,%d', sanitize_text_field( $post['post_guid'] ), intval( $result ) );
- Syndication_Logger::log_post_success( $site->ID, $status = __( esc_attr( $event ), 'push-syndication' ), $message, $log_time, $extra );
+ Syndication_Logger::log_post_success( $site->ID, $status = esc_attr( $event ), $message, $log_time, $extra );
}
}
@@ -297,12 +297,12 @@ private function log( $storage_type, $msg_type, $object_type = 'post', $object_i
if ( 'post' == $object_type ) {
if ( ! is_integer( $object_id ) ) {
- return new WP_Error( 'logger_no_post_id', __( 'You need to provide a valid post_id or use log_option instead', 'push-syndication' ) );
+ return new WP_Error( 'logger_no_post_id', esc_html__( 'You need to provide a valid post_id or use log_option instead', 'push-syndication' ) );
}
$post = get_post( $object_id );
if ( ! $post ) {
- return new WP_Error( 'logger_no_post', __( 'The post_id provided does not exist.', 'push-syndication' ) );
+ return new WP_Error( 'logger_no_post', esc_html__( 'The post_id provided does not exist.', 'push-syndication' ) );
}
$log = get_post_meta( $post->ID, 'syn_log', true);
diff --git a/includes/class-syndication-site-auto-retry.php b/includes/class-syndication-site-auto-retry.php
index e11a9ab..dc8cce6 100644
--- a/includes/class-syndication-site-auto-retry.php
+++ b/includes/class-syndication-site-auto-retry.php
@@ -91,7 +91,7 @@ public function handle_pull_failure_event( $site_id = 0, $failed_attempts = 0 )
// Run in one minute by default
$auto_retry_interval = apply_filters( 'syndication_failure_auto_retry_interval', $time_now + MINUTE_IN_SECONDS );
- Syndication_Logger::log_post_info( $site->ID, $status = 'start_auto_retry', $message = sprintf( __( 'Connection retry %d of %d to %s in %s..', 'push-syndication' ), $site_auto_retry_count + 1, $auto_retry_limit, $site_url, human_time_diff( $time_now, $auto_retry_interval ) ), $log_time, $extra = array() );
+ Syndication_Logger::log_post_info( $site->ID, $status = 'start_auto_retry', $message = sprintf( esc_html__( 'Connection retry %d of %d to %s in %s..', 'push-syndication' ), $site_auto_retry_count + 1, $auto_retry_limit, $site_url, human_time_diff( $time_now, $auto_retry_interval ) ), $log_time, $extra = array() );
// Schedule a pull retry for one minute in the future
wp_schedule_single_event(
@@ -125,7 +125,7 @@ public function handle_pull_failure_event( $site_id = 0, $failed_attempts = 0 )
// Remove the auto retry if there was one
delete_post_meta( $site->ID, 'syn_failed_auto_retry_attempts' );
- Syndication_Logger::log_post_error( $site->ID, $status = 'end_auto_retry', $message = sprintf( __( 'Failed %d times to reconnect to %s', 'push-syndication' ), $site_auto_retry_count, $site_url ), $log_time, $extra = array() );
+ Syndication_Logger::log_post_error( $site->ID, $status = 'end_auto_retry', $message = sprintf( esc_html__( 'Failed %d times to reconnect to %s', 'push-syndication' ), $site_auto_retry_count, $site_url ), $log_time, $extra = array() );
}
}
}
diff --git a/includes/class-syndication-site-failure-monitor.php b/includes/class-syndication-site-failure-monitor.php
index 28b5475..5c4e9eb 100644
--- a/includes/class-syndication-site-failure-monitor.php
+++ b/includes/class-syndication-site-failure-monitor.php
@@ -39,7 +39,7 @@ public function handle_pull_failure_event( $site_id, $count ) {
do_action( 'push_syndication_reset_event', 'pull_failure', $site_id );
// Log what happened.
- Syndication_Logger::log_post_error( $site_id, 'error', sprintf( __( 'Site %d disabled after %d pull failure(s).', 'push-syndication' ), (int) $site_id, (int) $count ) );
+ Syndication_Logger::log_post_error( $site_id, 'error', sprintf( esc_html__( 'Site %d disabled after %d pull failure(s).', 'push-syndication' ), (int) $site_id, (int) $count ) );
do_action( 'push_syndication_site_disabled', $site_id, $count );
}
diff --git a/includes/class-syndication-wp-rest-client.php b/includes/class-syndication-wp-rest-client.php
index c24958d..1069912 100644
--- a/includes/class-syndication-wp-rest-client.php
+++ b/includes/class-syndication-wp-rest-client.php
@@ -221,7 +221,7 @@ public static function display_settings( $site ) {
-
+
diff --git a/includes/class-syndication-wp-rss-client.php b/includes/class-syndication-wp-rss-client.php
index f10d188..a0fe0b3 100644
--- a/includes/class-syndication-wp-rss-client.php
+++ b/includes/class-syndication-wp-rss-client.php
@@ -185,12 +185,12 @@ public function get_posts( $args = array() ) {
$rss_init = $this->init();
if ( false === $rss_init ) {
- Syndication_Logger::log_post_error( $this->site_ID, $status = 'error', $message = sprintf( __( 'Failed to parse feed at: %s', 'push-syndication' ), $this->feed_url ), $log_time = isset( $site_post->postmeta['is_update'] ) ? $site_post->postmeta['is_update'] : null, $extra = array( 'error' => $this->error() ) );
+ Syndication_Logger::log_post_error( $this->site_ID, $status = 'error', $message = sprintf( esc_html__( 'Failed to parse feed at: %s', 'push-syndication' ), $this->feed_url ), $log_time = isset( $site_post->postmeta['is_update'] ) ? $site_post->postmeta['is_update'] : null, $extra = array( 'error' => $this->error() ) );
// Track the event.
do_action( 'push_syndication_event', 'pull_failure', $this->site_ID );
} else {
- Syndication_Logger::log_post_info( $this->site_ID, $status = 'fetch_feed', $message = sprintf( __( 'fetched feed with %d bytes', 'push-syndication' ), strlen( $this->get_raw_data() ) ), $log_time = null, $extra = array() );
+ Syndication_Logger::log_post_info( $this->site_ID, $status = 'fetch_feed', $message = sprintf( esc_html__( 'fetched feed with %d bytes', 'push-syndication' ), strlen( $this->get_raw_data() ) ), $log_time = null, $extra = array() );
// Track the event.
do_action( 'push_syndication_event', 'pull_success', $this->site_ID );
diff --git a/includes/class-syndication-wp-xml-client.php b/includes/class-syndication-wp-xml-client.php
index 3e26bc8..c05529c 100644
--- a/includes/class-syndication-wp-xml-client.php
+++ b/includes/class-syndication-wp-xml-client.php
@@ -121,7 +121,7 @@ private function set_feed_url( $url ) {
if ( parse_url( $url ) ) {
$this->feed_url = $url;
} else {
- $this->error_message = sprintf( __( 'Feed URL not set for this feed: %s', 'push-syndication' ), $this->site_ID );
+ $this->error_message = sprintf( esc_html__( 'Feed URL not set for this feed: %s', 'push-syndication' ), $this->site_ID );
}
}
@@ -238,14 +238,14 @@ public function get_posts( $args = array() ) {
// TODO: kill feed client if too many failures
$site_post = get_post( $this->site_ID );
if ( is_wp_error( $feed ) ) {
- Syndication_Logger::log_post_error( $this->site_ID, $status = 'error', $message = sprintf( __( 'Could not reach feed at: %s | Error: %s', 'push-syndication' ), $this->feed_url, $feed->get_error_message() ), $log_time = null, $extra = array() );
+ Syndication_Logger::log_post_error( $this->site_ID, $status = 'error', $message = sprintf( esc_html__( 'Could not reach feed at: %s | Error: %s', 'push-syndication' ), $this->feed_url, $feed->get_error_message() ), $log_time = null, $extra = array() );
// Track the event.
do_action( 'push_syndication_event', 'pull_failure', $this->site_ID );
return array();
} else {
- Syndication_Logger::log_post_info( $this->site_ID, $status = 'fetch_feed', $message = sprintf( __( 'fetched feed with %d bytes', 'push-syndication' ), strlen( $feed ) ), $log_time = null, $extra = array() );
+ Syndication_Logger::log_post_info( $this->site_ID, $status = 'fetch_feed', $message = sprintf( esc_html__( 'fetched feed with %d bytes', 'push-syndication' ), strlen( $feed ) ), $log_time = null, $extra = array() );
// Track the event.
do_action( 'push_syndication_event', 'pull_success', $this->site_ID );
@@ -255,7 +255,7 @@ public function get_posts( $args = array() ) {
$xml = simplexml_load_string( $feed, null, 0, $namespace, false );
if ( false === $xml ) {
- Syndication_Logger::log_post_error( $this->site_ID, $status = 'error', $message = sprintf( __( 'Failed to parse feed at: %s', 'push-syndication' ), $this->feed_url ), $log_time = $site_post->postmeta['is_update'], $extra = array() );
+ Syndication_Logger::log_post_error( $this->site_ID, $status = 'error', $message = sprintf( esc_html__( 'Failed to parse feed at: %s', 'push-syndication' ), $this->feed_url ), $log_time = $site_post->postmeta['is_update'], $extra = array() );
// Track the event.
do_action( 'push_syndication_event', 'pull_failure', $this->site_ID );
@@ -294,10 +294,10 @@ public function get_posts( $args = array() ) {
$items = $xml->xpath( $post_root );
if ( empty( $items ) ) {
- Syndication_Logger::log_post_error( $this->site_ID, $status = 'error', $message = printf( __( 'No post nodes found using XPath "%s" in feed', 'push-syndication' ), $post_root ), $log_time = $site_post->postmeta['is_update'], $extra = array() );
+ Syndication_Logger::log_post_error( $this->site_ID, $status = 'error', $message = sprintf( esc_html__( 'No post nodes found using XPath "%s" in feed', 'push-syndication' ), $post_root ), $log_time = $site_post->postmeta['is_update'], $extra = array() );
return array();
} else {
- Syndication_Logger::log_post_info( $this->site_ID, $status = 'simplexml_load_string', $message = sprintf( __( 'parsed feed, received %d items', 'push-syndication' ), count( $items ) ), $log_time = null, $extra = array() );
+ Syndication_Logger::log_post_info( $this->site_ID, $status = 'simplexml_load_string', $message = sprintf( esc_html__( 'parsed feed, received %d items', 'push-syndication' ), count( $items ) ), $log_time = null, $extra = array() );
}
foreach ( $items as $item ) {
@@ -375,7 +375,7 @@ public function get_posts( $args = array() ) {
$post_position++;
}
- Syndication_Logger::log_post_info( $this->site_ID, $status = 'posts_received', $message = sprintf( __( '%d posts were prepared', 'push-syndication' ), count( $posts ) ), $log_time = null, $extra = array() );
+ Syndication_Logger::log_post_info( $this->site_ID, $status = 'posts_received', $message = sprintf( esc_html__( '%d posts were prepared', 'push-syndication' ), count( $posts ) ), $log_time = null, $extra = array() );
return $posts;
@@ -492,7 +492,7 @@ public static function display_settings( $site ) {
-
+
@@ -504,7 +504,7 @@ public static function display_settings( $site ) {
foreach ( $post_types as $post_type ) {
?>
-
+
@@ -518,7 +518,7 @@ public static function display_settings( $site ) {
foreach ( $post_statuses as $key => $value ) {
?>
-
+
@@ -527,8 +527,8 @@ public static function display_settings( $site ) {
@@ -536,8 +536,8 @@ public static function display_settings( $site ) {
@@ -545,35 +545,35 @@ public static function display_settings( $site ) {
-
+
-
+
-
+
-
+
-
+
@@ -601,9 +601,9 @@ public static function display_settings( $site ) {
?>
-
+
-
PLEASE NOTE: %s are required. If you want a link to another site, %s is required. To include a static string, enclose the string as "%s(your_string_here)" — no quotes.', 'push-syndication' ), 'post_title, post_guid, guid', 'is_permalink', 'string' ); ?>
+
PLEASE NOTE: %s are required. If you want a link to another site, %s is required. To include a static string, enclose the string as "%s(your_string_here)" — no quotes.', 'push-syndication' ), 'post_title, post_guid, guid', 'is_permalink', 'string' ); ?>
-
+
-
+