English flagItalian flagKorean flagChinese (Simplified) flagChinese (Traditional) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroatian flagDanish flagFinnish flagHindi flagPolish flagRomanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flagSlovenian flagUkrainian flagVietnamese flagAlbanian flagEstonian flagGalician flagMaltese flagThai flagTurkish flagHungarian flagBelarus flagIrish flagIcelandic flagMacedonian flagMalay flagPersian flag

You need to upgrade your Flash Player to version 10 or higher.

Okay, we all remember is_supporter, but things aren’t that easy with pro -sites anymore… I have been reading all over the web people trying to get info on these. They want to do things like wrap a admin menu in a check so that if there not a premium user, the menu isnt shown. They want to display a custom nag to non-paid up users.. So after alot of googling and a jackpot in the code, Here are the functions and parameters. THanks to well documented code..

 

/**
* Check if a given site is Pro or at a given Pro level
*
* @since 3.0
*
* @param int $blog_id optional – The ID of the site to check. Defaults to current blog.
* @param int $level optional – Check if site is at this level or below. If ommited checks if at any level.
* @return bool
*/
function is_pro_site($blog_id = false, $level = false) {
global $psts;
return $psts->is_pro_site($blog_id, $level);
}

/**
* Check if a given user is a member of a Pro site (at any level)
*
* @since 3.0
*
* @param int $user_id optional – The ID of the user to check. Defaults to current user.
* @return bool
*/
function is_pro_user($user_id = false) {
global $psts;
return $psts->is_pro_user($user_id);
}

/**
* Check if a given site is in an active trial
*
* @since 3.0
*
* @param int $blog_id required – The ID of the site to check.
* @return bool
*/
function is_pro_trial($blog_id) {
global $psts;
return $psts->is_trial( $blog_id );
}

/*
* function psts_levels_select
* Print an html select field to choose level for an external plugin
*
* @param string $name Name of the form field
* @param int $selected the level number to select by default
*
* @return echo html select
*/
function psts_levels_select($name, $selected) {
global $psts;
$psts->levels_select($name, $selected);
}

//depreciated!
function is_supporter($blog_id = false) {
return is_pro_site( $blog_id, apply_filters( ‘psts_supporter_level’, false ) );
}

//depreciated!
function is_supporter_user($user_id = ”) {
return is_pro_user( $user_id );
}

//depreciated!
function supporter_feature_notice() {
global $psts;
$psts->feature_notice();
}

//depreciated!
function supporter_get_expire($blog_id = false) {
global $psts;
return $psts->get_expire($blog_id);
}

 

Embeds all albums from a facebook page into a wordpress page. Simply drop the shortcode and have all albums displayed automatically

Manage your wordpress photo gallery via your facebook page.
Add a photo or album to your facebook page, and have this automatically reflected on your website!

Other plugins require you to specify album id numbers to embed. This requires updating your site each time you add a new album! Use this plugin to AUTOMATICALLY embed new albums and photographs directly to your photo gallery inside wordpress.

Also works with lightbox to create lightbox effect around your facebook images while never leaving your website!

 

-In Final Development- -Coming Soon to the WP repository!-

 

I wanted Analytics360 to be visible to the editors of a particular website. I found the appropriate threat on the net that explained it, and set about doing it. But then I noticed that the code had changed a bit since the last post, thusly making the workaround display the api settings page to editors (no good!).  So, what I did, was change all instances of ‘manage_options’ to ‘moderate_comments’, inside analytics360.php but then I duplicated the function that created the menu, and put it and the original behind an IF/ELSE statement and removed the creation of the settings page in the appropriate place, and voila. settings page for admin, analytics page for admin and editors!..

The code to replace is the a360_admin_menu function in analytics360.php starting at line #635.. Replace that function with this modified function

function a360_admin_menu() {
	if (current_user_can('manage_options')) {
		add_options_page(
			__('Settings', 'analytics360'),
			__('Analytics360°', 'analytics360'),
			'manage_options',
			basename(__FILE__),
			'a360_settings_form'
		);
		add_dashboard_page(
			__('Dashboard', 'analytics360'),
			__('Analytics360°', 'analytics360'),
			'manage_options',
			basename(__FILE__),
			'a360_dashboard'
		);
	} else {
	if (current_user_can('publish_posts')) {
		add_options_page(
			__('Analytics360°', 'analytics360'),
			'publish_posts',
			basename(__FILE__),
			'a360_settings_form'
		);
		add_dashboard_page(
			__('Dashboard', 'analytics360'),
			__('Analytics360°', 'analytics360'),
			'publish_posts',
			basename(__FILE__),
			'a360_dashboard'
		);
	}
	}
}

 

 

So, to modify the href tag for the image widget plugin output. just open up /views/widget.php and add rel=”nofollow” inside the echo string on the 6th line. Here is a copy of my code

<?php
echo $before_widget;
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
if ( !empty( $image ) ) {
	if ( $link ) {
		echo '<a rel="nofollow" class="'.$this->widget_options['classname'].'-image-link" href="'.$link.'" target="'.$linktarget.'">';
	}
	if ( $imageurl ) {
		echo "<img src=\"{$imageurl}\" style=\"";
		if ( !empty( $width ) && is_numeric( $width ) ) {
			echo "max-width: {$width}px;";
		}
		if ( !empty( $height ) && is_numeric( $height ) ) {
			echo "max-height: {$height}px;";
		}
		echo "\"";
		if ( !empty( $align ) && $align != 'none' ) {
			echo " class=\"align{$align}\"";
		}
		if ( !empty( $alt ) ) {
			echo " alt=\"{$alt}\"";
		} else {
			echo " alt=\"{$title}\"";					
		}
		echo " />";
	}

	if ( $link ) { echo '</a>'; }
}
if ( !empty( $description ) ) {
	$text = apply_filters( 'widget_text', $description );
	echo '<div class="'.$this->widget_options['classname'].'-description" >';
	echo wpautop( $text );			
	echo "</div>";
}
echo "<div>";
echo $after_widget;
?>