Download the PHP package ekino/wordpress-bundle without Composer

On this page you can find all versions of the php package ekino/wordpress-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wordpress-bundle

EkinoWordpressBundle

Build Status SensioLabsInsight

This bundle is used to bring some Symfony services into Wordpress and manipulates Wordpress using Symfony.

Here are some features:


Installation

Idea of this installation tutorial is to have WordPress rendered by web root with the following architecture:

1) Install Symfony and WordPress

Install your Wordpress project in a wordpress directory by unzipping the latest WordPress sources from https://www.wordpress.org. Install Symfony using composer (for instance, or new Symfony Installer tool) in a symfony directory:

2) Install ekino/wordpress-bundle into Symfony's project

Edit symfony/composer.json file to add this bundle package:

Run php composer.phar update ekino/wordpress-bundle

Then, add the bundle into symfony/app/AppKernel.php:

Add the WordpressBundle routing file in your symfony/app/config/routing.yml, after your custom routes to catch all Wordpress routes:

Edit your configuration and specify the following options in your app/config.yml:

Also optionally, if you want to use UserHook to authenticate on Symfony, you should add this configuration to your symfony/app/security.yml:

3) Update your WordPress index.php file to load Symfony libraries

4) In the case you expose Symfony only

To avoid problem with some Wordpress plugin, you need to wrap web/app.php code inside a function like this:

5) Edit .htaccess file on your WordPress root project directory

Put the following rules:

You're ready to go.


Use in Symfony

You can call Wordpress table managers in Symfony by calling the following services:

Service identifier Type
ekino.wordpress.manager.comment Wordpress comment manager
ekino.wordpress.manager.comment_meta Wordpress comment metas manager
ekino.wordpress.manager.link Wordpress link manager
ekino.wordpress.manager.option Wordpress option manager
ekino.wordpress.manager.post Wordpress post manager
ekino.wordpress.manager.post_meta Wordpress post metas manager
ekino.wordpress.manager.term Wordpress term manager
ekino.wordpress.manager.term_relationships Wordpress term relationships manager
ekino.wordpress.manager.term_taxonomy Wordpress taxonomy manager
ekino.wordpress.manager.user Wordpress user manager
ekino.wordpress.manager.user_meta Wordpress user metas manager

So in custom Symfony controllers, you can create / update / delete data in Wordpress database, like that:


Use in WordPress

Call a service from Symfony container

Simply use the symfony() method and call your custom service like that:

Override

Entities

For every Wordpress entities, you can override the default classes. To do so, just add the following configuration in your config.yml (for Post entities):

In order to avoid further troubles when creating a new instance (for example), remember to always use the manager to create a new entity ($container->get('ekino.wordpress.manager.post')->create()).

Managers

You can use your own managers too. To customize it, register yours as services — should be marked as privates — as follow :

Your manager will now be reachable using the usual command, IE from a controller : $this->get('ekino.wordpress.manager.comment')

Repositories

Implementing your custom repository classes is as simple as follow :

Extra

Enable cross application I18n support

If you already have a wordpress plugin to handle I18n, EkinoWordpressBundle allow to persist language toggle between Symfony and wordpress. To do so, just grab the cookie name from the wordpress plugin used and provide its name in the configuration as follow :

Also, you can implement your own language switcher in Symfony that work cross application. For instance :

Handling password protected posts

If you use password protected posts and you have defined your own COOKIEHASH constant, you can provide it using the cookie_hash parameter in your config.yml file. You will then be able to use the wp_post_password_required twig function that behave exactly like post_password_required Wordpress function.

Display Wordpress theme into a Symfony Twig-rendered route

You can display the WordPress header (with administration menu bar if available), sidebar and footer into your Symfony's Twig templates by using the following Twig functions available in this bundle:


All versions of wordpress-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^5.4|^7.0
symfony/framework-bundle Version ^2.6|^3.0|^4.0
symfony/security-bundle Version ^2.6|^3.0|^4.0
symfony/monolog-bundle Version ^2.2|^3.0|^4.0
doctrine/doctrine-bundle Version ^1.0
doctrine/orm Version ^2.2
hautelook/phpass Version 0.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ekino/wordpress-bundle contains the following files

Loading the files please wait ....