├── app ├── .htaccess ├── config │ ├── parameters.yml.dist │ ├── config_prod.yml │ ├── routing.yml │ ├── routing_dev.yml │ ├── config.yml │ └── config_dev.yml ├── AppCache.php ├── autoload.php ├── console ├── AppKernel.php └── Resources │ └── views │ └── layout.html.twig ├── src ├── .htaccess └── Outlandish │ └── SiteBundle │ ├── Resources │ └── public │ │ └── css │ │ └── main.css │ ├── PostType │ ├── Post.php │ ├── Resource.php │ ├── Page.php │ ├── Role.php │ ├── News.php │ ├── Theme.php │ ├── Document.php │ ├── Place.php │ ├── Project.php │ ├── Event.php │ └── Person.php │ └── OutlandishSiteBundle.php ├── .gitignore ├── web ├── .htaccess ├── .gitignore ├── create-kernel.php ├── index.php └── wp-config-oi.php ├── README.md └── composer.json /app/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /src/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /src/Outlandish/SiteBundle/Resources/public/css/main.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/config/parameters.yml.dist: -------------------------------------------------------------------------------- 1 | parameters: 2 | secret: TeMpOrArYsEcReT 3 | -------------------------------------------------------------------------------- /app/config/config_prod.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | #framework: 5 | # validation: 6 | # cache: apc 7 | -------------------------------------------------------------------------------- /src/Outlandish/SiteBundle/PostType/Post.php: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteRule ^index\.php$ - [L] 4 | RewriteCond %{REQUEST_FILENAME} !-f 5 | RewriteCond %{REQUEST_FILENAME} !-d 6 | RewriteRule . index.php [L] 7 | 8 | 9 | # BEGIN WordPress 10 | 11 | # END WordPress 12 | -------------------------------------------------------------------------------- /src/Outlandish/SiteBundle/PostType/Document.php: -------------------------------------------------------------------------------- 1 | loadClassCache(); 20 | } 21 | 22 | return $kernel; -------------------------------------------------------------------------------- /web/index.php: -------------------------------------------------------------------------------- 1 | isDebug()); 15 | 16 | //set base for relative paths 17 | chdir(__DIR__ . '/..'); 18 | 19 | //create request object 20 | $request = Request::createFromGlobals(); 21 | 22 | //do most of the work 23 | $response = $kernel->handle($request); 24 | 25 | //send the response (but don't flush because of Hypercache) 26 | $response->sendHeaders(); 27 | $response->sendContent(); 28 | 29 | //do any further slow things (benefit is lost due to not flushing) 30 | $kernel->terminate($request, $response); 31 | -------------------------------------------------------------------------------- /app/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); 19 | $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; 20 | 21 | if ($debug) { 22 | Debug::enable(); 23 | } 24 | 25 | $kernel = new AppKernel($env, $debug); 26 | $application = new Application($kernel); 27 | $application->run($input); 28 | -------------------------------------------------------------------------------- /app/AppKernel.php: -------------------------------------------------------------------------------- 1 | getEnvironment(), array('dev', 'test'))) { 21 | $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 22 | } 23 | 24 | return $bundles; 25 | } 26 | 27 | public function registerContainerConfiguration(LoaderInterface $loader) 28 | { 29 | $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Symfony WordPress Edition 2 | ======================== 3 | 4 | Modified [Symfony Standard Edition](https://github.com/symfony/symfony-standard) for use with [WordPress](http://wordpress.org). 5 | 6 | Includes [RoutemasterBundle](https://github.com/outlandishideas/RoutemasterBundle) which provides some light glue between 7 | Symfony and WordPress and [OowpBundle](https://github.com/outlandishideas/OowpBundle) which provides object oriented 8 | wrappers around WP custom post types. 9 | 10 | ## Features 11 | 12 | * Build your front end using Symfony routes, controllers and views 13 | * Use WordPress's CMS interface on the back end 14 | * Use `WP_Query` in your controllers to fetch the content to display 15 | * Compatible with most existing WordPress plugins and Symfony bundles 16 | * Bridge Symfony and WordPress event systems on either front or back end 17 | 18 | ## Installation 19 | 20 | * Download ZIP archive and run `composer install` (assuming [Composer](http://getcomposer.org/download/) is installed globally). 21 | * Add DB details to `web/wp-config.php`. 22 | * Open the `web` folder in a browser and run the usual WordPress install. 23 | 24 | See [RoutemasterBundle](https://github.com/outlandishideas/RoutemasterBundle) for further usage instructions. -------------------------------------------------------------------------------- /web/wp-config-oi.php: -------------------------------------------------------------------------------- 1 | kWP<+Eh|Hd'); 42 | define('SECURE_AUTH_KEY', '}Q+kOzX$&M@_l%h.G '); 47 | define('LOGGED_IN_SALT', '||#uILO00gNH1HFL8DIu7$]we>MLLZ[CuJ$K*htr,H3c+Rki?dF+vj.H$|?Z[+}}'); 48 | define('NONCE_SALT', '$y?qE#7!<+A~-a[|&0slnil:&e:CRPi7t=5.3.3", 10 | "symfony/symfony": "~2.3", 11 | "sensio/distribution-bundle": "~2.3", 12 | "sensio/framework-extra-bundle": "~2.3", 13 | "incenteev/composer-parameter-handler": "~2.0", 14 | 15 | "outlandish/routemaster-bundle": "dev-master", 16 | "outlandish/oowp-bundle": "dev-master", 17 | "outlandish/acadoowp-bundle": "dev-master", 18 | "outlandish/symfony-bridge": "*", 19 | 20 | "wpackagist-plugin/advanced-custom-fields": "trunk", 21 | "wpackagist-plugin/cms-tree-page-view": "*", 22 | "wpackagist-plugin/database-sync": "@dev", 23 | "wpackagist-plugin/hyper-cache": "@dev", 24 | "wpackagist-plugin/posts-to-posts": "*", 25 | "wpackagist-plugin/regenerate-thumbnails": "*", 26 | "wpackagist-plugin/wordpress-importer": "*", 27 | "wpackagist-plugin/simple-page-ordering": "*" 28 | }, 29 | "scripts": { 30 | "post-install-cmd": [ 31 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 32 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 33 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 34 | "Outlandish\\RoutemasterBundle\\Composer\\WordPressInstaller::install" 35 | ], 36 | "post-update-cmd": [ 37 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 38 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 39 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 40 | "Outlandish\\RoutemasterBundle\\Composer\\WordPressInstaller::install" 41 | ] 42 | }, 43 | "extra": { 44 | "incenteev-parameters": { 45 | "file": "app/config/parameters.yml" 46 | }, 47 | "symfony-assets-install": "symlink", 48 | "installer-paths": { 49 | "web/wp-content/plugins/{$name}/": ["type:wordpress-plugin"] 50 | } 51 | }, 52 | "minimum-stability": "dev", 53 | "prefer-stable": true, 54 | "repositories": [ 55 | { 56 | "type": "composer", 57 | "url": "http://wpackagist.org" 58 | }, 59 | { 60 | "type": "vcs", 61 | "url": "https://github.com/outlandishideas/OowpBundle.git" 62 | }, 63 | { 64 | "type": "vcs", 65 | "url": "https://github.com/outlandishideas/symfony-bridge.git" 66 | }, 67 | { 68 | "type": "vcs", 69 | "url": "https://github.com/outlandishideas/AcadOowpBundle.git" 70 | } 71 | ] 72 | } 73 | -------------------------------------------------------------------------------- /app/Resources/views/layout.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {% block title %} {{ post.title() }}{% endblock %} 8 | {{ wp_head }} 9 | {% block stylesheets %} 10 | 11 | 12 | 13 | 14 | 15 | {% endblock %} 16 | {% block scripts_header %} 17 | 18 | 25 | {% endblock %} 26 | 27 | 28 | 29 | {% block nav_top %} 30 |
31 |
32 | 33 |
34 |
35 | {% if post.headerImage() %} 36 | 37 | 38 | 39 | {% endif %} 40 |
41 |
42 |

{{ post.headerText() }}

43 |
44 |
45 | 46 |
47 | {##} 48 | {##} 49 | {##} 50 | 51 | 52 | 53 | 54 |
55 |
56 |
57 |
58 | {% block nav_section %} 59 | 80 | {% endblock %} 81 |
82 |
83 |
84 | {% block filter_panel %} 85 | {{ render(controller('OutlandishAcadOowpBundle:Navigation:renderFilterPanel', {'currentPost': post })) }} 86 | {% endblock %} 87 | {% block breadcrumbs %} 88 | 99 | {% endblock %} 100 | 101 |
102 |
103 | {% endblock %} 104 | 105 | {% block main_content %} 106 |
107 |
108 | {% block content %}{% endblock %} 109 |
110 |
111 | {% endblock %} 112 | 113 | {% block carousel %} 114 | {{ render(controller('OutlandishAcadOowpBundle:Carousel:renderCarousel', {} )) }} 115 | {% endblock %} 116 | 117 | {{ wp_footer() }} 118 | {% block footer %} 119 |
120 | {{ render(controller('OutlandishAcadOowpBundle:Navigation:renderFooter')) }} 121 |
122 | {% endblock %} 123 | 124 | {#Empty div for checking if mobile view#} 125 |
 
126 | 127 | {% block scripts_footer %} 128 | 129 | 130 | 131 | 132 | 133 | 134 | {% endblock %} 135 | 136 | 139 | 145 | 146 | 147 | --------------------------------------------------------------------------------