Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7903297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:42:50+00:00 2026-06-03T09:42:50+00:00

When trying to activate my plugin, wordpress comes up with this error: Plugin could

  • 0

When trying to activate my plugin, wordpress comes up with this error:

Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected T_FUNCTION
on line 79

The line 79 is the first line of the snippet below, from looking into this I think it is because of a PHP version error, since I have no control over updating php, how would I make it compatible with earlier versions?

add_action('admin_menu', function(){
        Plugin_Options::add_menu_page();
    });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:42:52+00:00Added an answer on June 3, 2026 at 9:42 am

    Most likely, your PHP version is < 5.3. Anonymous functions were added to PHP in 5.3. In order to make use of this, you can pass the function as a callback string like:

    function add_menu_callback() {
      Plugin_Options::add_menu_page();
    }
    
    add_action('admin_menu', 'add_menu_callback');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to activate a self-made wordpress plugin but am getting a T_Variable error
I'm getting an error when trying to activate a webpart. It activates fine in
I'm trying to learn to write a WordPress plugin by setting myself a goal
I'm writing my first wordpress plugin and I'm trying to create a function to
I'm trying to include this Regex condition and activate the analytics code (if it
I've downloaded the Saxon jar from this site , and I'm trying to activate
I am trying to get the ckeip jquery plugin to parse the id of
I'm trying to install and activate ImageMagick with Zend Server (on Ubuntu Server Linux),
Trying to set RowHeight like this(in code): dgvTruckAvail.RowTemplate.Height = 48; Doesnt' work. I also
Trying to figure out how to do this. I have the style but I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.