voceconnect / multi-post-thumbnails

Adds multiple post thumbnails to a post type. If you've ever wanted more than one Featured Image on a post, this plugin is for you.
143 stars 63 forks source link

Update multi-post-thumbnails.php #16

Closed svperfecta closed 8 years ago

svperfecta commented 10 years ago

Hi Team -

For various deployment reasons, we're required to have an approved set of plugins and symlink them into our WP directory. There's a bug in the plugin that forces it to resolve the directory of the symlinked plugin, rather than the wp content directory. This fixes it.

For reference, here's what the generated links looked like before:

http://localhost/~brian/firebird-wordpress/wp/wp-content/plugins/Users/brian/code/wbie/firebird-wordpress/wp-content/plugins/multiple-post-thumbnails/js/media-modal.js?ver=3.6.1

And here's after:

http://localhost/~brian/firebird-wordpress/wp/wp-content/plugins/multiple-post-thumbnails/js/media-modal.js?ver=3.6.1

Also note, there might be a better way to do this, I'm not WP pro :)

svperfecta commented 10 years ago

Note: This is what I found related to this in the WP docs:

http://codex.wordpress.org/Determining_Plugin_and_Content_Directories Related to the above, it's also important to note that PHP's FILE magic-constant resolves symlinks automatically, so if the wp-content or wp-content/plugins or even the individual plugin directory is symlinked, this function will not work right.

lkraav commented 10 years ago

Symlinking and plugins is a bigger issue. Are you cc-d on https://core.trac.wordpress.org/ticket/16953

Maybe you will find a more immediate solution there.

svperfecta commented 10 years ago

I'm definitely not! This is interesting (amazing its been in progress for four years?!) Seems like my solution is a fine patch for now until 3.8?

chrisscott commented 8 years ago

Closing due to age. Please re-open if needed.