<?
/*
Plugin Name: WP Subtitle
Plugin URI: http://www.husani.com/ventures/wordpress-plugins/wp-subtitle/
Description: Add a subtitle to pages and posts.  Place &lt;?=the_subtitle()?&gt; where you'd like the subtitle to appear.  Similar to the_title, you can pass before, after, and display arguments.  Documentation included in this plugin's readme file.  Get help at <a href="http://forums.husani.com/forum/wp-subtitle/" target="_blank">support forums</a> and sign up for the <a href="http://www.husani.com/ventures/wordpress-plugins/wp-subtitle/mailing-list/" target="_blank">mailing list</a> to receive updates and news about WP Subtitle.  By <a href="http://www.husani.com" target="_blank">Husani Oakley</a>.
Author
Version: 1.0
*/

/*  Copyright 2009  Husani Oakley  (email : wordpressplugins@husani.com)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

/**
 * query db and echo page/post subtitle, if any
 */
function wps_get_the_subtitle(){
  global $post;
  echo get_post_meta($post->ID, "wps_subtitle", true);
}

/** HOOKS */
add_action('admin_menu', 'wps_addPanelXHTML');
add_action('save_post', 'wps_saveSubtitle');

/** FUNCTIONS FOR HOOKS */

/**
 * display xhtml for subtitle panel
 */
function wps_addPanelXHTML(){
  if( function_exists( 'add_meta_box' )) {
    add_meta_box('wps_panel', 'Page Subtitle', 'wps_showSubtitlePanel', 'page', 'normal', 'high');
    add_meta_box('wps_panel', 'Post Subtitle', 'wps_showSubtitlePanel', 'post', 'normal', 'high');
  } else {
    add_action('dbx_page_advanced', 'wps_showSubtitlePanelOld');
    add_action('dbx_post_advanced', 'wps_showSubtitlePanelOld');
  }
  //include css if admin
  if(is_admin()){
    add_action('admin_print_styles', 'wps_addPanelCSS');
  }
}

/**
 * include CSS for subtitle panel
 */
function wps_addPanelCSS(){
  $css = WP_PLUGIN_URL . '/wp-subtitle/admin/css/panel.css';
  wp_register_style('wps_css', $css);
  wp_enqueue_style( 'wps_css');
}

/**
 * include XHTML for form inside panel
 */
function wps_showSubtitlePanel(){
  include ABSPATH . PLUGINDIR . "/wp-subtitle/admin/panel.inc.php";
}

/**
 * for pre-2.5, include shell for panel
 */
function wps_showSubtitlePanelOld(){
  include ABSPATH . PLUGINDIR . "/wp-subtitle/admin/compat_panel.inc.php";
}

/**
 * store subtitle content in db as custom field
 */
function wps_saveSubtitle($post_id){
  //verify
  if (!wp_verify_nonce( $_POST['wps_noncename'], 'wp-subtitle')) {
    return $post_id;
  }
  if ('page' == $_POST['post_type']){
    if (!current_user_can('edit_page', $post_id)){
      return $post_id;
    }
  } else {
    if (!current_user_can('edit_post', $post_id)){
      return $post_id;
    }
  }
  //save data
  if(!update_post_meta($post_id, "wps_subtitle", $_POST["wps_subtitle"])){
    add_post_meta($post_id, "wps_subtitle", $_POST["wps_subtitle"]);
  }
}

/**
 * return subtitle from post inside The Loop
 */
function the_subtitle($before="", $after="", $display=true){
  global $post;
  $subtitle = $before . get_post_meta($post->ID, "wps_subtitle", true) . $after;
  if($display){
    echo $subtitle;
  } else {
    return $subtitle;
  }
}

/**
 * return (or display) subtitle from post with ID passed as argument
 */
function get_the_subtitle($id, $before="", $after="", $display=true){
  $subtitle = $before . get_post_meta($id, "wps_subtitle", true) . $after;
  if($display){
    echo $subtitle;
  } else {
    return $subtitle;
  }
}


?><?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AMERICAN GRIDLOCK &#187; Woody Brock Q &amp; A</title>
	<atom:link href="http://americangridlock.com/category/q-a/feed/" rel="self" type="application/rss+xml" />
	<link>http://americangridlock.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 07 Feb 2012 07:35:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Can we preserve capitalistic incentives, while avoiding massive income disparities and providing assistance to those who are truly in need?</title>
		<link>http://americangridlock.com/2011/12/22/can-we-preserve-capitalistic-incentives-while-avoiding-massive-income-disparities-and-providing-assistance-to-those-who-are-truly-in-need/</link>
		<comments>http://americangridlock.com/2011/12/22/can-we-preserve-capitalistic-incentives-while-avoiding-massive-income-disparities-and-providing-assistance-to-those-who-are-truly-in-need/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 04:51:24 +0000</pubDate>
		<dc:creator>American Gridlock Editor</dc:creator>
				<category><![CDATA[Woody Brock Q & A]]></category>

		<guid isPermaLink="false">http://americangridlock.com/?p=250</guid>
		<description><![CDATA[Chapter 6 in the book clarifies the true meaning of “Invisible Hand capitalism” as Adam Smith and others conceived it, and contrasts this with the form of “crony capitalism” which we observe today. It is shown how true capitalism of the former kind is fully compatible with an elimination of the outrageous disparities in wealth [...]]]></description>
			<content:encoded><![CDATA[<p>Chapter 6 in the book clarifies the true meaning of “Invisible Hand capitalism” as Adam Smith and others conceived it, and contrasts this with the form of “crony capitalism” which we observe today. It is shown how true capitalism of the former kind is fully compatible with an elimination of the outrageous disparities in wealth and income observed today. That is to say, the author shows that there is nothing incompatible between true capitalism on the one hand, and a fairer distribution of wealth and income ono the other. Some of the reasons this is true stem from the capitalistic norm of “market efficiency,” a point that is seldom acknowledged. Indeed, it is universally supposed that true capitalism and its norm of economic efficiency are silent upon the concept of Distributive Justice, the latter falling under the rubric of moral philosophy. This is not the case at all, for three reasons set forth in the chapter. As a result, self-styled capitalists must confront the need to redress rampant inequalities on purely capitalistic grounds! Moral theory for its part plays an ancillary role, and proposes <em>additional</em> reasons for a more just distribution of wealth and income. Thus, the subject of fair shares is not peripheral to capitalist economics, but rather central to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://americangridlock.com/2011/12/22/can-we-preserve-capitalistic-incentives-while-avoiding-massive-income-disparities-and-providing-assistance-to-those-who-are-truly-in-need/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is your solution to the health care spending crisis?</title>
		<link>http://americangridlock.com/2011/12/22/what-is-your-solution-to-the-health-care-spending-crisis/</link>
		<comments>http://americangridlock.com/2011/12/22/what-is-your-solution-to-the-health-care-spending-crisis/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 04:49:57 +0000</pubDate>
		<dc:creator>American Gridlock Editor</dc:creator>
				<category><![CDATA[Woody Brock Q & A]]></category>

		<guid isPermaLink="false">http://americangridlock.com/?p=247</guid>
		<description><![CDATA[The solution to the health care spending crisis is quite simple, at heart. Suppose you know that there is going to be a large increase in demand for apricots. What do you do to make sure that people do not have to spend too much on apricots in the future? You naturally increase the supply [...]]]></description>
			<content:encoded><![CDATA[<p>The solution to the health care spending crisis is quite simple, at heart. Suppose you know that there is going to be a large increase in demand for apricots. What do you do to make sure that people do not have to spend too much on apricots in the future? You naturally increase the supply of apricots by planting a lot more trees. This will drive the price of apricots down, so total expenditure on apricots will increase less than if you did not increase supply. Yet it turns out that this is not enough. In the case of health care services, suppose that you wish to increase the supply and demand of services delivered, and also wish to drive total expenditure on healthcare <em>down</em> as a share of GDP — not simply to slow down its growth rate as was the more modest hope of Obama care. The nation <em>must</em> strive for this outcome given the huge expenditures the nation confronts as its population ages during the next four decades.</p>
<p>Can this idealized outcome be achieved? Can we have our cake and eat it too? The answer is yes: What is required is that the so-called “supply curve” of health care services shifts out to the right faster than the demand curve does. It can be shown formally (and is in an Appendix) that policies insuring this outcome will remarkably increase the supply of health care (matching increased demand) <em>and</em> drive total expenditure down as a share of GDP. It is also proven that this is the only way in which this outcome can be achieved. In the book, there is a significant discussion of exactly how to drive the supply curve outward at a much faster rate than in the past.</p>
]]></content:encoded>
			<wfw:commentRss>http://americangridlock.com/2011/12/22/what-is-your-solution-to-the-health-care-spending-crisis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can you elaborate on your definition of a “good” and “bad” government spending deficit?</title>
		<link>http://americangridlock.com/2011/12/22/can-you-elaborate-on-your-definition-of-a-%e2%80%9cgood%e2%80%9d-and-%e2%80%9cbad%e2%80%9d-government-spending-deficit/</link>
		<comments>http://americangridlock.com/2011/12/22/can-you-elaborate-on-your-definition-of-a-%e2%80%9cgood%e2%80%9d-and-%e2%80%9cbad%e2%80%9d-government-spending-deficit/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 04:49:19 +0000</pubDate>
		<dc:creator>American Gridlock Editor</dc:creator>
				<category><![CDATA[Woody Brock Q & A]]></category>

		<guid isPermaLink="false">http://americangridlock.com/?p=245</guid>
		<description><![CDATA[The importance of clear and valid definitions is well-known in the history and philosophy of science — both in the physical and social sciences. In economics, at present, the term “government deficit” is playing a central role in guiding policy. Because of decades of deficit accumulation, total debt has grown to a dangerous level causing [...]]]></description>
			<content:encoded><![CDATA[<p>The importance of clear and valid definitions is well-known in the history and philosophy of science — both in the physical and social sciences. In economics, at present, the term “government deficit” is playing a central role in guiding policy. Because of decades of deficit accumulation, total debt has grown to a dangerous level causing bond markets to look askance at further debt growth. As a result, “deficit phobia” is rampant amongst governments ranging from Australia to Germany, the UK, and the US. The problem is that the term “government deficit” is badly confused. Suppose that a government with a heavy debt load proposes to borrow additional funds. Deficit hawks will cry “Foul,” due to the fear of further displeasing the bond market, and laying even more debt upon the shoulders of the children and grandchildren who will have to service this debt.</p>
<p>But such hawks may be wrong in their diagnosis. Suppose that the funds are being borrowed for <em>productive</em> infrastructure investment — projects like the interstate highway system that more than paid for themselves over time. Not just infrastructure investment (“roads to both somewhere and nowhere”), but productive investment (“roads to somewhere” only).  In this case, no additional debt is accumulated at all as a result of increased borrowing. Indeed, the high return on such projects will end up lowering the debt burden on the children in the long run. On the other hand, increased borrowing to fund transfer programs will not generate healthy returns on investment as there is in effect no investment. This, this form of borrowing will increase the burden on the children, and the fears of deficit hawks are well justified. In short, there are good and bad deficits — the distinction depending upon whether the borrowed funds are spent productively or unproductively.</p>
]]></content:encoded>
			<wfw:commentRss>http://americangridlock.com/2011/12/22/can-you-elaborate-on-your-definition-of-a-%e2%80%9cgood%e2%80%9d-and-%e2%80%9cbad%e2%80%9d-government-spending-deficit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why are both the Right and Left wrong in their analysis and proposed solutions to our economic problems?</title>
		<link>http://americangridlock.com/2011/12/22/why-are-both-the-right-and-left-wrong-in-their-analysis-and-proposed-solutions-to-our-economic-problems/</link>
		<comments>http://americangridlock.com/2011/12/22/why-are-both-the-right-and-left-wrong-in-their-analysis-and-proposed-solutions-to-our-economic-problems/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 04:48:24 +0000</pubDate>
		<dc:creator>American Gridlock Editor</dc:creator>
				<category><![CDATA[Woody Brock Q & A]]></category>

		<guid isPermaLink="false">http://americangridlock.com/?p=243</guid>
		<description><![CDATA[The Left and the Right are both wrong in their analyses of our problems because the policy biases they start with assure that their policy solutions are tainted by either Left or Right wing prejudices that make meaningful compromises between the two camps all but impossible. Take, for example, the red-hot issue of “fair shares [...]]]></description>
			<content:encoded><![CDATA[<p>The Left and the Right are both wrong in their analyses of our problems because the policy biases they start with assure that their policy solutions are tainted by either Left or Right wing prejudices that make meaningful compromises between the two camps all but impossible. Take, for example, the red-hot issue of “fair shares of the pie,” or Distributive Justice as philosophers call it. Leftists have become so indoctrinated into interpreting this issue as one of taking from the rich and giving to the poor that they cannot accept a theory of justice which respects <em>both</em> “to each according to his needs” as well as “to each according to his contribution.” And vice versa for rightist conservatives who assume the primacy of “to each according to his contribution.” A more fundamental analysis of the kind provided in Chapter 6 of the book starts off in a less prejudiced manner, demonstrating the relevance of both dimensions of “fairness” from first principles, and then arriving at a theory that incorporates both needs-justice and contribution-justice in their appropriate domains. As a result, the new theory is neither Left wing nor Right wing in nature. It is balanced, and obviates a Dialogue of the Deaf on the subject of fair shares.</p>
]]></content:encoded>
			<wfw:commentRss>http://americangridlock.com/2011/12/22/why-are-both-the-right-and-left-wrong-in-their-analysis-and-proposed-solutions-to-our-economic-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
