A bug in the theme (with my proposed fix)

  • Resolved
    Posted in: Aegaeus WP Theme  
  • Customer
    dsent
    March 31, 2014 at 6:17 am #1461

    I’ve encountered a problem installing Aegaeus WP theme with NextScripts SNAP plugin enabled (blank screen, even admin page stops working immediately on your theme activation).

    Looking into PHP error log I’ve found this:
    PHP Fatal error: Cannot redeclare toolbar_link_to_mypage() (previously declared in <not relevant>/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_functions_adv.php:114) in <not relevant>/wp-content/themes/AegaeusWP/functions.php on line 409

    So I figured you use a function from WordPress tutorial with unchanged name and so are the NextScripts’ developers. And they conflict.

    The solution is simple: change lines 399-400 of functions.php to read like this:
    add_action( ‘admin_bar_menu’, ‘toolbar_link_to_mypage_awp’, 140 );
    function toolbar_link_to_mypage_awp( $wp_admin_bar ) {

    Note the “_awp” suffix “personalizing” your function name.

    With this change everything works. Please fix this problem in the next release of your theme so everyone will benefit from increased compatibility. Thanks!

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.