Skip to content

Commit

Permalink
implement wpcs suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Oct 30, 2016
1 parent 58cdaca commit 02e96f4
Show file tree
Hide file tree
Showing 4 changed files with 756 additions and 607 deletions.
31 changes: 19 additions & 12 deletions jekyll-export-cli.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
<?php
/*
/**
* Run the exporter from the command line and spit the zipfile to STDOUT.
*
* Usage:
*
* $ php jekyll-export-cli.php > my-jekyll-files.zip
*
* Must be run in the wordpress-to-jekyll-exporter/ directory.
*
* @package JekyllExporter
* @author Ben Balter <ben.balter@github.com>
* @copyright 2013-2016 Ben Balter
* @license GPLv3
* @link https://github.com/benbalter/wordpress-to-jekyll-exporter/
*/

include "../../../wp-load.php";
include "../../../wp-admin/includes/file.php";
require_once "jekyll-exporter.php"; //ensure plugin is "activated"
include '../../../wp-load.php';
include '../../../wp-admin/includes/file.php';
require_once 'jekyll-exporter.php'; // Ensure plugin is "activated".

if (php_sapi_name() != 'cli')
wp_die("Jekyll export must be run via the command line or administrative dashboard.");
if ( php_sapi_name() != 'cli' ) {
wp_die( 'Jekyll export must be run via the command line or administrative dashboard.' );
}

/**
* Usage:
*
* $ php jekyll-export-cli.php > my-jekyll-files.zip
*
* Must be run in the wordpress-to-jekyll-exporter/ directory.
*/
$jekyll_export = new Jekyll_Export();
$jekyll_export->export();
Loading

0 comments on commit 02e96f4

Please sign in to comment.