<?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>Corpocrat Blog &#187; Wordpress</title>
	<atom:link href="http://corpocrat.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://corpocrat.com</link>
	<description>Daily Blog from Internet Entrepreneur/Webmaster</description>
	<lastBuildDate>Mon, 21 May 2012 21:03:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Fix &#8211; Deprecated: Assigning the return value of new by reference is deprecated in PHP5.3</title>
		<link>http://corpocrat.com/2012/03/16/fix-deprecated-assigning-the-return-value-of-new-by-reference-is-deprecated-in-php5/</link>
		<comments>http://corpocrat.com/2012/03/16/fix-deprecated-assigning-the-return-value-of-new-by-reference-is-deprecated-in-php5/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 11:04:24 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3540</guid>
		<description><![CDATA[<p>i recently updated to latest PHP 5 from PHP 4 and my wordpress blog was littered with these errors. I have seen these warnings before with PHP 5. Dont worry! The fix is very easy.</p>
<p>Deprecated: Assigning the return value of new by reference is deprecated in /home/topbest/public_html/wp-settings.php on line 472</p>
<p>Deprecated: Assigning the return ...]]></description>
			<content:encoded><![CDATA[<p>i recently updated to latest PHP 5 from PHP 4 and my wordpress blog was littered with these errors. I have seen these warnings before with PHP 5. Dont worry! The fix is very easy.</p>
<blockquote><p><strong>Deprecated</strong>: Assigning the return value of new by reference is deprecated in <strong>/home/topbest/public_html/wp-settings.php</strong> on line <strong>472</strong></p>
<p><strong>Deprecated</strong>: Assigning the return value of new by reference is deprecated in <strong>/home/topbe/public_html/wp-settings.php</strong> on line <strong>487</strong></p>
<p><strong>Deprecated</strong>: Assigning the return value of new by reference is deprecated in <strong>/home/topbe/public_html/wp-settings.php</strong> on line <strong>494</strong></p>
<p><strong>Deprecated</strong>: Assigning the return value of new by reference is deprecated in <strong>/home/topbe/public_html/wp-settings.php</strong> on line <strong>530</strong></p>
<p><strong>Deprecated</strong>: Assigning the return value of new by reference is deprecated in <strong>/home/topbe/public_html/wp-includes/cache.php</strong> on line <strong>103</strong></p>
<p><strong>Deprecated</strong>: Assigning the return value of new by reference is deprecated in <strong>/home/topbe/public_html/wp-includes/query.php</strong> on line <strong>21</strong></p>
<p><strong>Deprecated</strong>: Assigning the return value of new by reference is deprecated in <strong>/home/topbe/public_html/wp-includes/theme.php</strong> on line <strong>623</strong></p>
<p>&nbsp;</p></blockquote>
<p>The fix is very easy. The only way you can fix this is update your wordpress to latest version or if you can manually edit the above files on lines,  <strong>remove &#8220;&amp;&#8221; </strong> fix this.</p>
<p>For Example:</p>
<pre>$wp_locale = &amp; new WP_Locale();</pre>
<p>Remove the &amp; and these warnings will be fixed.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2012/03/16/fix-deprecated-assigning-the-return-value-of-new-by-reference-is-deprecated-in-php5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Useful WordPress User Interface / Dashboard Hacks!</title>
		<link>http://corpocrat.com/2012/02/11/10-useful-wordpress-user-interface-hacks/</link>
		<comments>http://corpocrat.com/2012/02/11/10-useful-wordpress-user-interface-hacks/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 11:10:23 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3513</guid>
		<description><![CDATA[<p>I have been so much fan of wordpress, but one thing wordpress lacks, is a backend user interface (login area for users).  If you are presenting this to your client, there are lot of tweaks to do, remove unwanted things in the user interface area.  The good news is with ...]]></description>
			<content:encoded><![CDATA[<p>I have been so much fan of wordpress, but one thing wordpress lacks, is a backend user interface (login area for users).  If you are presenting this to your client, there are lot of tweaks to do, remove unwanted things in the user interface area.  The good news is with just few bits of code you can do amazing things with wordpress and impress your clients.</p>
<blockquote><p>Remember whatever code is shown below, you must add it to the <strong>functions.php</strong> which is present in your theme.</p></blockquote>
<h3>1. Removing WordPress update notifications</h3>
<p><a href="http://corpocrat.com/wp-content/uploads/2012/02/Screen-shot-2012-02-11-at-3.35.47-PM.jpg"><img class="alignnone size-full wp-image-3514" title="Screen shot 2012-02-11 at 3.35.47 PM" src="http://corpocrat.com/wp-content/uploads/2012/02/Screen-shot-2012-02-11-at-3.35.47-PM.jpg" alt="" width="385" height="37" /></a></p>
<p>It is very unprofessional to show your users,  &#8220;New wordpress versions are available. Please update it&#8221;. As a site owner, you may want to hide this notice to users.</p>
<pre class="brush: php; title: CODE; notranslate">

//disable wordpress version update
function hide_update_notice() {
remove_action( 'admin_notices', 'update_nag', 3 );
}
add_action( 'admin_notices', 'hide_update_notice', 1 );
</pre>
<h3>2. Custom WordPress Notifications for Users</h3>
<p>You may want to put up custom notification or warnings to your users, when they login to the wordpress user area.  This code will show custom message, within a yellow box on top.</p>
<pre class="brush: php; title: CODE; notranslate">

//my custom admin notice
add_action('admin_notices', 'admin_notice');

function admin_notice(){
if(current_user_can('contributor')) {
echo '&lt;div&gt;
&lt;p&gt;We only approve unique high quality news content. No spamming please.. &lt;/p&gt;
&lt;/div&gt;';
}

}
</pre>
<h3>3. Remove Powered by WordPress in Footer</h3>
<p>You dont want to show, powered by wordpress in the footer of your user interface. Make changes to it, using the following code</p>
<pre class="brush: php; title: CODE; notranslate">
// Remove Powered by WordPress.org
function modify_footer_admin () {
echo 'Example.com - My Account Section';
}

add_filter('admin_footer_text', 'modify_footer_admin');
</pre>
<h3>4. Show only User Specific Posts</h3>
<p>The biggest problem i faced is wordpress by default, shows ALL posts to user, in the admin area.  ALL posts means even posts submitted by other users/authors, of course in read only mode.  Further wordpress shows total counts of all posts (pending, published, all, drafts) present in the entire blog. This is totally unacceptable and it may present a security risk. You dont want to reveal entire list of blog posts to your users. The solution is to show posts, submitted by the user who is currently logged in and remove all post counts etc.. This is the key to design a best user interface.</p>
<blockquote><p>Note: I have designated the default user role as &#8220;contributor&#8221; when they register. You may want to change this, depending on what user role you set, for example author.</p></blockquote>
<p>This code will only show posts submitted by author/user, who is currently logged in:</p>
<pre class="brush: php; title: CODE; notranslate">
//user specific posts in admin area
function posts_for_current_author($query) {

if(current_user_can('contributor') &amp;&amp; is_admin()) {

global $user_ID;
$query-&gt;set('author',  $user_ID);
}
return $query;
}
add_filter('pre_get_posts', 'posts_for_current_author');
</pre>
<p>This post will hide the number counts in brackets:</p>
<pre class="brush: php; title: CODE; notranslate">

// remove pending published above table.
function jquery_remove_counts()
{

if(current_user_can('contributor')) {

?&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
jQuery(function(){
jQuery(&quot;li.all&quot;).remove();
jQuery(&quot;li.publish&quot;).find(&quot;span.count&quot;).remove();
jQuery(&quot;li.trash&quot;).find(&quot;span.count&quot;).remove();
jQuery(&quot;li.pending&quot;).find(&quot;span.count&quot;).remove();

});
&lt;/script&gt;
&lt;?php }
}
add_action('admin_footer', 'jquery_remove_counts');
</pre>
<h3>5. Cleanup the Dashboard</h3>
<p>Remove the dashboard widgets like incoming links, drafts, plugins, recent comments etc in the user dashboard area.</p>
<pre class="brush: php; title: CODE; notranslate">

function remove_dashboard_widgets(){
global$wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}

add_action('wp_dashboard_setup', 'remove_dashboard_widgets');
remove_action('init', 'wp_version_check');
</pre>
<h3>6. Custom Logo for Login Area</h3>
<p>Why not remove the default wordpress logo and replace it with your own website logo for the login area for your users. Use this code for the custom logo. <strong>Be sure to put admin_logo.png in the theme folder inside the images directory.</strong></p>
<p><a href="http://corpocrat.com/wp-content/uploads/2012/02/Screen-shot-2012-02-11-at-4.12.03-PM.jpg"><img class="alignnone size-full wp-image-3516" title="Screen shot 2012-02-11 at 4.12.03 PM" src="http://corpocrat.com/wp-content/uploads/2012/02/Screen-shot-2012-02-11-at-4.12.03-PM.jpg" alt="" width="283" height="264" /></a></p>
<pre class="brush: php; title: CODE; notranslate">

// add admin logo
function my_custom_login_logo()
{
echo '&lt;style  type=&quot;text/css&quot;&gt; h1 a {  background-image:url('.get_bloginfo('template_directory').'/images/admin_logo.png)  !important; } &lt;/style&gt;';
}
add_action('login_head',  'my_custom_login_logo');
</pre>
<h3>7.  Replacing Dashboard title with custom text</h3>
<p>When ever the user logs in to the dashboard, they will see &#8220;Dashboard&#8221;  in the landing page, which wordpress shows as default. You may want to change this to My Blog &#8211; My Account&#8221; or something like that&#8230;using the following code&#8230;</p>
<pre class="brush: php; title: CODE; notranslate">

function change_wp_login_title()
{
echo get_option('blogname') . &quot;- Account Section&quot;;
}

add_filter('login_headertitle', 'change_wp_login_title');
</pre>
<h3>8. Assigning Specific Permissions</h3>
<p>This is the most important part in the user interface on how and what permissions you give to your users. For example, if you select contributor as the default user role, you can give permission to them only to edit, delete their posts and NOT publish posts. You as admin, may want to review posts and publish them.  Amazingly you can accomplish them with few lines of magic code..</p>
<blockquote><p>Note: I have assigned the default user role as &#8220;contributor&#8221;.  You may want to change this role accordingly on what you set when users register.</p></blockquote>
<pre class="brush: php; title: CODE; notranslate">

function add_permissions_contributor() {

$role = get_role('contributor'); // first get the role of user.
//$role-&gt;add_cap('edit_published_posts'); //allow editing published posts
//$role-&gt;add_cap('delete_posts'); // allow deleting published posts
$role-&gt;remove_cap('publish_posts');  // prevent publishing posts
$role-&gt;remove_cap('edit_others_posts');  // prevent editing others posts
}

add_action('admin_init','add_permissions_contributor');
</pre>
<h3>9. Using Plugins to Tweak Further</h3>
<p>You can use plugins like adminimize to further clean up dashboard items like quickpress, without touching the code. You can also add custom menus in your user interface using plugins like Admin menu editor. Dashboard landing page can also be customized to include products/services in the user area.</p>
<ul>
<li>Adminimize &#8211; <a href="http://wordpress.org/extend/plugins/adminimize/" target="_blank"><cite>wordpress.org/extend/plugins/<strong>adminimize</strong>/</cite></a></li>
<li>Admin menu Editor &#8211; <a href="http://wordpress.org/extend/plugins/admin-menu-editor/" target="_blank"><cite>wordpress.org/extend/plugins/<strong>admin</strong>-<strong>menu</strong>-<strong>editor</strong>/</cite></a></li>
<li>White label CMS &#8211; <a href="http://www.videousermanuals.com/white-label-cms/" target="_blank">http://www.videousermanuals.com/white-label-cms/</a></li>
<li>Dashboard post-it &#8211; <a href="http://wordpress.org/extend/plugins/dashboard-post-it/" target="_blank">http://wordpress.org/extend/plugins/dashboard-post-it/<cite></cite></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2012/02/11/10-useful-wordpress-user-interface-hacks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; How to create a login protected page?</title>
		<link>http://corpocrat.com/2011/10/28/wordpress-how-to-create-a-login-protected-page/</link>
		<comments>http://corpocrat.com/2011/10/28/wordpress-how-to-create-a-login-protected-page/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 15:47:19 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3448</guid>
		<description><![CDATA[<p>In this tutorial, i will how you how easy it is to login protect a page and then force users to login, to view the page.</p>
<p>1. Create a php file named &#8220;login-protect.php&#8221; in your current theme folder.</p>
<p>2. Place the following code in this file</p>


&#60;?php /*   Template Name:  Login Protect ...]]></description>
			<content:encoded><![CDATA[<p>In this tutorial, i will how you how easy it is to login protect a page and then force users to login, to view the page.</p>
<p>1. Create a php file named &#8220;login-protect.php&#8221; in your current theme folder.</p>
<p>2. Place the following code in this file</p>
<pre class="brush: php; title: CODE; notranslate">

&lt;?php /*   Template Name:  Login Protect Template */ ?&gt;
&lt;?php get_header() ; ?&gt;
&lt;?php auth_redirect(); // checks to see if logged in else redirect ?&gt;
&lt;!-- HERE GOES HTML AND CSS DEPENDING ON YOUR THEME --&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p>3. Go create a post, set the template to &#8220;Login Protected Template&#8221;  (will show up)</p>
<p><a href="http://corpocrat.com/wp-content/uploads/2011/10/arrtri.jpg"><img class="alignnone size-full wp-image-3449" title="arrtri" src="http://corpocrat.com/wp-content/uploads/2011/10/arrtri.jpg" alt="" width="210" height="212" /></a></p>
<p>4. Directly write the content and publish it.</p>
<p>There is one more alternative to check logins is use</p>
<pre class="brush: php; title: CODE; notranslate">

if (!is_user_logged_in()) {
wp_redirect(&quot;/wp-login.php&quot;);
}
</pre>
<p>Thats it! Your login protected page is ready.</p>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2011/10/28/wordpress-how-to-create-a-login-protected-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; how to add custom field when post is published?</title>
		<link>http://corpocrat.com/2011/10/28/wordpress-how-to-add-custom-field-when-post-is-published/</link>
		<comments>http://corpocrat.com/2011/10/28/wordpress-how-to-add-custom-field-when-post-is-published/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 14:17:41 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3437</guid>
		<description><![CDATA[<p>It is dead easy to set a custom field to your post, programmatically when the post is published. For example, whenever your post is published, you might want to add a custom field &#8220;submitted&#8221; and set its value to &#8220;1&#8243;, when a post is published.</p>
<p>Here is how you do it. ...]]></description>
			<content:encoded><![CDATA[<p>It is dead easy to set a custom field to your post, programmatically when the post is published. For example, whenever your post is published, you might want to add a custom field &#8220;submitted&#8221; and set its value to &#8220;1&#8243;, when a post is published.</p>
<p>Here is how you do it. Call the <strong>publish_post</strong> hook, pass a function since the hook runs whenever a post it published.</p>
<p>We are creating a new custom field &#8220;submit&#8221; and setting its value to &#8220;1&#8243; when ever the post is published. The code will only create custom field, when the user role is &#8220;author&#8221;. If you dont check for user role, this code will run for even admins and all users. We are going one more step with this code, against by checking another custom field <strong>&#8220;custom_field_1&#8243;</strong> with a particular value exists.</p>
<p>We pull the value of a custom field using <strong>get_post_meta</strong> function and we create custom field for the post using <strong>add_post_meta</strong> function. Note that true parameter, makes the custom field unique and no duplication possible.</p>
<pre class="brush: php; title: CODE; notranslate">

add_action('publish_post','create_custom_field')

function create_custom_field ($post_id) {
global $wpdb;
if ( current_user_can('contributor') ) {

if(get_post_meta($post_id,'custom_field_1',true) == '1'){
add_post_meta($post_ID,'submit','1',true);
return $post_id;
}

return $post_id;
}

}
</pre>
<p>For full list of action hooks, applied to posts, please go through: <a href="http://codex.wordpress.org/Plugin_API/Action_Reference" target="_blank">http://codex.wordpress.org/Plugin_API/Action_Reference</a></p>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2011/10/28/wordpress-how-to-add-custom-field-when-post-is-published/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to redirect when post submitted for review in WordPress</title>
		<link>http://corpocrat.com/2011/10/28/how-to-redirect-when-post-submitted-for-review-in-wordpress/</link>
		<comments>http://corpocrat.com/2011/10/28/how-to-redirect-when-post-submitted-for-review-in-wordpress/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 13:57:05 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3434</guid>
		<description><![CDATA[<p>I was working recently on custom project and i wanted wordpress to redirect to a custom payment page, when somebody submits a post for review.  It was such a simple step and quite disappointed that there was no wordpress plugin to do this job. If it was in php, i ...]]></description>
			<content:encoded><![CDATA[<p>I was working recently on custom project and i wanted wordpress to redirect to a custom payment page, when somebody submits a post for review.  It was such a simple step and quite disappointed that there was no wordpress plugin to do this job. If it was in php, i would have done this in a fly. Finally i decided to code myself, using itsy bitsy code.</p>
<p>Having spent whole day banging my head on the wall, i found this simple code, does the job. Put this code in your theme <strong>function.php file</strong> or create your own plugin.</p>
<p>My users are set on &#8220;contributor&#8221; role by default.</p>
<blockquote><p>keep in mind the hook <strong>edit_posts</strong>, runs, when a user submits a post for review (pending). This is for contributor role. For author role, the hook publish_posts runs when authors submit posts for review.</p></blockquote>
<p>I created a separate payment page, which i had links for paypal and 2checkout. The code checks to make sure only those users under &#8220;contributor&#8221; role (not admins) will get redirected to payment page, upon submitting a post for review.</p>
<pre class="brush: php; title: CODE; notranslate">

add_action('edit_post','payment_redirect');

function payment_redirect($post_id) {
global $wpdb;
if ( current_user_can('contributor') ) {
wp_redirect(&quot;http://example.com/paypal/&quot;);
exit;
}
return $post_id;
}
</pre>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2011/10/28/how-to-redirect-when-post-submitted-for-review-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Retrieve author/user details from Post ID</title>
		<link>http://corpocrat.com/2011/10/28/wordpress-retrieve-authoruser-details-from-post-id/</link>
		<comments>http://corpocrat.com/2011/10/28/wordpress-retrieve-authoruser-details-from-post-id/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 13:35:57 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3431</guid>
		<description><![CDATA[<p>Very often in your projects, you want to pull out the author data, given a post id. It is very easy do it in wordpress.</p>
<p>It can be accomplished by the_author_meta() function or get_the_author_meta() function.You will need call this function in your theme or plugin, through a hook</p>
<p>the_author_meta() &#8211;&#62; Outputs the ...]]></description>
			<content:encoded><![CDATA[<p>Very often in your projects, you want to pull out the author data, given a post id. It is very easy do it in wordpress.</p>
<p>It can be accomplished by <strong>the_author_meta()</strong> function or <strong>get_the_author_meta()</strong> function.You will need call this function in your theme or plugin, through a hook</p>
<blockquote><p>the_author_meta() &#8211;&gt; Outputs the data, just like echo<br />
get_the_author_meta() -&gt; holds the value in value.</p></blockquote>
<p>The below function, retreives user details like&#8230;</p>
<pre class="brush: php; title: CODE; notranslate">
function author_details($post_ID)  {
$auth = get_post($post_ID); // gets author from post
$authid = $auth-&gt;post_author; // gets author id for the post
$user_email = get_the_author_meta('user_email',$authid); // retrieve user email
$user_firstname = get_the_author_meta('user_firstname',$authid); // retrieve firstname
$user_nickname = get_the_author_meta('nickname,$authid); // retrieve user nickname
}
</pre>
<p>The following list of user fields you can retrieve using this function.</p>
<ul>
<li><tt>user_login</tt></li>
<li><tt>user_pass</tt></li>
<li><tt>user_nicename</tt></li>
<li><tt>user_email</tt></li>
<li><tt>user_url</tt></li>
<li><tt>user_registered</tt></li>
<li><tt>user_activation_key</tt></li>
<li><tt>user_status</tt></li>
<li><tt>display_name</tt></li>
<li><tt>nickname</tt></li>
<li><tt>first_name</tt></li>
<li><tt>last_name</tt></li>
<li><tt>description</tt></li>
<li><tt>jabber</tt></li>
<li><tt>aim</tt></li>
<li><tt>yim</tt></li>
<li><tt>user_level</tt></li>
<li><tt>user_firstname</tt></li>
<li><tt>user_lastname</tt></li>
<li><tt>user_description</tt></li>
<li><tt>rich_editing</tt></li>
<li><tt>comment_shortcuts</tt></li>
<li><tt>admin_color</tt></li>
<li><tt>plugins_per_page</tt></li>
<li><tt>plugins_last_view</tt></li>
<li><tt>ID</tt></li>
</ul>
<p>For full reference, please see: <a href="http://codex.wordpress.org/Function_Reference/the_author_meta" target="_blank">http://codex.wordpress.org/Function_Reference/the_author_meta</a></p>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2011/10/28/wordpress-retrieve-authoruser-details-from-post-id/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to assign or remove user permissions in WordPress</title>
		<link>http://corpocrat.com/2011/10/28/wordpress-assign-or-remove-permissions-to-users/</link>
		<comments>http://corpocrat.com/2011/10/28/wordpress-assign-or-remove-permissions-to-users/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 12:52:18 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3416</guid>
		<description><![CDATA[<p>In wordpress, it is very easy to add and remove permissions to your wordpress registered users. For example, you can set wordpress default user role to &#8220;contributor&#8221; which means those who register in your website, automatically become contributors and they will be able to post articles in your wordpress &#8220;pending ...]]></description>
			<content:encoded><![CDATA[<p>In wordpress, it is very easy to add and remove permissions to your wordpress registered users. For example, you can set wordpress default user role to &#8220;contributor&#8221; which means those who register in your website, automatically become contributors and they will be able to post articles in your wordpress &#8220;pending review&#8221;. In that way you restrict your users not to spam you by publishing posts. If you set the user role to &#8220;author&#8221;, then they will instantly publish posts.</p>
<p>Permissions, are otherwise called &#8220;capabilities&#8221; in wordpress, depending on user role. For example &#8220;subscribers&#8221; can only read in your website and cannot submit posts. Similarly &#8220;contributors&#8221; cannot delete/edit posts once published by admin.</p>
<blockquote><p>The best plugin i have seen to customize user panel permission is <a href="http://wordpress.org/extend/plugins/adminimize/" target="_blank">adminimize</a>. Be sure to play around with this plugin.</p></blockquote>
<p>Be sure to read this: <a href="http://codex.wordpress.org/Roles_and_Capabilities">http://codex.wordpress.org/Roles_and_Capabilities</a></p>
<p>The good news is you alter the user permissions, which wordpress assigns by default. You may allow contributors permission to delete and edit posts even after they are published. It is so easy and can be done with just 2 lines of code.</p>
<p>Go to your theme folders <strong>function.php,  </strong>and place the below code and this will alter permission to all your users in the admin area. You could even use this code in your plugin.</p>
<p>This code runs, when <strong>admin_init</strong> hook is called during load of admin section.</p>
<pre class="brush: php; title: CODE; notranslate">
function change_user_permissions() {

$role = get_role( 'contributor' ); // gets the author role

$role-&gt;add_cap( 'edit_others_posts' ); //edit others' posts for current theme only
$role-&gt;add_cap( 'edit_posts' ); // edit own posts
$role-&gt;add_cap('delete_posts'); // delete own posts
$role-&gt;add_cap('publish_posts'); // publish own posts

$role-&gt;remove_cap('edit_posts'); //removes the permission set before
$role-&gt;remove_cap('delete_posts'); // delete own posts
}

add_action( 'admin_init', 'change_user_permissions');
&amp;nbsp;</pre>
<p>For complete list of user capability functions, see: <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">http://codex.wordpress.org/Roles_and_Capabilities</a></p>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2011/10/28/wordpress-assign-or-remove-permissions-to-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Published contributor posts cannot be deleted in WordPress!</title>
		<link>http://corpocrat.com/2011/10/18/published-contributor-posts-cannot-be-deleted-in-wordpress/</link>
		<comments>http://corpocrat.com/2011/10/18/published-contributor-posts-cannot-be-deleted-in-wordpress/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 04:21:07 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3406</guid>
		<description><![CDATA[<p>User roles determine editing and deleting posts by your site users. The main difference between author role and contributor role is</p>

Authors -&#62; Create/Edit/Delete posts + Publish
Contributors -&#62; Create/Edit/Delete before publishing  + Submit for review (cannot Publish) + Cannot Edit/Delete Published posts

<p>The main difference is contributors, once posts are published,  posts ...]]></description>
			<content:encoded><![CDATA[<p>User roles determine editing and deleting posts by your site users. The main difference between author role and contributor role is</p>
<ul>
<li>Authors -&gt; Create/Edit/Delete posts + Publish</li>
<li>Contributors -&gt; Create/Edit/Delete before publishing  + Submit for review (cannot Publish) + Cannot Edit/Delete Published posts</li>
</ul>
<p>The main difference is contributors, once posts are published,  posts cannot be edited or deleted by contributors.  Often you want your website users to post articles to you in wordpress, and you want to approve them manually. You will also need give them provisions to edit or remove posts after publishing. Not allowing contributors to delete or edit posts sometimes force you to change their role as author. But the problem with author is the posts are published automatically and your site users could spam you. In that context, the contributor role is ideal option.</p>
<p>You can easily override permission contributor issue by just placing 2 lines in your <strong>functions.php</strong> in your theme.</p>
<p><code>$role = get_role( 'contributor' ); // gets the author role<br />
$role-&gt;add_cap('delete_published_posts' );</code></p>
<p>&nbsp;</p>
<p>Trust me, it will work like magic!</p>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2011/10/18/published-contributor-posts-cannot-be-deleted-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 Useful WordPress plugins for Clickbank affiliates</title>
		<link>http://corpocrat.com/2011/09/19/7-useful-wordpress-plugins-for-clickbank-affiliates/</link>
		<comments>http://corpocrat.com/2011/09/19/7-useful-wordpress-plugins-for-clickbank-affiliates/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 19:40:45 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wordpress clickbank]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3379</guid>
		<description><![CDATA[<p></p>
<p>If you are a clickbank affiliate, wanting to promote clickbank products, there are 2 ways you can promote clickbank products from your wordpress site. Either directly get the affiliate code and paste it on your wordpress website or use a wordpress plugin.</p>
1. Hop Ad Builder
<p>Use Hop Ad Builder from clickbank, ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://corpocrat.com/wp-content/uploads/2011/09/clickba.jpg"><img class="alignnone size-full wp-image-3388" title="clickba" src="http://corpocrat.com/wp-content/uploads/2011/09/clickba.jpg" alt="" width="300" height="200" /></a></p>
<p>If you are a clickbank affiliate, wanting to promote clickbank products, there are 2 ways you can promote clickbank products from your wordpress site. Either directly get the affiliate code and paste it on your wordpress website or use a wordpress plugin.</p>
<h3>1. Hop Ad Builder</h3>
<p>Use Hop Ad Builder from clickbank, get the iframe code, and go to your wp-content themes folder, select your theme and then open single.php or sidebar.php to directly paste the code.  If you specify 2 or 3 keywords in your code, clickbank will automatically show relevent ads.</p>
<p>Hop Ad Builder &#8211; <a href="http://www.clickbank.com/help/affiliate-help/affiliate-tools/hopad-builder/" target="_blank">http://www.clickbank.com/help/affiliate-help/affiliate-tools/hopad-builder/</a></p>
<h3>2. Clickbank WordPress Plugins</h3>
<p>Another way of doing it is, get a wordpress plugin. This plugin will automatically show relevent clickbank affiliate products depending on the content or plugin like ucontext which automatically picks keywords in your sitecontent and turns them into affiliate links There arent many clickbank wordpress plugins available, but those listed below should give you a pretty good start with your clickbank affiliate campaign</p>
<ul>
<li> <a href="http://wordpress.org/extend/plugins/clickbank-hop-ad/" target="_blank">Clickbank HopAD</a><strong></strong></li>
<li><strong></strong> <a href="http://wordpress.org/extend/plugins/wordpress-clickbank-integration/" target="_blank">WordPress Clickbank Plugin</a></li>
<li><a href="http://wordpress.org/extend/plugins/wordpress-clickbank-integration/" target="_blank">WordPress Clickbank Integration</a><strong></strong></li>
<li><strong></strong><a href="http://wordpress.org/extend/plugins/clickbank-framework/" target="_blank">Clickbank Framework</a><strong></strong></li>
<li><strong></strong><a href="http://wordpress.org/extend/plugins/ucontext/" target="_blank">uContext Plugin</a><strong></strong></li>
<li><a href="http://wordpress.org/extend/plugins/wp-contextual-affiliate-ads/" target="_blank">WP Contextual Affiliate Ads</a></li>
<li><strong></strong><a href="http://wordpress.org/extend/plugins/ad-injection/" target="_blank">Ad Injection</a><strong></strong></li>
<li><strong></strong> <a href="http://wpaffiliate.net/" target="_blank">WP Affiliate</a></li>
</ul>
<p>Hope this helps, if you are searching for a clickbank affiliate wordpress plugin</p>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2011/09/19/7-useful-wordpress-plugins-for-clickbank-affiliates/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Best Tutorial Videos for WordPress Plugin Writing</title>
		<link>http://corpocrat.com/2011/09/11/best-tutorial-videos-for-wordpress-plugin-writing/</link>
		<comments>http://corpocrat.com/2011/09/11/best-tutorial-videos-for-wordpress-plugin-writing/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 08:17:48 +0000</pubDate>
		<dc:creator>pbu</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://corpocrat.com/?p=3174</guid>
		<description><![CDATA[<p></p>
<p>Writing WordPress plugins  on your own can be difficult at first, unless you are experienced wordpress developer who perfectly understood the core functionality of wordpress. Fortunately wordpress plugin writing is easy to master once you have understood the basics.  I have compiled some the the youtube videos and i found ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://corpocrat.com/wp-content/uploads/2010/12/wordpressplugin.png"><img class="alignnone size-full wp-image-2182" title="wordpressplugin" src="http://corpocrat.com/wp-content/uploads/2010/12/wordpressplugin.png" alt="" width="400" height="218" /></a></p>
<p>Writing WordPress plugins  on your own can be difficult at first, unless you are experienced wordpress developer who perfectly understood the core functionality of wordpress. Fortunately wordpress plugin writing is easy to master once you have understood the basics.  I have compiled some the the youtube videos and i found pretty interesting to follow up and learn if you are new to wordpress plugin writing.</p>
<h3>WordPress Plugin Writing in 10 Minutes</h3>
<p><iframe src="http://www.youtube.com/embed/t7CevqOPHD4" frameborder="0" width="420" height="345"></iframe></p>
<h3>Making your First WordPress Plugin</h3>
<p><iframe src="http://www.youtube.com/embed/ZeJKU-99NVg" frameborder="0" width="560" height="345"></iframe></p>
<h3>How to Make a WordPress Plugin</h3>
<p><iframe src="http://www.youtube.com/embed/cl7YhWpA17w" frameborder="0" width="420" height="345"></iframe></p>
<h3>Developing your First WordPress Plugin</h3>
<p><iframe src="http://www.youtube.com/embed/t5TeK_t3wp0" frameborder="0" width="560" height="345"></iframe></p>
<h3>Plugin Development Best Practises<br />
(Part 1 to 4)</h3>
<p><iframe src="http://www.youtube.com/embed/PIa0n8rbUFQ" frameborder="0" width="560" height="345"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://corpocrat.com/2011/09/11/best-tutorial-videos-for-wordpress-plugin-writing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

