Skip to content

Commit

Permalink
Don't call PHP magic class functions statically
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidWells committed Sep 4, 2014
1 parent 722ca5e commit 27fc769
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/cta/classes/class.menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

class CTA_Menus {

public static function __construct() {
public function __construct() {
self::load_hooks();
}

public static function load_hooks() {
add_action('admin_menu', array( __CLASS__ , 'add_sub_menus' ) );
}

public static function add_sub_menus() {
if ( !current_user_can('manage_options')) {
return;
}

add_submenu_page('edit.php?post_type=wp-call-to-action', __( 'Forms' , 'cta' ), __( 'Manage Forms' , 'cta' ) , 'manage_options', 'inbound-forms-redirect',100);

add_submenu_page('edit.php?post_type=wp-call-to-action', __( 'Templates' , 'cta' ) , __( 'Manage Templates' , 'cta' ) , 'manage_options', 'wp_cta_manage_templates','wp_cta_manage_templates',100);
Expand All @@ -24,7 +24,7 @@ public static function add_sub_menus() {
/* Add settings page for frontend editor */
add_submenu_page('edit.php?post_type=wp-call-to-action', __( 'Editor' , 'cta' ), __( 'Editor' , 'cta' ) , 'manage_options', 'wp-cta-frontend-editor', 'wp_cta_frontend_editor_screen');
}

}

$CTA_Menus = new CTA_Menus();

0 comments on commit 27fc769

Please sign in to comment.