Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Wordpress url extract
- $wp_root_path = str_replace('/wp-content/themes', '', get_theme_root_uri());
- // uploads file file extract
- <?php
- $a = str_replace('/themes', '', get_theme_root_uri().'/uploads/'.date('Y/'));
- $wp_root_path = str_replace($a, '', wp_get_attachment_url($id));
- $f = substr($wp_root_path,3);
- echo $f.'<br/>'; // http://xparagon.com/wp-content/uploads/2017/04/ has been removed
- ?>
Add Comment
Please, Sign In to add comment