Skip to content

Genesis warning messages #127

Closed
Closed
@BrianBourn

Description

@BrianBourn

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions