set_current_screen() functionality

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

set_current_screen() functionality

Utkarsh Dixit
Hi,
Can someone explain the functionality of set_current_screen() function?

http://codex.wordpress.org/Function_Reference/set_current_screen#Description

Not explained properly here.

Thanks.
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: set_current_screen() functionality

Otto-19
Basically, the set_current_screen function gets an instance of the
WP_Screen object and calls it to set the $current_screen global. It should
not be something you have to call yourself, it's called automatically for
all admin pages.

WP_Screen is explained a bit here:
https://codex.wordpress.org/Class_Reference/WP_Screen

 -Otto


On Sun, Mar 9, 2014 at 1:52 AM, Utkarsh Dixit <[hidden email]>wrote:

> Hi,
> Can someone explain the functionality of set_current_screen() function?
>
>
> http://codex.wordpress.org/Function_Reference/set_current_screen#Description
>
> Not explained properly here.
>
> Thanks.
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: set_current_screen() functionality

Frank Bueltge
As hint to understand the data inside the array can you use the plugin
https://github.com/bueltge/Debug-Objects
This plugin list all data of current screen in a tab.

Liebe Grüße
Frank



On Sun, Mar 9, 2014 at 10:12 AM, Otto <[hidden email]> wrote:

> Basically, the set_current_screen function gets an instance of the
> WP_Screen object and calls it to set the $current_screen global. It should
> not be something you have to call yourself, it's called automatically for
> all admin pages.
>
> WP_Screen is explained a bit here:
> https://codex.wordpress.org/Class_Reference/WP_Screen
>
>  -Otto
>
>
> On Sun, Mar 9, 2014 at 1:52 AM, Utkarsh Dixit <[hidden email]
> >wrote:
>
> > Hi,
> > Can someone explain the functionality of set_current_screen() function?
> >
> >
> >
> http://codex.wordpress.org/Function_Reference/set_current_screen#Description
> >
> > Not explained properly here.
> >
> > Thanks.
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email]
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers