Changeset 1339585
- Timestamp:
- 01/30/2016 11:06:17 AM (10 years ago)
- Location:
- wp2jekyll/trunk
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
inc/admin.php (modified) (6 diffs)
-
inc/hooks.php (modified) (2 diffs)
-
readme.txt (modified) (8 diffs)
-
wordpress2jekyll.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp2jekyll/trunk
- Property svn:mergeinfo changed
/wp2jekyll/branches/0.3 merged: 1339416,1339578,1339583 /wp2jekyll/tags/0.3 (added) merged: 1339584
- Property svn:mergeinfo changed
-
wp2jekyll/trunk/inc/admin.php
r1339383 r1339585 12 12 function wordpress2jekyll_admin_menu( ) { 13 13 14 add_options_page('Word press2Jekyll', 'Wordpress2Jekyll', 'manage_options', 'wordpress2jekyll', 'wordpress2jekyll_options_page');14 add_options_page('WordPress2Jekyll', 'WordPress2Jekyll', 'manage_options', 'wordpress2jekyll', 'wordpress2jekyll_options_page'); 15 15 16 16 add_submenu_page('tools.php', 'Build', 'Jekyll', 'administrator', 'wordpress2jekyll-build', 'wordpress2jekyll_build_page', 'dashicons-migrate'); … … 338 338 function wordpress2jekyll_verify_jekyll_path($value) 339 339 { 340 $value = trim($value); 341 342 if(empty($value)) 343 { 344 add_settings_error( 345 'jekyll_path', 346 esc_attr( 'settings_updated' ), 347 'The Jekyll path can not be empty', 348 'error' 349 ); 350 351 return false; 352 } 353 340 354 $jekyll = new \jekyll(); 341 355 … … 366 380 function wordpress2jekyll_verify_assets_directory($value) 367 381 { 382 $value = trim($value); 383 384 if(empty($value)) 385 { 386 add_settings_error( 387 'jekyll_assets_directory', 388 esc_attr( 'settings_updated' ), 389 'The assets directory can not be empty', 390 'error' 391 ); 392 393 return false; 394 } 395 368 396 $jekyll = new \jekyll(); 369 397 … … 399 427 function wordpress2jekyll_verify_data_directory($value) 400 428 { 429 $value = trim($value); 430 431 if(empty($value)) 432 { 433 add_settings_error( 434 'jekyll_data_directory', 435 esc_attr( 'settings_updated' ), 436 'The data directory can not be empty', 437 'error' 438 ); 439 440 return false; 441 } 442 401 443 $jekyll = new \jekyll(); 402 444 … … 432 474 function wordpress2jekyll_verify_posts_directory($value) 433 475 { 476 $value = trim($value); 477 478 if(empty($value)) 479 { 480 add_settings_error( 481 'jekyll_posts_directory', 482 esc_attr( 'settings_updated' ), 483 'The posts directory can not be empty', 484 'error' 485 ); 486 487 return false; 488 } 489 434 490 $jekyll = new \jekyll(); 435 491 … … 493 549 ?> 494 550 <div class="wrap"> 495 <h2><?php _e('Word press2Jekyll Build', 'wordpress2jekyll') ?></h2>551 <h2><?php _e('WordPress2Jekyll Build', 'wordpress2jekyll') ?></h2> 496 552 497 553 <form method="post" action="admin.php?page=wordpress2jekyll-build"> 498 <p>Export all Word press posts and authors in to the Jekyll directory.</p>554 <p>Export all WordPress posts and authors in to the Jekyll directory.</p> 499 555 500 556 <?php submit_button('Export', 'primary', 'export'); ?> -
wp2jekyll/trunk/inc/hooks.php
r1339383 r1339585 6 6 } 7 7 8 register_activation_hook(__FILE__, 'wordpress2jekyll_activate');9 8 add_action('save_post', 'wordpress2jekyll_write_post'); 10 9 add_action('post_updated', 'wordpress2jekyll_update_post', 10, 3); … … 17 16 18 17 add_action('edit_terms', 'wordpress2jekyll_taxonomy_update', 10, 2); 19 20 function wordpress2jekyll_activate()21 {22 update_option('jekyll_path', '../_jekyll');23 update_option('jekyll_posts_directory', '_posts');24 update_option('jekyll_assets_directory', '_assets');25 update_option('jekyll_data_directory', '_data');26 update_option('jekyll_enable_auto_build', 1);27 update_option('jekyll_save_pages', 1);28 update_option('jekyll_use_wordpress_permalinks', 1);29 update_option('jekyll_wordpress_preprocess_content',1);30 update_option('jekyll_export_post_meta', 0);31 update_option('jekyll_export_users', 0);32 update_option('jekyll_export_taxonomies', 0);33 update_option('jekyll_taxonomies', array());34 }35 18 36 19 function wordpress2jekll_save_post($post_id) -
wp2jekyll/trunk/readme.txt
r1339409 r1339585 1 === Word press2Jekyll ===1 === WordPress2Jekyll === 2 2 Contributors: liam_bowers 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A5BPK7XBH54UY 4 Tags: jekyll, export, flat, blog 4 Tags: jekyll, export, flat, blog, github, yaml 5 5 Requires at least: 4.3 6 6 Tested up to: 4.4.1 … … 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 11 This allows you to use Word press as an interface to Jekyll. It will save posts, taxonomies and author information out in a Jekyll friendly format.11 This allows you to use WordPress as an interface to Jekyll. It will save posts, taxonomies and author information out in a Jekyll friendly format. 12 12 13 13 == Description == … … 15 15 Jekyll is a great tool that will build a full blog site using text files written in a specific format. It gives you the bonus of having a very light and quick site that can't be hacked through script vulnerabilities. The downside of this is that it's not always easy to edit. It's harder still when using a mobile device. 16 16 17 This is where Word press comes in. Wordpress can be used to modify the posts (both standard posts and pages) and these changes will automatically be exported. The same applies for taxonomies and users if desired. This means that it is possible to edit content using a mobile device and the Wordpress app.17 This is where WordPress comes in. WordPress can be used to modify the posts (both standard posts and pages) and these changes will automatically be exported. The same applies for taxonomies and users if desired. This means that it is possible to edit content using a mobile device and the WordPress app. 18 18 19 Word press2Jekyll attempts to marry these two systems together in order to make a quick, secure website that can be easily managed from all devices.19 WordPress2Jekyll attempts to marry these two systems together in order to make a quick, secure website that can be easily managed from all devices. 20 20 21 21 = What can it do? = … … 24 24 * Converts page content to Markdown format (assumes it is HTML). 25 25 * Has option to use the Wordpress Permalinks patterns rather than using the configured Jekyll method. 26 * Ability to allow Word press to run content through the_content filter to allow plugins to interact with the body content.26 * Ability to allow WordPress to run content through the_content filter to allow plugins to interact with the body content. 27 27 * Automatically builds individual pages (or full build) depending on what has changed in the post. 28 28 * Configurable assets, data and posts directories. … … 38 38 1. Upload the plugin files to the `/wp-content/plugins/wp2jekyll` directory, or install the plugin through the WordPress plugins screen directly. 39 39 1. Activate the plugin through the 'Plugins' screen in WordPress. 40 1. Use the Settings->Word press2Jekyll screen to configure the plugin. This Jekyll path must point to an existing Jekyll site directory. If you're using it for testing purposes then make sure the assets, data and posts directories exist. It will complain if it doesn't find them.40 1. Use the Settings->WordPress2Jekyll screen to configure the plugin. This Jekyll path must point to an existing Jekyll site directory. If you're using it for testing purposes then make sure the assets, data and posts directories exist. It will complain if it doesn't find them. 41 41 1. Use Tools->Jekyll to perform a full export of the current content as defined in the settings. 42 42 … … 70 70 == Changelog == 71 71 72 = 0.3 = 73 74 * Fixed issue relating to the default settings not being set correctly after plugin activation or upgrade. 75 * Fixed an issue regarding the check for Jekyll returning a false positive. 76 77 = 0.2.1 = 78 79 Fixing versioning issue. 80 72 81 = 0.2 = 73 82 … … 88 97 == Limitations == 89 98 90 * This plugin assumes that all Jekyll posts are stored in Word press and any files in the posts directory can be deleted. This is a necessary for maintenance.99 * This plugin assumes that all Jekyll posts are stored in WordPress and any files in the posts directory can be deleted. This is a necessary for maintenance. 91 100 * Featured images will be exported and linked accordingly. 92 101 * Doesn't support password protected posts at this time (I'm not sure if it ever will). … … 94 103 * Supports categories (exported in order) 95 104 * Supports tags (exported in order) 96 * Ideally the Word press installation should be hidden away and not publicly accessible. I'm working on a separate plugin to do this easily.105 * Ideally the WordPress installation should be hidden away and not publicly accessible. I'm working on a separate plugin to do this easily. 97 106 98 107 == Wishlist == -
wp2jekyll/trunk/wordpress2jekyll.php
r1339409 r1339585 1 1 <?php 2 2 /* 3 Plugin Name: Word press2Jekyll3 Plugin Name: WordPress2Jekyll 4 4 Plugin URI: https://wordpress.org/plugins/wp2jekyll/ 5 5 Description: This allows you to use WordPress as an interface to Jekyll. It will save posts, taxonomies and author information out in a Jekyll friendly format. 6 Version: 0. 2.16 Version: 0.3 7 7 Author: Liam Bowers 8 8 Author URI: http://liam.pw … … 12 12 if ( ! defined( 'WPINC' ) ){ 13 13 die; 14 } 15 16 //Activation hook 17 18 register_activation_hook(__FILE__, 'wordpress2jekyll_activate'); 19 20 function wordpress2jekyll_activate() 21 { 22 update_option('jekyll_path', '../_jekyll'); 23 update_option('jekyll_posts_directory', '_posts'); 24 update_option('jekyll_assets_directory', '_assets'); 25 update_option('jekyll_data_directory', '_data'); 26 update_option('jekyll_enable_auto_build', 0); 27 update_option('jekyll_save_pages', 0); 28 update_option('jekyll_use_wordpress_permalinks', 1); 29 update_option('jekyll_wordpress_preprocess_content',1); 30 update_option('jekyll_export_post_meta', 0); 31 update_option('jekyll_export_users', 0); 32 update_option('jekyll_export_taxonomies', 0); 33 update_option('jekyll_taxonomies', array()); 14 34 } 15 35 … … 26 46 echo wp_kses_post( __( '<b>Wordpress2Jekyll</b> requires PHP 5.3 or higher, and the plugin has now disabled itself.', 'wordpress2jekyll' ) ) . 27 47 '<br />' . 28 esc_attr__( 'To allow better control over dates, advanced security improvements and performance gain.', 'wordpress2jekyll' ) .29 '<br />' .30 48 esc_attr__( 'Contact your Hosting or your system administrator and ask for this Upgrade to version 5.3 of PHP.', 'wordpress2jekyll' ); 31 49 exit();
Note: See TracChangeset
for help on using the changeset viewer.