diff --git a/includes/class-syndication-admin-notices.php b/includes/class-syndication-admin-notices.php index 0610340..f476f64 100644 --- a/includes/class-syndication-admin-notices.php +++ b/includes/class-syndication-admin-notices.php @@ -96,7 +96,7 @@ public static function display_valid_notices() { foreach( $message_values as $message_key => $message_data ) { $dismiss_nonce = wp_create_nonce( esc_attr( $message_key ) ); printf( '

', esc_attr( $message_data['class'] ) ); - printf( __('%1$s : %2$s Hide Notice'), esc_html( $message_type ), wp_kses_post( $message_data['message_text'] ), add_query_arg( array( self::$dismiss_parameter => esc_attr( $message_key ), 'syn_dismiss_nonce' => esc_attr( $dismiss_nonce ) ) ) ); + printf( __( '%1$s : %2$s Hide Notice', 'push-syndication' ), esc_html( $message_type ), wp_kses_post( $message_data['message_text'] ), esc_url( add_query_arg( array( self::$dismiss_parameter => esc_attr( $message_key ), 'syn_dismiss_nonce' => esc_attr( $dismiss_nonce ) ) ) ) ); printf( '

' ); } } @@ -114,7 +114,7 @@ public static function handle_dismiss_syndication_notice() { $dismiss_key = esc_attr( $_GET[self::$dismiss_parameter] ); $dismiss_nonce = esc_attr( $_GET['syn_dismiss_nonce'] ); if ( ! wp_verify_nonce( $dismiss_nonce, $dismiss_key ) ) { - wp_die( __( "Invalid security check" ) ); + wp_die( esc_html__( 'Invalid security check', 'push-syndication' ) ); } $messages = get_option( self::$notice_option ); $notice_bundles = get_option( self::$notice_bundles_option ); @@ -147,10 +147,10 @@ public static function handle_dismiss_syndication_notice() { add_filter( 'syn_message_text_multiple', 'syn_handle_multiple_error_notices', 10, 2 ); function syn_handle_multiple_error_notices( $message, $message_data ) { - return __( 'There have been multiple errors. Please validate your syndication logs' ); + return esc_html__( 'There have been multiple errors. Please validate your syndication logs', 'push-syndication' ); } add_action( 'push_syndication_site_disabled', 'syn_add_site_disabled_notice', 10, 2 ); function syn_add_site_disabled_notice( $site_id, $count ) { - Syndication_Logger_Admin_Notice::add_notice( $message_text = sprintf( __( 'Site %d disabled after %d pull failure(s).', 'push-syndication' ), (int) $site_id, (int) $count ), $message_type = 'Syndication site disabled', $class = 'error', $summarize_multiple = false ); + Syndication_Logger_Admin_Notice::add_notice( $message_text = sprintf( esc_html__( 'Site %d disabled after %d pull failure(s).', 'push-syndication' ), (int) $site_id, (int) $count ), $message_type = 'Syndication site disabled', $class = 'error', $summarize_multiple = false ); } diff --git a/includes/class-syndication-logger-viewer.php b/includes/class-syndication-logger-viewer.php index 240c7d4..f1be6c4 100644 --- a/includes/class-syndication-logger-viewer.php +++ b/includes/class-syndication-logger-viewer.php @@ -20,9 +20,9 @@ public function __construct(){ global $status, $page; parent::__construct( array( - 'singular' => __( 'log', 'push-syndication' ), - 'plural' => __( 'logs', 'push-syndication' ), - 'ajax' => false + 'singular' => esc_html__( 'log', 'push-syndication' ), + 'plural' => esc_html__( 'logs', 'push-syndication' ), + 'ajax' => false ) ); add_action( 'admin_head', array( $this, 'admin_header' ) ); @@ -46,7 +46,7 @@ public function admin_header() { } public function no_items() { - _e( 'No log entries found.' ); + esc_html_e( 'No log entries found.', 'push-syndication' ); } public function column_default( $item, $column_name ) { @@ -78,12 +78,12 @@ public function get_sortable_columns() { public function get_columns(){ $columns = array( - 'object_id' => __( 'Object ID', 'push-syndication' ), - 'log_id' => __( 'Log ID', 'push-syndication' ), - 'time' => __( 'Time', 'push-syndication' ), - 'msg_type' => __( 'Type', 'push-syndication' ), - 'status' => __( 'Status', 'push-syndication' ), - 'message' => __( 'Message', 'push-syndication' ), + 'object_id' => esc_html__( 'Object ID', 'push-syndication' ), + 'log_id' => esc_html__( 'Log ID', 'push-syndication' ), + 'time' => esc_html__( 'Time', 'push-syndication' ), + 'msg_type' => esc_html__( 'Type', 'push-syndication' ), + 'status' => esc_html__( 'Status', 'push-syndication' ), + 'message' => esc_html__( 'Message', 'push-syndication' ), ); return $columns; } @@ -195,7 +195,7 @@ protected function extra_tablenav( $which ) { $this->_create_months_dropdown(); $this->_create_types_dropdown(); - submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + submit_button( esc_html__( 'Filter', 'push-syndication' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); } ?> @@ -206,9 +206,9 @@ protected function extra_tablenav( $which ) { private function create_log_id_dropdown() { $requested_log_id = isset( $_REQUEST['log_id'] ) ? esc_attr( $_REQUEST['log_id'] ) : 0; ?> - + +

@@ -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' ); ?>

- + - +