WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14651 closed defect (bug) (fixed)

Call to undefined function get_hidden_columns()

Reported by: arena Owned by: scribu
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0.1
Component: Administration Keywords:
Focuses: 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)

comment:1 nacin4 years ago

  • 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: scribu4 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 arena4 years ago

Replying to scribu:

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

MailPress

comment:4 scribu4 years ago

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

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

comment:5 nacin4 years ago

  • 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.

comment:6 scribu4 years ago

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

comment:7 arena4 years ago

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

comment:8 scribu4 years ago

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

comment:9 arena4 years ago

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)

comment:10 scribu4 years ago

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

comment:11 scribu4 years ago

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).

comment:12 arena4 years ago

i'm personnaly using the following filter :

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

comment:13 follow-up: scribu4 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: arena4 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: arena4 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 arena4 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: scribu4 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 scribu4 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 arena4 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)

comment:20 scribu4 years ago

  • 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.

comment:21 arena4 years ago

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

Note: See TracTickets for help on using tickets.