WordPress.org

Ready to get started?Download WordPress

Forums

GCal Events List
Cannot redeclare add_styles() (2 posts)

  1. bjornsennbrink
    Member
    Posted 3 years ago #

    Upon activation I received the following error:

    Could not activate since the plugin caused a fatal error

    Fatal error: Cannot redeclare add_styles() (previously declared in /domain.tld/public_html/wp-content/plugins/easing-slider/easingslider.php:98) in /domain.tld/public_html/wp-content/plugins/gcal-events-list/gcal_events_list.php on line 197

    So it seems like this plugin does not work very well alongside the Easing Slider plugin =)

  2. veleno
    Member
    Plugin Author

    Posted 3 years ago #

    maybe I have found the problem. gcal_events_list makes use of a function named add_styles(). This function registers a style sheet.
    easingslider makes use of a similar function with the same name. I will fix this asap. In the meanwhile you can rename the function in gcal_events_list.php on line 29 and line 190.

    This is the original code:

    029. add_action('wp_print_styles', 'add_styles');
    ...
    190. function add_styles() {...}

    Try this code (not tested):

    029. add_action('wp_print_styles', 'add_gcel_styles');
    ...
    190. function add_gcel_styles() {...}

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic