Skip to content

Genesis warning messages #127

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

Closed
BrianBourn opened this issue Mar 21, 2017 · 1 comment
Closed

Genesis warning messages #127

BrianBourn opened this issue Mar 21, 2017 · 1 comment

Comments

@BrianBourn
Copy link

BrianBourn commented Mar 21, 2017

The Genesis Framework parent theme passes as PHP 7 compatible but shows 6 warnings.

PHP 7.0 compatible.

Name: Genesis

FILE: /wp-content/themes/genesis/lib/functions/layout.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 510 | WARNING | Function name "__genesis_return_content_sidebar" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
 525 | WARNING | Function name "__genesis_return_sidebar_content" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
 540 | WARNING | Function name "__genesis_return_content_sidebar_sidebar" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
 555 | WARNING | Function name "__genesis_return_sidebar_sidebar_content" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
 570 | WARNING | Function name "__genesis_return_sidebar_content_sidebar" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
 585 | WARNING | Function name "__genesis_return_full_width_content" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Here's the code referenced from the report.

/**
 * Return layout key 'content-sidebar'.
 *
 * Used as shortcut second parameter for `add_filter()`.
 *
 * @since 1.7.0
 *
 * @return string `'content-sidebar'`.
 */
function __genesis_return_content_sidebar() {

	return 'content-sidebar';

}

/**
 * Return layout key 'sidebar-content'.
 *
 * Used as shortcut second parameter for `add_filter()`.
 *
 * @since 1.7.0
 *
 * @return string `'sidebar-content'`.
 */
function __genesis_return_sidebar_content() {

	return 'sidebar-content';

}

/**
 * Return layout key 'content-sidebar-sidebar'.
 *
 * Used as shortcut second parameter for `add_filter()`.
 *
 * @since 1.7.0
 *
 * @return string `'content-sidebar-sidebar'`.
 */
function __genesis_return_content_sidebar_sidebar() {

	return 'content-sidebar-sidebar';

}

/**
 * Return layout key 'sidebar-sidebar-content'.
 *
 * Used as shortcut second parameter for `add_filter()`.
 *
 * @since 1.7.0
 *
 * @return string `'sidebar-sidebar-content'`.
 */
function __genesis_return_sidebar_sidebar_content() {

	return 'sidebar-sidebar-content';

}

/**
 * Return layout key 'sidebar-content-sidebar'.
 *
 * Used as shortcut second parameter for `add_filter()`.
 *
 * @since 1.7.0
 *
 * @return string `'sidebar-content-sidebar'`.
 */
function __genesis_return_sidebar_content_sidebar() {

	return 'sidebar-content-sidebar';

}

/**
 * Return layout key 'full-width-content'.
 *
 * Used as shortcut second parameter for `add_filter()`.
 *
 * @since 1.7.0
 *
 * @return string `'full-width-content'`.
 */
function __genesis_return_full_width_content() {

	return 'full-width-content';

}

The core Genesis developers are aware & consider this to not be an issue as it's unlikely that PHP 7 will ever introduce any functions that start with __genesis_. Since Genesis runs on hundreds of thousands of WordPress sites, would it be possible to add Genesis to the Results page https://github.com/wpengine/phpcompat/wiki/Results ?

@jayhill90
Copy link

Genesis has been whitelisted and is in the current version 1.4.7

DavidHickman pushed a commit to DavidHickman/phpcompat that referenced this issue Apr 4, 2019
DavidHickman pushed a commit to DavidHickman/phpcompat that referenced this issue Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants