Similar Posts
Finding file on unix
ByeminoSorry, this entry is only available in English. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language. find $directory -type f -name “*.ext”
Getting current screen (page) without $_GET[‘page’];
Byemino$get_current_page = str_replace(‘_page_’,”,strstr( current_filter(), ‘_page_’,false) ) ; // then you can do: <form method=”post” action=”<?php echo add_query_arg(array(‘page’ => $cph), admin_url().’admin.php’ )?>”>
Fastest way to get user ID in wordpress
ByeminoThere are various ways to get user_ID in WP. But which one is the fastest ? I’ve compared 3 ways function get_uid_from_global() { global $current_user; return $current_user->ID; } function get_uid_by_gcuid() { return get_current_user_id(); } function get_uid_by_wpgcu_id() { return wp_get_current_user()->ID; } Without a doubt, global method was fastest. With multiple 100,000 runs, global method took 0.9~…