library/Theme/Share.php
public function redirectFromShortlink()
    {

        //Check if is admin
        if(is_admin()) {
            return; 
        }

        //Get the post id
        $postId = get_query_var('socialShareId', null); 

        //Do redirect
        if(!is_null($postId) && is_numeric($postId)) {
            wp_safe_redirect(get_permalink($postId), 301);
            exit; 
        }
    }
public function redirectFromShortlink()
    {

        //Check if is admin
        if(is_admin()) {
            return; 
        }

        //Get the post id
        $postId = get_query_var('socialShareId', null); 

        //Do redirect
        if(!is_null($postId) && is_numeric($postId)) {
            wp_safe_redirect(get_permalink($postId), 301);
            exit; 
        }
    }
public function redirectFromShortlink ( ) { //Check if is admin if ( is_admin ( ) ) { return ; } //Get the post id $ postId = get_query_var ( 'socialShareId' , null ) ; //Do redirect if ( ! is_null ( $ postId ) && is_numeric ( $ postId ) ) { wp_safe_redirect ( get_permalink ( $ postId ) , 301 ) ; exit ; } }
Make a redirect to the actiual page
@return void
Make a redirect to the actiual page