' . __('Settings', 'cache-images') . ''; $scaning_link = '' . __('Scanning', 'cache-images') . ''; $links = array_merge( array($settings_link, $scaning_link), $links); // before other links } return $links; } add_filter( 'plugin_action_links', 'cache_images_filter_plugin_actions', 10, 2 ); /** * Search a multiple array * @link http://www.php.net/manual/en/function.in-array.php#20594 */ function in_multi_array($needle, $haystack) { $in_multi_array = false; if(in_array($needle, $haystack)) { $in_multi_array = true; } else { for($i = 0; $i < sizeof($haystack); $i++) { if(is_array($haystack[$i])) { if(in_multi_array($needle, $haystack[$i])) { $in_multi_array = true; break; } } } } return $in_multi_array; } /** * Add Cache Images page under Tools */ function mm_ci_add_pages() { add_management_page( __( 'Cache Remote Images', 'cache-images' ), __( 'Cache Remote Images', 'cache-images' ), 8, __FILE__, 'mm_ci_manage_page' ); } function mm_ci_manage_page() { global $wpdb; ?>
<img src="http://example.com/picture.jpg" />), while button Scan (including linked) will search for images that are only linked from this site (ie. ised like in example <a href="http://example.com/picture.jpg">example</a>). Use second button with caution!', 'cache-images' ); ?>)