upload_url_path and upload_path are empty
-
Hello. Thanks for the code. I don’t know if you’re still maintaining the plugin, but if you are, you might want to take a look at the
getSettings()
function. The 2 options you check here default to ” for a fresh install. So in order to keep using your plugin I had to modify it so ‘uploads’ defaults to the standard path if those options are empty.public static function getSettings() { $blogurl_settings = blogurlShortcodes::userSettings(); // It's best not to touch this if / else statement if( '' != get_option( 'upload_url_path' ) ) { // This is set in Settings > Miscellaneous > Full URL path to files $blogurl_settings['uploads'] = get_option( 'upload_url_path' ); } else if( '' != get_option( 'upload_path' ) ) { $blogurl_settings['uploads'] = $blogurl_settings['wordpress'] . '/' . get_option( 'upload_path' ); } else $blogurl_settings['uploads'] = $blogurl_settings['wordpress'] . '/wp-content/uploads'; // To define your own upload URL path (for [blogurl uploads], comment out the line below // $blogurl_settings['uploads'] = 'https://yoursite.com/wp-content/uploads'; return $blogurl_settings; } }
https://www.ads-software.com/extend/plugins/peters-blog-url-shortcodes/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘upload_url_path and upload_path are empty’ is closed to new replies.