• Resolved email889

    (@email889)


    Hi, just checking,

    when I create custom PHP codes do i need to use “if ( ! defined( ‘ABSPATH’ ) ) exit;” ?

    Thank you for nice plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wassereimer

    (@wassereimer)

    Hi,

    no, you don′t need to use “if ( ! defined( ‘ABSPATH’ ) ) exit;”. And dont forget the opening and closing tags (<?php / ?>). If you use the snippet you could have problems with ur site because the code is not in a file and it cannot be called from outsite of WordPress because it′s in the database.

    – wassereimer

    Thread Starter email889

    (@email889)

    Thank you for the tips.

    Just worry about security issues.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘exit if direct access’ is closed to new replies.