Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Fabbstar

    (@fabbstar)

    Hi Michael,

    Don’t worry about replying, I added a function to the theme which stops anyone calling a url with text “?action=cfdb-export”.

    Thanks,
    S

    Plugin Author Michael Simpson

    (@msimpson)

    Interesting. If you don’t mind, please post the function.

    Thread Starter Fabbstar

    (@fabbstar)

    Hi Michael,

    No probs, I used it as part of an existing function which prevents non-admins going to their dashboard:

    add_action( ‘admin_init’, ‘redirect_non_admin_users’ );
    /**
    * Redirect non-admin users to home page
    *
    * This function is attached to the ‘admin_init’ action hook.
    */
    function redirect_non_admin_users() {
    if ( ! current_user_can( ‘manage_options’ ) && ‘/wp-admin/admin-ajax.php’ && ‘/wp-admin/admin-ajax.php?action=cfdb-export’ != $_SERVER[‘PHP_SELF’] ) {
    wp_redirect( home_url() );
    exit;
    }
    }

    Plugin Author Michael Simpson

    (@msimpson)

    Interesting. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Export Function’ is closed to new replies.