Make WordPress Core

Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#59557 closed defect (bug) (fixed)

Twenty Nineteen: The required WordPress versions do not match

Reported by: poena's profile poena Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.4 Priority: normal
Severity: normal Version: 5.0
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

In the readme, style.scss and style.css files, the required WordPress version is set to 4.9.6:

Requires at least: 4.9.6

But in functions.php, the minimum version is 4.7.
It has been 4.7 since #45424.

/**
 * Twenty Nineteen only works in WordPress 4.7 or later.
 */
if ( version_compare( $GLOBALS['wp_version'], '4.7', '<' ) ) {
	require get_template_directory() . '/inc/back-compat.php';
	return;
}

Since there may already be installations on 4.7, the file headers should be updated to say 4.7.

A previous conversation about the required version mentions that the version needs to be 4.9.6 because the theme uses the_privacy_policy_link(). But the_privacy_policy_link() is wrapped inside a function_exist:

if ( function_exists( 'the_privacy_policy_link' ) ) {
	the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}

Other relevant discussions:
https://github.com/WordPress/twentynineteen/issues/431
https://github.com/WordPress/twentynineteen/pull/432

Change History (20)

#1 @audrasjb
12 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.4

Hello Carolina :)

Since the_privacy_policy_link() is wrapped inside a function_exists check, I don't think it is relevant to require 4.9.6. Let's update to 4.7 everywhere.

This ticket was mentioned in PR #5422 on WordPress/wordpress-develop by @kafleg.


12 months ago
#2

  • Keywords has-patch added; needs-patch removed

This PR will update the Requires at least to 4.7 everywhere.

#3 @huzaifaalmesbah
12 months ago

Thank you for creating the ticket. You raised a good point.

#4 @SergeyBiryukov
12 months ago

  • Description modified (diff)
  • Summary changed from Twenty Ninteen: The required WordPress versions do not match to Twenty Nineteen: The required WordPress versions do not match

@kafleg commented on PR #5422:


12 months ago
#5

I'm not able to remove #b251590 commit. Please ignore that commit and rest of the commits are fine.

#6 @nicolefurlan
12 months ago

@poena does this PR look good? Does this need testing or is it ready for commit?

@shailu25 commented on PR #5422:


12 months ago
#7

Hi @kafleg

There are one more instance need to change in readme.txt file its also need to change 4.7 instead of 4.9.6. can you please update it ?

https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/22027190/b6c4362f-4db6-4915-96ff-1dd75d78cc05

#8 @oglekler
12 months ago

  • Keywords changes-requested added

This is simple enough (or it looks like it) and can be done quickly, so, I am keeping it in the current milestone for now.

This ticket was mentioned in Slack in #core by nicolefurlan. View the logs.


12 months ago

#10 @nicolefurlan
12 months ago

This ticket was discussed in today's bug scrub.

@kafleg would you be able to update the PR ASAP so that we could get this included in the 6.4 release?

@felipeelia also said they would be willing to help.

#12 @kafleg
12 months ago

Hi @nicolefurlan

Oakay, doing it today.

#13 @kafleg
12 months ago

Thank you for doing it @felipeelia.

@kafleg commented on PR #5503:


12 months ago
#14

Thank you for adding the commit for the remaining update. It looks good to me.

@shailu25 commented on PR #5503:


12 months ago
#15

Thank you @felipeelia for Updating Remaining changes
It looks good to me.

#16 @shailu25
12 months ago

  • Keywords changes-requested removed

#17 @SergeyBiryukov
12 months ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#18 @SergeyBiryukov
12 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 56952:

Twenty Nineteen: Correct the required WordPress version in theme headers.

The required version was previously set to two different values:

  • 4.7 in the theme's functions.php file.
  • 4.9.6 in theme headers, because of the the_privacy_policy_link() function usage in footer.php.

However, as the_privacy_policy_link() call is wrapped in a function_exists() check, it does not affect the requirements in practice.

This commit aims to correct the discrepancy by updating theme headers to match the actual required WP version.

Follow-up to [43808], [43892].

Props poena, kafleg, felipeelia, audrasjb, huzaifaalmesbah, shailu25, nicolefurlan, oglekler.
Fixes #59557.

@SergeyBiryukov commented on PR #5422:


12 months ago
#19

Thanks for the PR! Merged in r56952.

@SergeyBiryukov commented on PR #5503:


12 months ago
#20

Thanks for the PR! Merged in r56952.

Note: See TracTickets for help on using tickets.