Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14651 closed defect (bug) (fixed)

Call to undefined function get_hidden_columns()

Reported by: arena Owned by: scribu
Priority: normal Milestone: 3.1
Component: Administration Version: 3.0.1
Severity: normal Keywords:
Cc:

Description

on 3.1 alpha, get_hidden_columns() do not exists anymore ! many plugins will fail when upgrading from 3.0 to 3.1 (which should be a minor update ...)

Change History (21)

  • Milestone changed from Awaiting Review to 3.1
  • Owner set to scribu
  • Severity changed from blocker to normal
  • Status changed from new to assigned

3.1 is not a minor release.

Assigning to scribu. He'll be rescuing the various functions which were cast away.

comment:2 follow-up: ↓ 3   scribu3 years ago

  • Keywords reporter-feedback added

arena: please give examples of such a plugins, so I can see how they're using the function.

comment:3 in reply to: ↑ 2   arena3 years ago

Replying to scribu:

arena: please give examples of such a plugins, so I can see how they're using the function.

MailPress

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [15514]) Deprecate get_hidden_columns(). Fixes #14651

  • Keywords reporter-feedback removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

These functions still need to work. We need to bridge all functions removed with the new API without losing any functionality.

(In [15517]) Make deprecated functions work. See #14651

@nacin, any doc on that new api (besides php code) ?

Not yet, but you can take a look in these files:

wp-admin/includes/list-table.php
wp-admin/includes/default-list-tables.php

and this ticket: #14579

last test from svn

bug : Call to undefined function get_hidden_columns() has disappeared

but

screen options still not showing up ! (it did in 3.0)

(In [15519]) replace $table with $wp_list_table. See #14651

screen options still not showing up ! (it did in 3.0)

That's because it's doing it wrong. If it was calling register_column_headers(), like it was supposed to, it would work (with r15519).

i'm personnaly using the following filter :

'manage_' . screen . '_columns' ...

comment:13 follow-up: ↓ 14   scribu3 years ago

Yes, that filter still exists, but it's meant for modifying already registered columns, like those on the Posts screen.

comment:14 in reply to: ↑ 13 ; follow-up: ↓ 18   arena3 years ago

Replying to scribu:

Yes, that filter still exists, but it's meant for modifying already registered columns, like those on the Posts screen.

??? but it worked !!!

comment:15 follow-ups: ↓ 16 ↓ 17   arena3 years ago

some code consistency with other wp classes

all WP_ classes seems to have their constructor function called

construct()

and are adding (for php4 support) another function with the same name of the class calling $this->construct()

(sample WP_Widget in wp-includes/widgets.php)

comment:16 in reply to: ↑ 15   arena3 years ago

Replying to arena:

some code consistency with other wp classes

all WP_ classes seems to have their constructor function called

construct()

and are adding (for php4 support) another function with the same name of the class calling $this->construct()

(sample WP_Widget in wp-includes/widgets.php)

construct func starts with 2 underscores

comment:17 in reply to: ↑ 15 ; follow-up: ↓ 19   scribu3 years ago

all WP_ classes seems to have their constructor function called __construct()

Widgets don't. When we finally drop PHP4, it will be worth renaming them, as you suggest.

comment:18 in reply to: ↑ 14   scribu3 years ago

Replying to arena:

Replying to scribu:

Yes, that filter still exists, but it's meant for modifying already registered columns, like those on the Posts screen.

??? but it worked !!!

All is good then. :)

comment:19 in reply to: ↑ 17   arena3 years ago

Replying to scribu:

all WP_ classes seems to have their constructor function called __construct()

Widgets don't. When we finally drop PHP4, it will be worth renaming them, as you suggest.

widget does see lines 76 and 93 (yes tricky because not in the first lines of the class)

  • Resolution set to fixed
  • Status changed from reopened to closed

Closing as fixed. If you notice any other back-compat issues, please open new tickets.

for info (In [15653]) #14776 undeprecates get_hidden_columns()

Note: See TracTickets for help on using tickets.