WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 5 months ago

#49590 closed defect (bug) (duplicate)

Hello Dolly default plugin and get_plugins()

Reported by: xFireFartx Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.4
Component: Plugins Keywords:
Focuses: Cc:

Description

Hi,
I just noticed something weird: The hello-dolly plugin which is included by default on wordpress installs is just added as hello.php in the plugins folder.
This causes the get_plugins() call to return only hello.php as a plugin slug for this as it is not in a folder with the slug name like in the example over here: https://codex.wordpress.org/Function_Reference/get_plugins

Can we maybe move the plugin into the folder hello-dolly by default so it behaves like a real plugin? I think there is no other way to get the slug without parsing the PluginURI field which I would like to avoid.

Current output from get_plugins():

    [hello.php] => Array
        (
            [Name] => Hello Dolly
            [PluginURI] => http://wordpress.org/plugins/hello-dolly/
            [Version] => 1.7.2
            [Description] => This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
            [Author] => Matt Mullenweg
            [AuthorURI] => http://ma.tt/
            [TextDomain] =>
            [DomainPath] =>
            [Network] =>
            [RequiresWP] =>
            [RequiresPHP] =>
            [Title] => Hello Dolly
            [AuthorName] => Matt Mullenweg
        )

This behaviour is present with 5.4 beta 1

Change History (4)

#1 @xFireFartx
9 months ago

Another option would be to parse the slug inside wordpress core and return it as a seperate field on the plugin data

#2 @SergeyBiryukov
9 months ago

  • Component changed from General to Plugins
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome back to WordPress Trac!

Thanks for the ticket, we're already tracking this issue in #29540, #37351, and #49338.

#3 @xFireFartx
9 months ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

All of the tickets are closed as invalid without further comment?

#4 @ocean90
5 months ago

  • Resolution set to duplicate
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.