$message=sprintf(__('Please visit the <a href="%1$s">Permalinks</a> settings page to refresh your permalinks. Doing so will add the rules this plugin requires.','eth_simple_shortlinks'),admin_url('options-permalink.php'));
$message=sprintf(
/* translators: 1: URL of permalink options page. */
__(
'Please visit the <a href="%1$s">Permalinks</a> settings page to refresh your permalinks. Doing so will add the rules this plugin requires.',
'eth_simple_shortlinks'
),
admin_url('options-permalink.php')
);
}
}else{
$message=sprintf(__('Please enable <a href="%1$s">pretty permalinks</a>, otherwise disable this plugin as it is not compatible with "Plain" permalinks.','eth_simple_shortlinks'),admin_url('options-permalink.php'));
$message=sprintf(
/* translators: 1: URL of permalink options page. */
__(
'Please enable <a href="%1$s">pretty permalinks</a>, otherwise disable this plugin as it is not compatible with "Plain" permalinks.',
// Use Core's default when this plugin can't build a link
// Use Core's default when this plugin can't build a link.
if(!$this->plugin_supported){
returnwp_get_shortlink($post_id);
}
...
...
@@ -286,11 +413,24 @@ class ETH_Simple_Shortlinks {
ETH_Simple_Shortlinks::get_instance();
/**
* Shortcut for using the shortlink outside of this plugin's considerations
* Shortcut for using the shortlink outside of this plugin's considerations.
*
* @param int $post_id Post ID.
* @return string
*/
functioneth_simple_shortlinks_get($post_id){
if(!did_action('wp_loaded')){
_doing_it_wrong(__FUNCTION__,__('Shortlinks cannot be generated until after <code>wp_loaded</code>; this ensures that all post types are registered.','eth_simple_shortlinks'),'0.3');
_doing_it_wrong(
__FUNCTION__,
wp_kses_post(
__(
'Shortlinks cannot be generated until after <code>wp_loaded</code>; this ensures that all post types are registered.',