Skip to content

Commit

Permalink
remove wordads_second_belowpost
Browse files Browse the repository at this point in the history
  • Loading branch information
Alameen688 committed Jan 15, 2025
1 parent 62e0a5a commit 635a51e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 28 deletions.
1 change: 0 additions & 1 deletion projects/packages/sync/src/class-defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ class Defaults {
'wordads_display_front_page',
'wordads_display_page',
'wordads_display_post',
'wordads_second_belowpost',
'wordads_inline_enabled',
'woocommerce_custom_orders_table_enabled',
'wp_mobile_app_promos',
Expand Down
15 changes: 0 additions & 15 deletions projects/plugins/jetpack/_inc/client/earn/ads.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ export const Ads = withModuleSettingsFormHelpers(
const isAdsActive = this.props.getOptionValue( 'wordads' );
const unavailableInOfflineMode = this.props.isUnavailableInOfflineMode( 'wordads' );
const enable_header_ad = this.props.getOptionValue( 'enable_header_ad', 'wordads' );
const wordads_second_belowpost = this.props.getOptionValue(
'wordads_second_belowpost',
'wordads'
);
const wordads_inline_enabled = this.props.getOptionValue(
'wordads_inline_enabled',
'wordads'
Expand Down Expand Up @@ -263,17 +259,6 @@ export const Ads = withModuleSettingsFormHelpers(
onChange={ this.handleChange( 'enable_header_ad' ) }
label={ __( 'Top of each page', 'jetpack' ) }
/>
<ToggleControl
checked={ wordads_second_belowpost }
disabled={
! isAdsActive ||
unavailableInOfflineMode ||
this.props.isSavingAnyOption( [ 'wordads' ] )
}
toggling={ this.props.isSavingAnyOption( [ 'wordads_second_belowpost' ] ) }
onChange={ this.handleChange( 'wordads_second_belowpost' ) }
label={ __( 'Second ad below post', 'jetpack' ) }
/>
<ToggleControl
checked={ wordads_inline_enabled }
disabled={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2871,13 +2871,6 @@ public static function get_updateable_data_list( $selector = '' ) {
'validate_callback' => __CLASS__ . '::validate_boolean',
'jp_group' => 'wordads',
),
'wordads_second_belowpost' => array(
'description' => esc_html__( 'Display second ad below post?', 'jetpack' ),
'type' => 'boolean',
'default' => 1,
'validate_callback' => __CLASS__ . '::validate_boolean',
'jp_group' => 'wordads',
),
'wordads_inline_enabled' => array(
'description' => esc_html__( 'Display inline ad within post content?', 'jetpack' ),
'type' => 'boolean',
Expand Down
3 changes: 0 additions & 3 deletions projects/plugins/jetpack/modules/wordads/class-wordads.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,6 @@ public function get_ad( $spot, $type = 'iponweb' ) {
} elseif ( 'house' === $type ) {
$leaderboard = 'top' === $spot && ! $this->params->mobile_device;
$snippet = $this->get_house_ad( $leaderboard ? 'leaderboard' : 'mrec' );
if ( 'belowpost' === $spot && $this->option( 'wordads_second_belowpost', true ) ) {
$snippet .= $this->get_house_ad( $leaderboard ? 'leaderboard' : 'mrec' );
}
}

return $snippet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public function __construct() {
'wordads_house' => true,
'wordads_unsafe' => false,
'enable_header_ad' => true,
'wordads_second_belowpost' => true,
'wordads_inline_enabled' => true,
'wordads_bottom_sticky_enabled' => false,
'wordads_sidebar_sticky_right_enabled' => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ public function test_sync_default_options() {
'mailserver_port' => 1,
'wp_page_for_privacy_policy' => false,
'enable_header_ad' => '1',
'wordads_second_belowpost' => '1',
'wordads_inline_enabled' => true,
'wordads_cmp_enabled' => false,
'wordads_display_front_page' => '1',
Expand Down

0 comments on commit 635a51e

Please sign in to comment.