Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #33519, comment 4


Ignore:
Timestamp:
08/24/2015 09:01:37 AM (11 years ago)
Author:
flixos90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33519, comment 4

    initial v1  
    1 @boonebgorges
    2 
    3 it's not that your example doesn't work. My issue is not about performance either, it is rather about convenience. The purpose of the `id=>title` however would be to receive an array that can immediately be passed to one of the many custom-fields/settings-pages frameworks out there (most of which accept an array of `'value' => 'label'` for options in dropdowns), so we could have a dropdown of posts there. I have been writing foreach loops over and over that transform a `WP_Post` array into an array of `'ID' => 'post_title'`, so I would say this enhancement is not critical, but it would certainly make things quicker for developers.
     1@boonebgorges, it's not that your example doesn't work. My issue is not about performance either, it is rather about convenience. The purpose of the `id=>title` however would be to receive an array that can immediately be passed to one of the many custom-fields/settings-pages frameworks out there (most of which accept an array of `'value' => 'label'` for options in dropdowns), so we could have a dropdown of posts there. I have been writing foreach loops over and over that transform a `WP_Post` array into an array of `'ID' => 'post_title'`, so I would say this enhancement is not critical, but it would certainly make things quicker for developers.
    42
    53Since it is only a convenience enhancement, after hearing your thoughts and reading the discussion I see it is probably not worth the effort to put it into `WP_Query`.