Skip to content

Commit 5fb3859

Browse files
authored
Fix #1764 (#1765)
1 parent 57c0823 commit 5fb3859

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fixed
3+
4+
Default number of attachments now works correctly in block editor.

includes/class-options.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ public static function maybe_disable_interactions( $pre ) {
137137
* Default max image attachments.
138138
*
139139
* @param string $value The value of the option.
140-
* @return string|int
140+
*
141+
* @return string|int The value of the option.
141142
*/
142143
public static function default_max_image_attachments( $value ) {
143144
if ( ! \is_numeric( $value ) ) {

includes/wp-admin/class-settings-fields.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,14 @@ public static function register_settings_fields() {
8383
);
8484
}
8585

86-
if ( ! site_supports_blocks() || \is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
87-
add_settings_field(
88-
'activitypub_max_image_attachments',
89-
__( 'Media attachments', 'activitypub' ),
90-
array( self::class, 'render_max_image_attachments_field' ),
91-
'activitypub_settings',
92-
'activitypub_activities',
93-
array( 'label_for' => 'activitypub_max_image_attachments' )
94-
);
95-
}
86+
add_settings_field(
87+
'activitypub_max_image_attachments',
88+
__( 'Media attachments', 'activitypub' ),
89+
array( self::class, 'render_max_image_attachments_field' ),
90+
'activitypub_settings',
91+
'activitypub_activities',
92+
array( 'label_for' => 'activitypub_max_image_attachments' )
93+
);
9694

9795
add_settings_field(
9896
'activitypub_support_post_types',

0 commit comments

Comments
 (0)