Skip to content

Commit 237073f

Browse files
committed
Shortcodes: don't use PHP 5.3 get_called_class
1 parent 86537af commit 237073f

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎modules/shortcodes/quiz.php‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,11 @@ class Quiz_Shortcode {
6565
* @since 4.5.0
6666
*/
6767
public static function init() {
68-
$obj = get_called_class();
69-
70-
add_shortcode( 'quiz', array( $obj, 'shortcode' ) );
71-
add_shortcode( 'question', array( $obj, 'question_shortcode' ) );
72-
add_shortcode( 'answer', array( $obj, 'answer_shortcode' ) );
73-
add_shortcode( 'wrong', array( $obj, 'wrong_shortcode' ) );
74-
add_shortcode( 'explanation', array( $obj, 'explanation_shortcode' ) );
68+
add_shortcode( 'quiz', array( __CLASS__, 'shortcode' ) );
69+
add_shortcode( 'question', array( __CLASS__, 'question_shortcode' ) );
70+
add_shortcode( 'answer', array( __CLASS__, 'answer_shortcode' ) );
71+
add_shortcode( 'wrong', array( __CLASS__, 'wrong_shortcode' ) );
72+
add_shortcode( 'explanation', array( __CLASS__, 'explanation_shortcode' ) );
7573
}
7674

7775
/**

0 commit comments

Comments
 (0)