Information Technology Reference
In-Depth Information
IV
This section is about installing the plug-in and setting up the default settings:
function install() {
// settings
This section creates the FollowMe badge, with the default settings configured. Notice the link to
FollowMe's own style sheet, which you can also edit in the Plugin Editor:
$plug_url = plugins_url('wp-followme/followme-style.css');
$header_cont = '<link href=”'.$plug_url.'” rel=”stylesheet” type=”text/css” />';
$followme_settings = array(
The snippets mentioned in followmerize represent the muscle of the plug-in:
The background color is defined.
When a mouse clicks on the top area of the badge, you link to the Twitter page defined in the
Settings page, http://twitter.com/wpburn by default.
When a mouse clicks on the bottom area of the badge, you link to the plug-in home page.
'culoare' defines the badge color in hexadecimal code. This can be defined on the Settings
page.
'twitteracc' is the defined Twitter account.
'margintop' and 'leftright' define the badge's position on your blog page.
'followmeus' is a setting that allows you to point to the account of your multiauthor blog
(Follow Us, not just Follow Me).
Although you can edit this file directly, you can also use the Follow Me Settings page (refer to
Figure 15.5):
'snippets' => array(
'wp_head' => $header_cont,
'wp_footer' => '<div class=”followme_r”><div class=”followme”
style=”background-color:#59B7FF”
onclick=”window.open(\'http://twitter.com/wpburn\')”><noscript><center>JS<br
/>is<br />off</center></noscript></div><div class=”ili_right”
onclick=”window.open(\'http://wpburn.com/wordpress-plugins/wp-followme-plugin\')”
><noscript><a href=”http://wpburn.com/wordpress-plugins/wp-followme-plugin”>Get
it</a></noscript></div><div class=”ili_left”
onclick=”window.open(\'http://wpburn.com/wordpress-plugins/wp-followme-plugin\')”
><noscript><a href=”http://wpburn.com/wordpress-plugins/wp-followme-plugin”>Get
it</a></noscript></div></div>',
'culoare' => '59B7FF',
'twitteracc' => 'wpburn',
'margintop' => '150',
'leftright' => '_r',
'followmeus' => 'followme'
)
);
Search WWH ::




Custom Search