Finding file on unix
find $directory -type f -name “*.ext”
View the code on Gist.
There 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~…
$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’ )?>”>