Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
<?php
$class = new MyClass();
class MyClass {
public function MyClass() {
add_action('init', array(&$this$this, 'core'));
}
public static function core() {
echo "I never get thistofar...";here";
}
}
?>
Try:
<?php
$class = new MyClass();
class MyClass {
public function MyClass() {
add_action('init', array(&$this, 'core'));
}
public static function core() {
echo "I never get thisfar...";
}
}
?>
Try:
<?php
$class = new MyClass();
class MyClass {
public function MyClass() {
add_action('init', array($this, 'core'));
}
public static function core() {
echo "I never get tohere";
}
}
?>
<?php
$class = new MyClass();
class MyClass {
public static function MyClass() {
add_action('init', array(&$this, 'core'));
}
public static function core() {
echo "I never get this far...";
}
}
?>
Try:
<?php
$class = new MyClass();
class MyClass {
public static function MyClass() {
add_action('init', array(&$this, 'core'));
}
public static function core() {
echo "I never get this far...";
}
}
?>
Try:
<?php
$class = new MyClass();
class MyClass {
public function MyClass() {
add_action('init', array(&$this, 'core'));
}
public static function core() {
echo "I never get this far...";
}
}
?>
<?php
$class = new MyClass();
class MyClass {
public static function MyClass() {
add_action('init', array(&$this, 'core'));
}
public static function core() {
echo "I never get this far...";
}
}
?>