Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

website slow down after redux plugin activation #202

@mohammedeisa

Description

@mohammedeisa

Issue description:

A client mentioned that Redux causes a slow down in his website.

He changed the code in function is_inside_theme in \redux-core\inc\classes\class-redux-functions-ex.php to fix this issue.

Existing code:

				if ( count( $theme_paths ) > 1 ) {
					$key = array_search( $theme_path, $theme_paths, true );

					if ( false !== $key ) {
						unset( $theme_paths[ $key ] );
					}
					$data['parent_slug'] = end( $theme_paths );
					$data['parent_slug'] = explode( '/', $data['parent_slug'] );
					$data['parent_slug'] = end( $data['parent_slug'] );
				}

Client code:

				if ( count( $theme_paths ) > 1 ) {
					$key = array_search( $theme_path, $theme_paths, true );

					if ( false !== $key ) {
						unset( $theme_paths[ $key ] );
					}

					$theme_paths_end= end( $theme_paths );
					$parent_slug_end= explode( '/', $theme_paths_end );
					$parent_slug_end = end( $parent_slug_end);

					$data['parent_slug'] =$theme_paths_end ;
					$data['parent_slug'] = $parent_slug_end;
				}

This needs to be investigated.

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