Changeset 718549
- Timestamp:
- 05/26/2013 08:29:11 PM (13 years ago)
- Location:
- article-forge/trunk
- Files:
-
- 1 added
- 8 edited
-
ArticleForge.php (modified) (1 diff)
-
ArticleForge/Admin/Settings.php (modified) (3 diffs)
-
ArticleForge/Constants.php (modified) (1 diff)
-
ArticleForge/Content/ActionMap.php (modified) (1 diff)
-
ArticleForge/Options.php (modified) (1 diff)
-
content/default/home-summary.php (added)
-
functions.php (modified) (2 diffs)
-
main.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
article-forge/trunk/ArticleForge.php
r718377 r718549 222 222 remove_filter('template_redirect', 'redirect_canonical'); 223 223 } 224 return $wp_query->is_404(); 224 return !$wp_query->is_404(); 225 } 226 227 public function home($wp_query) { 228 if ( $this->options->show_on_home == 'true' ) { 229 $wp_query->set('post_type', af_namespace() . '_' . ArticleForge\Constants::SummaryPostType); 230 //$wp_query->is_post_type_archive = true; 231 //$wp_query->is_archive = true; 232 } 225 233 } 226 234 -
article-forge/trunk/ArticleForge/Admin/Settings.php
r718381 r718549 104 104 'args' => array() 105 105 ), 106 array( 107 'name' => 'show_on_home', 108 'title' => __( 'Home page', 'articleforge' ), 109 'callback' => array( $this, 'show_on_home_field' ), 110 'sanitize_callback' => array( ), 111 'args' => array() 112 ), 106 113 ) // fields 107 114 ), // theme section … … 270 277 $options['prefix_list_slug'] = $options['prefix_list_slug'] == 'true' ? 'true' : 'false'; 271 278 $options['enable_revisions'] = $options['enable_revisions'] == 'true' ? 'true' : 'false'; 279 $options['show_on_home'] = $options['show_on_home'] == 'true' ? 'true' : 'false'; 272 280 273 281 // report errors … … 363 371 ?> 364 372 365 <input name="<?php echo af_namespace(); ?>_options[enable_revisions]" type="checkbox" id="_<?php echo af_namespace(); ?>_enable_revisions" value="true" <?php echo $this->options->prefix_list_slug == 'true' ? 'checked="checked"' : '' ?>/><label for="_<?php echo af_namespace(); ?>_enable_revisions"> Enable revisions for Article Summaries and Content</label> 373 <input name="<?php echo af_namespace(); ?>_options[enable_revisions]" type="checkbox" id="_<?php echo af_namespace(); ?>_enable_revisions" value="true" <?php echo $this->options->enable_revisions == 'true' ? 'checked="checked"' : '' ?>/><label for="_<?php echo af_namespace(); ?>_enable_revisions"> Enable revisions for Article Summaries and Content</label> 374 375 <?php 376 } 377 378 public function show_on_home_field() { 379 ?> 380 381 <input name="<?php echo af_namespace(); ?>_options[show_on_home]" type="checkbox" id="_<?php echo af_namespace(); ?>_show_on_home" value="true" <?php echo $this->options->show_on_home == 'true' ? 'checked="checked"' : '' ?>/><label for="_<?php echo af_namespace(); ?>_show_on_home"> Display Articles on home page</label> 366 382 367 383 <?php -
article-forge/trunk/ArticleForge/Constants.php
r718381 r718549 6 6 const PackageName = 'Article Forge'; 7 7 8 const Version = '1.0. 1';8 const Version = '1.0.2'; 9 9 10 10 const PackagePrefix = 'articleforge'; -
article-forge/trunk/ArticleForge/Content/ActionMap.php
r718377 r718549 40 40 41 41 if (!articleforge()->validate_request($wp_query)) return; 42 // global $wp_query; 43 // articleforge_debug('pgp', $query); 44 // $wp_query->set_404(); 45 42 if ( is_home() ) articleforge()->home($wp_query); 46 43 // (bool)$query->get('is_archive') 47 44 if ( is_post_type_archive() && is_post_type_namespace(af_namespace())) { -
article-forge/trunk/ArticleForge/Options.php
r718377 r718549 39 39 //'[allow]_nested/heirarchical_comments', 40 40 'summaries_per_page' => 5, 41 'enable_revisions' => 'true' 41 'enable_revisions' => 'true', 42 'show_on_home' => 'false' 42 43 //'anonymous_comments' 43 44 ); -
article-forge/trunk/functions.php
r718377 r718549 9 9 * $Id$ 10 10 * 11 * @package Article Forge11 * @package ArticleForge 12 12 * 13 13 */ … … 50 50 else if (is_single()) return 'single'; 51 51 else if (is_post_type_archive()) return 'archive'; 52 else if (is_home()) return 'home'; 52 53 } 53 54 -
article-forge/trunk/main.php
r718381 r718549 7 7 * Author: Anthony Wells 8 8 * Author URI: http://www.bytewisemcu.org/profile/awells 9 * Version: 1.0. 19 * Version: 1.0.2 10 10 * Text Domain: articleforge 11 11 * Domain Path: /languages/ -
article-forge/trunk/readme.txt
r718381 r718549 4 4 Requires at least: 3.0.1 5 5 Tested up to: 3.5.1 6 Stable tag: 1.0. 16 Stable tag: 1.0.2 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 58 58 == Changelog == 59 59 60 = 1.0.2 = 61 * Added home page support 62 * Fixed time of load of Options in Setting module 63 60 64 = 1.0 = 61 65 * Official release!
Note: See TracChangeset
for help on using the changeset viewer.