Skip to content

'widget' context should be replaced by 'widgets' context in lib/hooks.php line 39 #27

@oseg

Description

@oseg
  • 'widget' context should be replaced by 'widgets' context in lib/hooks.php
  • I would also move the '!' operator outside of the parenthesis because I don't know which operator will be executed first between '!' and 'instanceof'

Following code:

	if ((!$entity instanceof ElggObject) || elgg_in_context('widget')) {
		return;
	}

should be replaced by:

	if (!($entity instanceof ElggObject) || elgg_in_context('widgets')) {
		return;
	}

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