add_action with a class method is causing fatal errors

Try:

<?php
$class = new MyClass();

class MyClass {
    public function MyClass() {
       add_action('init', array($this, 'core'));
    }
    public static function core() {
        echo "I never get to here";
    }
}
?>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)