Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can i use this for wordpress plugin development #101

Closed
hamedmoody opened this issue Mar 21, 2016 · 2 comments
Closed

Can i use this for wordpress plugin development #101

hamedmoody opened this issue Mar 21, 2016 · 2 comments
Labels

Comments

@hamedmoody
Copy link

hi
your package is great.
but can i write a wordpress plugin and use Corcel in my plugin?
Thanks

@jgrossi
Copy link
Member

jgrossi commented Mar 21, 2016

Hi @hamedmoody! You can but I don't suggest that. It's better for you to use composer inside your Wordpress project. For example, you can put all WP files in public folder and in the project root you install composer.

So you will have something like vendor folder and public folder (with WP files). So inside your functions.php (theme file) you include the vendor/autoload.php file and so you can use any composer package inside your WP environment. Just add jgrossi/corcel in composer and call the classes you want ;-)

This is better because you can use other libraries (not only Corcel) inside Wordpress and make your project more secure and with a lot of functionalities you can find as composer package.

Any question just ask.

@jgrossi
Copy link
Member

jgrossi commented Mar 21, 2016

You can create a Wordpress plugin that only include vendor/autoload.php file. This will be your plugin ;-)

The main goal of Corcel is to allow you to use a custom framework with Wordpress, using for example, Slim Framework, Silex, Symfony, Zend, Laravel, other framework here, and just get WP data from database.

But you can use it the way you want :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants