This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Lowpress\WordpressBundle; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
class LowpressWordpressBundle extends Bundle | |
{ | |
public function boot() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Lowpress\WordpressBundle; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
class LowpressWordpressBundle extends Bundle | |
{ | |
public function boot() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*************** | |
* | |
* My Wordpress plugin | |
* | |
*********************/ | |
$myvar = "Hello"; | |
function show_my_var(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$kernel = new AppKernel('dev', true); | |
$kernel->loadClassCache(); | |
$response = $kernel->handle(Request::createFromGlobals()); | |
if ($response->getStatusCode() !== 404) | |
{ | |
$response->send(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$kernel = new AppKernel('dev', true); | |
$kernel->loadClassCache(); | |
$response = $kernel->handle(Request::createFromGlobals()); | |
if ($response->getStatusCode() !== 404) | |
{ | |
$response->send(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function render_wordpress_twig_template($kernel){ | |
global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID; | |
$template = false; | |
if (is_404()): throw $this->createNotFoundException('The product does not exist'); | |
elseif (is_search()): $template = 'LowpressWordpressBundle:Default:search.html.twig'; | |
elseif (is_tax()): $template = 'LowpressWordpressBundle:Default:taxonomy.html.twig'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Path { | |
(int) site_id; | |
(string) url; | |
} | |
class HtmlPage extends Path { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Path { | |
public $site_id; | |
public $url; | |
} | |
class HtmlPage extends Path { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HomePage extends HtmlPage { | |
public $banner_images; | |
public $left_column; | |
public $right_column; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php app/console generate:bundle --namespace=Lowpress/CmsBundle --format=yml |