Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version 2.5.0 #1141

Merged
merged 175 commits into from
Jun 28, 2024
Merged
Changes from 4 commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
06ed5f2
WIP: APPLE-163
kevinfodness Mar 5, 2024
ac73449
APPLE-163 Add prepend to title automation feature
kevinfodness Mar 5, 2024
371f292
Merge pull request #1078 from alleyinteractive/feature/APPLE-163/allo…
kevinfodness Mar 5, 2024
b06cf4a
WIP: APPLE-164
kevinfodness Mar 5, 2024
2a414fa
APPLE-163 Add contentGenerationType automation feature
kevinfodness Mar 5, 2024
ef7824b
APPLE-163 Remove i18n for labels that are field keys and shouldn't be…
kevinfodness Mar 6, 2024
e465e65
Merge pull request #1079 from alleyinteractive/feature/APPLE-164/allo…
kevinfodness Mar 6, 2024
c1ebada
APPLE-165 Make custom fonts from channel available to the theme edit …
kevinfodness Mar 8, 2024
445e7b7
Merge pull request #1081 from alleyinteractive/feature/APPLE-165/chan…
kevinfodness Mar 8, 2024
bf473f6
WIP: APPLE-165
kaitlinbolling Mar 8, 2024
f997550
add custom fonts to get_fonts method
kaitlinbolling Mar 8, 2024
8a8d630
update font notice logic
kaitlinbolling Mar 8, 2024
c74aa7f
cleanup local font check
kaitlinbolling Mar 11, 2024
77fd71c
move function definition
kaitlinbolling Mar 11, 2024
cac54ef
testing phpunit
kaitlinbolling Mar 11, 2024
d5287b5
APPLE-165 Fix unit tests making requests for channel data
kevinfodness Mar 11, 2024
fd6e2f8
change var to const
kaitlinbolling Mar 11, 2024
d4b3020
change back to var
kaitlinbolling Mar 11, 2024
17c77f9
Merge pull request #1082 from alleyinteractive/feature/APPLE-165/them…
kaitlinbolling Mar 13, 2024
c4cb0be
WIP: APPLE-166
kevinfodness Mar 15, 2024
2445e75
APPLE-166 Add failing test for new in article module
kevinfodness Mar 15, 2024
4885a58
APPLE-166 Add basic use case of inserting module after 3rd block
kevinfodness Mar 15, 2024
4245a19
APPLE-166 Add support for different positions for in article module
kevinfodness Mar 15, 2024
3db59b5
APPLE-166 Allow position of in article module to be configured on the…
kevinfodness Mar 15, 2024
c303390
APPLE-166 Fix bugs with setting and reading numeric values in settings
kevinfodness Mar 15, 2024
d3d5626
Ready for review
kevinfodness Mar 15, 2024
ea31b42
APPLE-166 Add escaping for number fields, fix bug in REST API endpoin…
kevinfodness Mar 15, 2024
4a0460c
APPLE-163 Only prepend to metadata titles via Automation
kevinfodness Mar 15, 2024
bc6bc2b
Merge pull request #1086 from alleyinteractive/fix/APPLE-163/metadata…
kevinfodness Mar 18, 2024
d8a4c96
Merge branch 'release/v2.5.0' into feature/APPLE-166/allow-in-article…
kevinfodness Mar 18, 2024
8f3dcde
Merge pull request #1085 from alleyinteractive/feature/APPLE-166/allo…
kevinfodness Mar 18, 2024
90eeb23
WIP: APPLE-167
kevinfodness Mar 20, 2024
24f5b21
APPLE-167 Change apple_news_is_* flags to support true, false, or cha…
kevinfodness Mar 21, 2024
66d1a07
APPLE-167 Update metabox test to use new metadata format for flags
kevinfodness Mar 21, 2024
29b154a
APPLE-167 Update automation screen to treat is* flags as boolean sele…
kevinfodness Mar 21, 2024
f20b7b3
APPLE-167 Update Gutenberg edit screen to convert is* fields to dropd…
kevinfodness Mar 21, 2024
b0c3db2
APPLE-167 Update classic editor metaboxes to use new dropdowns for is…
kevinfodness Mar 21, 2024
bdfc61b
Merge pull request #1090 from alleyinteractive/feature/APPLE-167/remo…
kevinfodness Mar 22, 2024
0b41803
Change role of Date component to byline
kevinfodness Mar 22, 2024
4d1ddec
Remove legacy page-single-push template
kevinfodness Mar 22, 2024
a5bb96a
Merge pull request #1093 from alleyinteractive/fix/remove-legacy-push…
kevinfodness Mar 22, 2024
362f0c8
Merge branch 'release/v2.5.0' into fix/date-role
kevinfodness Mar 22, 2024
f0d90d7
Merge pull request #1092 from alleyinteractive/fix/date-role
kevinfodness Mar 22, 2024
9a19c80
WIP: APPLE-178
kevinfodness Mar 29, 2024
f1eb35b
APPLE-178 Set minimum value for in article position to 3
kevinfodness Mar 29, 2024
2146036
APPLE-178 phpcs fix
kevinfodness Mar 29, 2024
72de29f
Merge pull request #1094 from alleyinteractive/feature/APPLE-178/smal…
kevinfodness Mar 29, 2024
70198f4
WIP: APPLE-179
kevinfodness Mar 31, 2024
a9fd906
APPLE-179 Add new option to prepend text to title component
kevinfodness Mar 31, 2024
33603e4
APPLE-179 Code review feedback
kevinfodness Apr 2, 2024
98ef7a1
APPLE-179 phpcs
kevinfodness Apr 2, 2024
699a144
Merge pull request #1095 from alleyinteractive/feature/APPLE-179/prep…
kevinfodness Apr 2, 2024
bf36e4f
WIP: APPLE-168
kevinfodness Apr 2, 2024
130ccb6
APPLE-168 Separate heading layouts for each heaving level
kevinfodness Apr 3, 2024
a5894c1
APPLE-168 Use proper heading level layout when building; update tests
kevinfodness Apr 3, 2024
8f9e7f9
APPLE-168 WIP upgrade routine for 2.5.0
kevinfodness Apr 3, 2024
1fa37af
APPLE-168 Add failing test for upgrading heading layout customization…
kevinfodness Apr 3, 2024
de6da4b
APPLE-168 Add settings migration for custom JSON templates for headin…
kevinfodness Apr 3, 2024
f351c68
Merge pull request #1096 from alleyinteractive/feature/APPLE-168/indi…
kevinfodness Apr 3, 2024
1cb34d8
WIP: Default caption styling
dlh01 Apr 10, 2024
482f31d
WIP: APPLE-169
kevinfodness Apr 10, 2024
582e9a4
WIP: issue-1073
mogmarsh Apr 11, 2024
f580eab
setting up footnote support
mogmarsh Apr 11, 2024
44c9211
clean up code
mogmarsh Apr 11, 2024
28789f4
switch to component
mogmarsh Apr 11, 2024
35900c3
adding test
mogmarsh Apr 12, 2024
893438c
phpcs
mogmarsh Apr 12, 2024
434ed9e
APPLE-169 Clean up test images after run
kevinfodness Apr 12, 2024
6631ec6
review feedback
mogmarsh Apr 12, 2024
3fcb796
APPLE-169 Separate JSON specs for gallery items with and without capt…
kevinfodness Apr 12, 2024
4e34546
APPLE-170 Set bottom margin on captions on custom themes where JSON i…
kevinfodness Apr 12, 2024
2f59d4c
Merge branch 'refs/heads/release/v2.5.0' into feature/APPLE-170/impro…
kevinfodness Apr 12, 2024
fecbd23
APPLE-170 phpcbf
kevinfodness Apr 12, 2024
798ece8
Merge branch 'refs/heads/develop' into chore/merge-latest-develop
kevinfodness Apr 12, 2024
f31472f
Merge pull request #1102 from alleyinteractive/chore/merge-latest-dev…
kevinfodness Apr 12, 2024
c2fa8c9
Merge branch 'release/v2.5.0' into feature/APPLE-169/expose-lightbox-…
kevinfodness Apr 12, 2024
b7aa606
Merge branch 'release/v2.5.0' into feature/APPLE-170/improve-default-…
kevinfodness Apr 12, 2024
b059f0f
Merge pull request #1098 from alleyinteractive/feature/APPLE-169/expo…
kevinfodness Apr 12, 2024
bd8f703
Merge branch 'release/v2.5.0' into feature/APPLE-170/improve-default-…
kevinfodness Apr 12, 2024
888e103
more feedback
mogmarsh Apr 12, 2024
0a784b4
Merge pull request #1097 from alleyinteractive/feature/APPLE-170/impr…
kevinfodness Apr 15, 2024
a2dbd82
Merge branch 'release/v2.5.0' into feature/issue-1073/add-support-foo…
mogmarsh Apr 16, 2024
5385cd1
phpcs
mogmarsh Apr 16, 2024
a05450b
Merge remote-tracking branch 'origin/feature/issue-1073/add-support-f…
mogmarsh Apr 16, 2024
a788157
Merge pull request #1100 from alleyinteractive/feature/issue-1073/add…
mogmarsh Apr 17, 2024
a58a19c
Use falsy check in case the variable is not defined in addition to be…
kasparsd Apr 23, 2024
bf7a36a
WIP: APPLE-173
kevinfodness Apr 25, 2024
c390ebf
APPLE-173 Make tag styles editable in Customize JSON
kevinfodness Apr 25, 2024
6192f15
APPLE-173 Add cite tag styles
kevinfodness Apr 29, 2024
07f6355
Add 'Debug' link to API request in Apple News plugin
attackant Apr 29, 2024
55ecbfa
Update debug URL in Apple News plugin
attackant Apr 29, 2024
e965660
Add debug action to Apple News plugin admin
attackant Apr 29, 2024
e16625c
Refactor push action and add debugging to Apple News plugin
attackant Apr 29, 2024
23042bd
Update Apple News plugin to version 2.4.9
attackant Apr 30, 2024
c0c0979
Updated version and dependencies of 'publish-to-apple-news' plugin
attackant Apr 30, 2024
4ff3151
Fix version number for new base branch Apple News plugin version to 2…
attackant Apr 30, 2024
f70fb1f
APPLE-173 Add upgrade routine for cite default styles in themes
kevinfodness Apr 30, 2024
54e8917
APPLE-173 Add cite styles to theme JSON definitions
kevinfodness Apr 30, 2024
13298a3
APPLE-173 Better check for successful extraction of default text styl…
kevinfodness May 1, 2024
38fcd1c
Merge pull request #1109 from alleyinteractive/feature/APPLE-173/supp…
kevinfodness May 1, 2024
40b1141
Merge branch 'release/v2.5.0' into issue-1110
attackant May 2, 2024
be062c1
add screenshots
attackant May 2, 2024
f0b316c
rm images we dont need here
attackant May 2, 2024
53714e9
Refactor post metadata retrieval in Apple News plugin for 2.5.0
attackant May 2, 2024
fd68683
Merge pull request #1111 from alleyinteractive/issue-1110
attackant May 2, 2024
42f3ba3
Fix malformed tokens
dlh01 May 6, 2024
9c3388a
Remove stray docs
dlh01 May 6, 2024
05578a3
Detect images inside links inside figures
dlh01 May 6, 2024
f230b40
Add test for node detection
dlh01 May 7, 2024
d022d03
Apply text alignment to body components
dlh01 May 6, 2024
80ac3ea
Merge pull request #1114 from alleyinteractive/fix/tokens
dlh01 May 8, 2024
b1867d1
Merge branch 'release/v2.5.0' into feature/GH-1077/body-alignment
dlh01 May 8, 2024
a89c789
Merge pull request #1115 from alleyinteractive/feature/GH-1077/body-a…
dlh01 May 8, 2024
79ad4b6
Merge branch 'release/v2.5.0' into fix/GH-867/linked-image-align
dlh01 May 8, 2024
6e5a6bf
Merge pull request #1116 from alleyinteractive/fix/GH-867/linked-imag…
dlh01 May 8, 2024
64d5762
WIP: issue-1074
mogmarsh Apr 12, 2024
3b2799d
starting to set up aside component
mogmarsh Apr 12, 2024
f85ec34
working with html string
mogmarsh Apr 12, 2024
85c03ce
first attempt at inner components
mogmarsh Apr 16, 2024
623fab2
partial progress on exporting the inner components
mogmarsh Apr 25, 2024
d5b59c2
Simplify component generation; define default style
dlh01 May 8, 2024
ec63545
Add default to theme JSON
dlh01 May 8, 2024
943db38
Add default to options init
dlh01 May 8, 2024
0c86efd
APPLE-172 Add new properties for aside to the theme
kevinfodness May 8, 2024
59ab1f5
APPLE-172 Migrate new aside properties on upgrade
kevinfodness May 8, 2024
730a982
APPLE-172 Integrate new properties into output
kevinfodness May 8, 2024
f75d8d7
APPLE-172 Fix anchoring bug with asides
kevinfodness May 9, 2024
77f535b
Merge pull request #1101 from alleyinteractive/feature/issue-1074/add…
kevinfodness May 9, 2024
0fe590e
APPLE-172 Add test for new Aside component
kevinfodness May 10, 2024
5841f0c
Merge pull request #1107 from xwp/fix/1106-sections-on-patterns
kevinfodness May 10, 2024
98c8bf6
WIP: issue-1002
kevinfodness May 10, 2024
55cbc23
Merge branch 'release/v2.5.0' into feature/APPLE-172/aside-test
kevinfodness May 10, 2024
49d4a7f
APPLE-172 Fix bug with included file directory path
kevinfodness May 10, 2024
100f022
Merge pull request #1120 from alleyinteractive/feature/APPLE-172/asid…
kevinfodness May 10, 2024
802209a
Standardize on __DIR__ as the method for finding files to be included
kevinfodness May 10, 2024
07db972
Merge branch 'release/v2.5.0' into fix/issue-1002/path-traversal-plug…
kevinfodness May 10, 2024
f1173a3
WIP: issue-1117
kevinfodness May 10, 2024
0a5715c
Fix bug with cover image caption format
kevinfodness May 10, 2024
0e9912e
WIP: issue-1104
kevinfodness May 10, 2024
868167f
Update readme for release of v2.5.0
kevinfodness May 10, 2024
a99bcf7
Merge pull request #1121 from alleyinteractive/fix/issue-1002/path-tr…
kevinfodness May 10, 2024
b1bed12
Merge pull request #1122 from alleyinteractive/fix/issue-1117/gutenbe…
kevinfodness May 10, 2024
6f53aa2
Merge branch 'release/v2.5.0' into feature/issue-1104/truncate-change…
kevinfodness May 10, 2024
db665a5
Merge pull request #1123 from alleyinteractive/feature/issue-1104/tru…
kevinfodness May 10, 2024
ff3b7dd
Remove deployignore, update distignore, add script to generate a test…
kevinfodness May 10, 2024
34e82ba
WIP: APPLE-182
kevinfodness May 22, 2024
db1186d
APPLE-182 Make aside class field optional
kevinfodness May 22, 2024
9ee2bce
Merge pull request #1128 from alleyinteractive/feature/APPLE-182/make…
kevinfodness May 22, 2024
59808dc
Merge branch 'release/v2.5.0' into chore/release-prep
kevinfodness May 22, 2024
4fd2824
Merge pull request #1127 from alleyinteractive/chore/release-prep
kevinfodness May 23, 2024
576e32b
WIP: issue-1126
kevinfodness May 24, 2024
7d69649
Write failing test for Aside subcomponents
kevinfodness May 24, 2024
20e0d23
Fix bad label on Customize JSON page
kevinfodness May 28, 2024
e578f17
Begin adding subcomponent structure
kevinfodness May 28, 2024
51550ff
Finish making subcomponents work in tests
kevinfodness May 28, 2024
61af24f
Update other Aside test to make it compatible with subcomponents
kevinfodness May 29, 2024
ad306b2
Add subcomponent selector to Customize JSON screen
kevinfodness May 29, 2024
340d427
Refactor method of getting subcomponent specs
kevinfodness May 29, 2024
6c35237
Clean up the diff a bit
kevinfodness May 29, 2024
3dfd975
Fix get_component_class
kevinfodness May 29, 2024
403bda0
Handle JSON spec save/delete
kevinfodness May 30, 2024
b5f8bdc
Merge pull request #1129 from alleyinteractive/feature/issue-1126/add…
kevinfodness May 31, 2024
861e530
WIP: issue-1132
kevinfodness Jun 4, 2024
e370482
Completely remove advertising settings
kevinfodness Jun 4, 2024
294072d
Add note about advertising settings to changelog
kevinfodness Jun 4, 2024
fef101a
Merge pull request #1133 from alleyinteractive/fix/issue-1132/remove-…
kevinfodness Jun 4, 2024
4d42f22
Fix bug with accessing settings on components
kevinfodness Jun 5, 2024
27dd9e7
Merge pull request #1134 from alleyinteractive/fix/customize-json-war…
kevinfodness Jun 5, 2024
6b0b159
WIP: APPLE-185
kaitlinbolling Jun 21, 2024
41fef68
fix issue with aside borders set to none
kaitlinbolling Jun 21, 2024
a0465fd
cleanup
kaitlinbolling Jun 21, 2024
bd875e7
Ready for review
kaitlinbolling Jun 21, 2024
163fa21
Merge pull request #1138 from alleyinteractive/feature/APPLE-185/inve…
kaitlinbolling Jun 24, 2024
537ce01
Fix bug with images within asides
kevinfodness Jun 24, 2024
8bb1408
Merge pull request #1139 from alleyinteractive/fix/aside-image-caption
kevinfodness Jun 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ The Publish to Apple News plugin enables your WordPress content to be published
- Control individual posts with options to publish, update, or delete.
- Publish individual posts or in bulk.
- Handles image galleries and popular embeds like YouTube and Vimeo that are supported by Apple News.
- Automatically adjust advertisement settings.

Please visit our [wiki](https://github.com/alleyinteractive/apple-news/wiki) for detailed information on the follow items:

3 changes: 0 additions & 3 deletions assets/themes/classic.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"ad_frequency": 5,
"ad_margin": 15,
"aside_alignment": "right",
"aside_background_color": "#d3d3d3",
"aside_border_color": "#000000",
@@ -58,7 +56,6 @@
"dropcap_number_of_lines": 5,
"dropcap_number_of_raised_lines": 0,
"dropcap_padding": 5,
"enable_advertisement": "yes",
"gallery_type": "gallery",
"header1_color": "#000000",
"header1_font": "Baskerville",
3 changes: 0 additions & 3 deletions assets/themes/colorful.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"ad_frequency": 5,
"ad_margin": 15,
"aside_alignment": "right",
"aside_background_color": "#ffff00",
"aside_border_color": "#3045ca",
@@ -64,7 +62,6 @@
"dropcap_number_of_lines": 5,
"dropcap_number_of_raised_lines": 0,
"dropcap_padding": 5,
"enable_advertisement": "yes",
"gallery_type": "gallery",
"header1_color": "#000000",
"header1_font": "HelveticaNeue-CondensedBlack",
3 changes: 0 additions & 3 deletions assets/themes/dark.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"ad_frequency": 5,
"ad_margin": 15,
"aside_alignment": "right",
"aside_background_color": "",
"aside_border_color": "#ffe890",
@@ -64,7 +62,6 @@
"dropcap_number_of_lines": 5,
"dropcap_number_of_raised_lines": 0,
"dropcap_padding": 5,
"enable_advertisement": "yes",
"gallery_type": "gallery",
"header1_color": "#ffffff",
"header1_font": "HelveticaNeue-CondensedBold",
3 changes: 0 additions & 3 deletions assets/themes/default.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"ad_frequency": 5,
"ad_margin": 15,
"aside_alignment": "right",
"aside_background_color": "#e1e1e1",
"aside_border_color": "#4f4f4f",
@@ -64,7 +62,6 @@
"dropcap_number_of_lines": 4,
"dropcap_number_of_raised_lines": 0,
"dropcap_padding": 5,
"enable_advertisement": "yes",
"gallery_type": "gallery",
"header1_color": "#333333",
"header1_font": "AvenirNext-Bold",
3 changes: 0 additions & 3 deletions assets/themes/modern.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"ad_frequency": 5,
"ad_margin": 15,
"aside_alignment": "right",
"aside_background_color": "#e6f7ff",
"aside_border_color": "#30bcff",
@@ -64,7 +62,6 @@
"dropcap_number_of_lines": 4,
"dropcap_number_of_raised_lines": 0,
"dropcap_padding": 5,
"enable_advertisement": "yes",
"gallery_type": "gallery",
"header1_color": "#000000",
"header1_font": "AvenirNext-Bold",
3 changes: 0 additions & 3 deletions assets/themes/pastel.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"ad_frequency": 5,
"ad_margin": 15,
"aside_alignment": "right",
"aside_background_color": "#ffebe0",
"aside_border_color": "#ffffff",
@@ -64,7 +62,6 @@
"dropcap_number_of_lines": 5,
"dropcap_number_of_raised_lines": 0,
"dropcap_padding": 5,
"enable_advertisement": "yes",
"gallery_type": "gallery",
"header1_color": "#000000",
"header1_font": "BodoniSvtyTwoOSITCTT-Book",
69 changes: 0 additions & 69 deletions includes/apple-exporter/builders/class-advertising-settings.php

This file was deleted.

1 change: 0 additions & 1 deletion includes/apple-exporter/class-component-factory.php
Original file line number Diff line number Diff line change
@@ -121,7 +121,6 @@ public static function initialize(
self::register_component( 'author', '\\Apple_Exporter\\Components\\Author' );
self::register_component( 'date', '\\Apple_Exporter\\Components\\Date' );
self::register_component( 'slug', '\\Apple_Exporter\\Components\\Slug' );
self::register_component( 'advertisement', '\\Apple_Exporter\\Components\\Advertisement' );
self::register_component( 'end-of-article', '\\Apple_Exporter\\Components\\End_Of_Article' );
self::register_component( 'in-article', '\\Apple_Exporter\\Components\\In_Article' );

1 change: 0 additions & 1 deletion includes/apple-exporter/class-exporter.php
Original file line number Diff line number Diff line change
@@ -92,7 +92,6 @@ public function initialize_builders( $builders = null ) {
$this->register_builder( 'textStyles', new Builders\Text_Styles( $this->content, $this->settings ) );
$this->register_builder( 'componentLayouts', new Builders\Component_Layouts( $this->content, $this->settings ) );
$this->register_builder( 'metadata', new Builders\Metadata( $this->content, $this->settings ) );
$this->register_builder( 'autoplacement', new Builders\Advertising_Settings( $this->content, $this->settings ) );
}

Component_Factory::initialize(
26 changes: 0 additions & 26 deletions includes/apple-exporter/class-theme.php
Original file line number Diff line number Diff line change
@@ -556,18 +556,6 @@ private static function sort_registry( $registry ) {
*/
private static function initialize_options() {
self::$options = [
'ad_frequency' => [
'default' => 5,
'description' => __( 'A number between 1 and 10 defining the frequency for automatically inserting dynamic advertisements into articles. For more information, see the <a href="https://developer.apple.com/documentation/apple_news/advertisementautoplacement" target="_blank">Apple News Format Reference</a>.', 'apple-news' ),
'label' => __( 'Ad Frequency', 'apple-news' ),
'type' => 'integer',
],
'ad_margin' => [
'default' => 15,
'description' => __( 'The margin to use above and below inserted ads.', 'apple-news' ),
'label' => __( 'Ad Margin', 'apple-news' ),
'type' => 'integer',
],
'aside_alignment' => [
'default' => 'right',
'label' => __( 'Aside component alignment', 'apple-news' ),
@@ -964,12 +952,6 @@ private static function initialize_options() {
'label' => __( 'Drop cap padding', 'apple-news' ),
'type' => 'integer',
],
'enable_advertisement' => [
'default' => 'yes',
'label' => __( 'Enable advertisements', 'apple-news' ),
'options' => [ 'yes', 'no' ],
'type' => 'select',
],
'gallery_type' => [
'default' => 'gallery',
'label' => __( 'Gallery type', 'apple-news' ),
@@ -2536,14 +2518,6 @@ private function initialize_groups() {
'description' => __( 'Can either be a standard gallery, or mosaic.', 'apple-news' ),
'settings' => [ 'gallery_type' ],
],
'advertisement' => [
'label' => __( 'Advertisement', 'apple-news' ),
'settings' => [
'enable_advertisement',
'ad_frequency',
'ad_margin',
],
],
'aside' => [
'label' => __( 'Aside', 'apple-news' ),
'description' => __( 'Content that is not directly related to the article.', 'apple-news' ),
74 changes: 0 additions & 74 deletions includes/apple-exporter/components/class-advertisement.php

This file was deleted.

3 changes: 1 addition & 2 deletions includes/apple-exporter/components/class-component.php
Original file line number Diff line number Diff line change
@@ -44,8 +44,7 @@ abstract class Component {

/**
* Anchorable components are anchored to the previous element that appears in
* the position specified. If the previous element is an advertisement,
* attaches to the next instead of the previous element.
* the position specified.
*
* @since 0.6.0
* @var int
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@ The 'Publish to Apple News' plugin enables WordPress sites with approved Apple N
* Control individual posts with options to publish, update, or delete.
* Publish individual posts or in bulk.
* Handles image galleries and popular embeds like YouTube and Vimeo that are supported by Apple News.
* Automatically adjust advertisement settings.

To enable content from your WordPress site to be published to your Apple News channel, you must obtain and enter Apple News API credentials from Apple.

@@ -48,6 +47,7 @@ Please visit our [wiki](https://github.com/alleyinteractive/apple-news/wiki) for

= 2.5.0 =

* Breaking Change: Removed support for per-article advertising settings, which have been deprecated by Apple. Advertising settings can now only be set at the channel level.
* Enhancement: Added support for an aside component. To use, specify the class for the container that includes the aside content in the plugin settings.
* Enhancement: Added support for the Footnotes block.
* Enhancement: Added a new In Article module, similar to the End of Article module, but which is configurable to appear within article content instead.
31 changes: 10 additions & 21 deletions tests/admin/test-class-admin-apple-themes.php
Original file line number Diff line number Diff line change
@@ -212,19 +212,10 @@ public function test_delete_theme() {
public function test_import_theme() {

// Setup.
$advertisement_json = [
'role' => 'banner_advertisement',
'bannerType' => 'double_height',
];
$import_settings = [
'layout_margin' => 100,
'layout_gutter' => 20,
'json_templates' => [
'advertisement' => [
'json' => $advertisement_json,
],
],
'theme_name' => 'Test Import Theme',
$import_settings = [
'layout_margin' => 100,
'layout_gutter' => 20,
'theme_name' => 'Test Import Theme',
];

// Test.
@@ -235,10 +226,6 @@ public function test_import_theme() {
$theme_settings = $theme->all_settings();
$this->assertEquals( 100, $theme_settings['layout_margin'] );
$this->assertEquals( 20, $theme_settings['layout_gutter'] );
$this->assertEquals(
$advertisement_json,
$theme_settings['json_templates']['advertisement']['json']
);

// Cleanup.
$theme->delete();
@@ -336,14 +323,16 @@ public function test_json_save_custom_spec() {
$this->create_default_theme();
$json = <<<JSON
{
"role": "banner_advertisement",
"bannerType": "double_height"
"role": "body",
"text": "#text#",
"format": "html",
"anchor": "abc123"
}
JSON;
$nonce = wp_create_nonce( 'apple_news_json' );
/* phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized */
$_POST['apple_news_theme'] = Theme::get_active_theme_name();
$_POST['apple_news_component'] = 'Advertisement';
$_POST['apple_news_component'] = 'Body';
$_POST['apple_news_action'] = 'apple_news_save_json';
$_POST['apple_news_json_json'] = $json;
$_POST['page'] = 'apple-news-json';
@@ -363,7 +352,7 @@ public function test_json_save_custom_spec() {
$this->assertTrue( $theme->load() );
$theme_settings = $theme->all_settings();
$stored_json = wp_json_encode(
$theme_settings['json_templates']['advertisement']['json'],
$theme_settings['json_templates']['body']['json'],
JSON_PRETTY_PRINT
);
$this->assertEquals( $stored_json, $json );
137 changes: 0 additions & 137 deletions tests/apple-exporter/builders/test-class-advertising-settings.php

This file was deleted.

1 change: 0 additions & 1 deletion tests/apple-exporter/builders/test-class-components.php
Original file line number Diff line number Diff line change
@@ -321,7 +321,6 @@ public function test_image_bundling() {
public function test_meta_component_ordering( $order, $expected, $components ) {
$this->set_theme_settings(
[
'enable_advertisement' => 'no',
'meta_component_order' => $order,
]
);
60 changes: 0 additions & 60 deletions tests/apple-exporter/components/test-class-advertisement.php

This file was deleted.