• Resolved enhansum

    (@enhansum)


    Hello,

    I tried adding a code snippet plugin with the following code on my site. It did not work well so I deactivated the plugin and deleted it. But now there is always a message at the top of the home page which goes on to say /* Stop Adding Functions Below this Line */?> I cannot see the line that displays above this last line. The last line was a comment in the plugin file that I had uploaded as you will see below but that file has been removed.

    I am not sure why this is persisting. I have cleared all caches etc and the offending plugin is gone. I am using Chrome browser with Windows 8.

    <?php
    /*
    Plugin Name: ExtraFunctionality
    Description: Site specific code changes for enhansum.com
    */
    /**
     * Capture user login and add it as timestamp in user meta data
     *
     */
    /* Start Adding Functions Below this Line */
    function user_last_login( $user_login, $user ) {
        update_user_meta( $user->ID, 'last_login', time() );
    }
    add_action( 'wp_login', 'user_last_login', 10, 2 );
     
    /**
     * Display last login time
     *
     */
      
    function wpb_lastlogin() { 
        $last_login = get_the_author_meta('last_login');
        $the_login_date = human_time_diff($last_login);
        return $the_login_date; 
    } 
     
    /**
     * Add Shortcode lastlogin 
     *
     */
      
    add_shortcode('lastlogin','wpb_lastlogin');
    ?>   
       
    /* Stop Adding Functions Below this Line */
    ?>

    Regards, Faiz

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    Have you tried clearing al caches (browser, plugins, etc.) after deleting that plugin?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If you look at that you’ll see you have two ?> near the end. Delete the first one and all content thereafter. The file should end with the add_shortcode line.

    Thread Starter enhansum

    (@enhansum)

    Hello,

    Thank you for the suggestions. This issue has now been resolved. It did appear to be a caching problem because I cleared all caches (server and local) and then this message disappeared. Your responses are much appreciated.

    Regards,

    Faiz

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘‘Stop Adding functions below this Line’ message appears at the top of page’ is closed to new replies.