Skip to content
Snippets Groups Projects
Commit f4818f69 authored by Erick Hitter's avatar Erick Hitter
Browse files

Don't show on post status' that have no need for shortlinks

parent 68628e08
No related branches found
No related tags found
No related merge requests found
...@@ -123,6 +123,10 @@ class ETH_Simple_Shortlinks { ...@@ -123,6 +123,10 @@ class ETH_Simple_Shortlinks {
return $shortlink; return $shortlink;
} }
if ( ! in_array( get_post_status( $id ), array( 'publish', 'future' ) ) ) {
return $shortlink;
}
return user_trailingslashit( home_url( sprintf( '%s/%d', $this->slug, $id ) ) ); return user_trailingslashit( home_url( sprintf( '%s/%d', $this->slug, $id ) ) );
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment