Skip to content

Commit

Permalink
Merge pull request #1060 from alleyinteractive/issue-1048
Browse files Browse the repository at this point in the history
Fixes 1048
  • Loading branch information
attackant authored Feb 1, 2024
2 parents 933ed8b + 71a18a2 commit 511dbca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion admin/apple-actions/class-action.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ abstract public function perform();
* @return mixed The value for the setting.
*/
protected function get_setting( $name ) {
return $this->settings->get( $name );
return $this->settings->__get( $name );
}
}
16 changes: 8 additions & 8 deletions admin/apple-actions/index/class-push.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private function push( $user_id = null ) {
if ( apply_filters( 'apple_news_skip_push', false, $this->id ) ) {
throw new \Apple_Actions\Action_Exception(
sprintf(
// Translators: Placeholder is a post ID.
// Translators: Placeholder is a post ID.
esc_html__( 'Skipped push of article %d due to the apple_news_skip_push filter.', 'apple-news' ),
absint( $this->id )
)
Expand Down Expand Up @@ -276,7 +276,7 @@ private function push( $user_id = null ) {
if ( array_intersect( $term_ids, $skip_term_ids ) ) {
throw new \Apple_Actions\Action_Exception(
sprintf(
// Translators: Placeholder is a post ID.
// Translators: Placeholder is a post ID.
esc_html__( 'Skipped push of article %d due to the presence of a skip push taxonomy term.', 'apple-news' ),
absint( $this->id )
)
Expand Down Expand Up @@ -392,7 +392,7 @@ private function push( $user_id = null ) {
if ( $this->is_post_in_sync( $json, $meta, $bundles ) ) {
throw new \Apple_Actions\Action_Exception(
sprintf(
// Translators: Placeholder is a post ID.
// Translators: Placeholder is a post ID.
esc_html__( 'Skipped push of article %d to Apple News because it is already in sync.', 'apple-news' ),
$this->id // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped
)
Expand Down Expand Up @@ -462,7 +462,7 @@ private function push( $user_id = null ) {
if ( $remote_id ) {
Admin_Apple_Notice::success(
sprintf(
// translators: token is the post title.
// translators: token is the post title.
__( 'Article %s has been successfully updated on Apple News!', 'apple-news' ),
$post->post_title
),
Expand All @@ -471,7 +471,7 @@ private function push( $user_id = null ) {
} else {
Admin_Apple_Notice::success(
sprintf(
// translators: token is the post title.
// translators: token is the post title.
__( 'Article %s has been pushed successfully to Apple News!', 'apple-news' ),
$post->post_title
),
Expand Down Expand Up @@ -506,13 +506,13 @@ private function process_errors( $errors ) {

if ( 'warn' === $component_alerts ) {
$alert_message .= sprintf(
// translators: token is a list of component names.
// translators: token is a list of component names.
__( 'The following components are unsupported by Apple News and were removed: %s', 'apple-news' ),
$component_names
);
} elseif ( 'fail' === $component_alerts ) {
$alert_message .= sprintf(
// translators: token is a list of component names.
// translators: token is a list of component names.
__( 'The following components are unsupported by Apple News and prevented publishing: %s', 'apple-news' ),
$component_names
);
Expand All @@ -538,7 +538,7 @@ private function process_errors( $errors ) {
// Throw an exception.
throw new \Apple_Actions\Action_Exception( esc_html( $alert_message ) );
} elseif ( 'warn' === $component_alerts && ! empty( $errors[0]['component_errors'] ) ) {
\Admin_Apple_Notice::error( $alert_message, $user_id );
\Admin_Apple_Notice::error( $alert_message, $user_id );
}
}

Expand Down
4 changes: 2 additions & 2 deletions includes/apple-exporter/components/class-component.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ protected function maybe_bundle_source( $source, $filename = null ) {
if ( 'yes' === $this->get_setting( 'use_remote_images' ) ) {
return $source;
} else {
if ( '' === $filename ) {
if ( null === $filename ) {
$filename = Apple_News::get_filename( $source );
}
$this->bundle_source( $filename, $source );
Expand Down Expand Up @@ -472,7 +472,7 @@ protected function bundle_source( $filename, $source ) {
* @since 0.4.0
*/
protected function get_setting( $name ) {
return $this->settings->get( $name );
return $this->settings->__get( $name );
}

/**
Expand Down

0 comments on commit 511dbca

Please sign in to comment.