themosis / plugin

Themosis framework plugin boilerplate.
54 stars 19 forks source link

Documentation and error #3

Closed pxpm closed 7 years ago

pxpm commented 7 years ago

Hi there. First of all, thanks for this great framework. I'm trying to create a plugin leveraging themosis features, but i'm actually stuck on a problem.

What i did?

1 - Downloaded the plugin boilerplate to htdocs/content/plugins/my-plugin 2 - Edited filename to match folder name. 3 - Edited the file changing header values. `/**

4- Edited when asked on that file eg: defined('MY_PLUGIN_TD') ? MY_PLUGIN_TD : define('MY_PLUGIN_TD', 'cb-auto'); $vars = [ 'slug' => 'cb-auto', 'name' => 'cb-auto', 'namespace' => 'cbauto', 'config' => 'cb_auto', ];

5 - Renamed config files to: cb-auto_loading.config.php `<?php

/**

`<?php

/**

I see the plugin on my dashboard, but when i try to activate it i got the following error:

`Unhandled Exception

Message:

Call to undefined function container() Location:

C:\xampp\htdocs\cbmanage\htdocs\content\plugins\cb-auto\cb-auto.php on line 81 Stack Trace:

0 C:\xampp\htdocs\cbmanage\htdocs\cms\wp-admin\includes\plugin.php(1882): include()

1 C:\xampp\htdocs\cbmanage\htdocs\cms\wp-admin\plugins.php(164): plugin_sandbox_scrape('cb-auto/cb-auto...')

2 {main}`

Maybe it's a newbie question, but if you can provide me some guidance i will be really happy.

Thanks in advance, Pedro

jlambe commented 7 years ago

Hi, the plugin boilerplate is only compatible with next release 1.3.0. Current stable version (1.2.3) do not handle it. Now that WordPress 4.7 is out, the themosis framework 1.3.0 release is coming in a few weeks (january 2017). A release date will be announced and full documentation on how to develop plugins with the framework is coming as well. Just be patient.

Or if you're starting from scratch or exploring, you can try the current master-branch of themosis/themosis repository to have a preview of the next release.

pxpm commented 7 years ago

Hi jlambe, Thanks for quick response. I'v allready setup a new environment with wp 4.7 and master-branch of themosis/themosis. I can now create and active the plugin. I will keep testing this feature. If you need some help on something, testing,debuggin or translations (I'm portuguese native) i would be glad to help. Cheers, Pedro