aaroneaton / better-yourls

Source code for the Better YOURLS WordPress plugin
21 stars 6 forks source link

wp_get_shortlink not producing a yourls link in my plugin. #2

Closed Benunc closed 9 years ago

Benunc commented 9 years ago

My plugin is https://github.com/Benunc/better-click-to-tweet

On line 44 of the main plugin php file (better-click-to-tweet.php) in trunk, I've called wp_get_shortlink(). Other plugins (I tested the WP bit.ly plugin at https://wordpress.org/plugins/wp-bitly/ ) work with my plugin, but Better YOURLS seems to not work.

My best guess after poring over the code is that the pre_get_shortlink() function in your plugin is somehow firing after my plugin has already built the shortcode that includes the wp_get_shortlink() call.

I don't know if the issue is on my plugin or yours, but since the WP bitly plugin works as expected, I thought I'd reach out to you.

jasgripen commented 9 years ago

This is probably related to the same issue I had. I corrected it and sent as a pull-request. https://github.com/ChrisWiegman/Better-YOURLS/pull/1

Benunc commented 9 years ago

Confirmed. This issue is fixed by that pull request. Closing.