wordpress - Can I do $pagenow on query pages like admin.php?page=example? -
i'm working with...
global $pagenow; if(in_array($pagenow, array('example1.php','example2.php'))) {}
in wordpress works fine enqueuing admin scripts on needed admin pages.
is there way apply same concept query pages?
example:
global $pagenow; if(in_array($pagenow, array('example1.php?page=example1','example2.php?page=example1'))) {}
there plugins trying make load more efficiently in set use page query pages , above code doesn't work.
i'm not finding online this.
you can this:
if ( isset($_get['page']) ) { global $pagenow; if( in_array( $pagenow, array('example1.php','example2.php') ) && ( $_get['page'] == 'example1' || $_get['page'] == 'example1' ) ) {} }
Comments
Post a Comment