Senior & Expert PHP Developers Discussion Forum by Nyros Technologies

HIRE PHP Expert Developers Programmers Coders From India
PHP .Net Ruby on Rails Developers Community, Nyros Technologies, Kakinada
 
Log in  or IF not a member please REGISTER
Username:
Password:   


Keyword
Log in | Profile 

How to add actions and filters in wordpress

 
Post new topic   Reply to topic    Senior & Expert PHP Developers Discussion Forum by Nyros Technologies Index -> Content Management Systems
View previous topic :: View next topic  
Author Message
Thirupathi



Joined: 01 Dec 2009
Posts: 116

PostPosted: Tue Jul 20, 2010 3:52 am    Post subject: How to add actions and filters in wordpress Reply with quote

Hi Friends, I posted here the topic regarding "How to add adctions and filters in wordpress".

//This filter is to convert all the WordPress instances to WORDPRESS in the posts content

add_filter('the_content',array('WordPress2WORDPRESS','the_content'));
class WordPress2WORDPRESS{
function the_content($content){
return preg_replace('/WordPress/','WORDPRESS',$content);
}
}

//This action is to add the my custom menu in admin area of wordpress

add_action('admin_menu',array($news,'news_add_pages'));
function news_add_pages()
{

add_menu_page( $this->page_title,
$this->menu_title, $this->access_level,
$this->plugin_dir, array ( $this , 'main_page'), $this->imgUrl.'pageFlip.gif' );

add_submenu_page( $this->plugin_dir, __('Categories', 'news'),
__('Categories', 'news'), $this->access_level,
'categories', array( $this, 'categories' ) );
add_submenu_page( $this->plugin_dir, __('Images', 'news'),
__('Images', 'news'), $this->access_level,
'images', array( $this, 'images' ) );

}

It might be helping you,
Thank you,
Thirupathi.J.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Senior & Expert PHP Developers Discussion Forum by Nyros Technologies Index -> Content Management Systems
Page 1 of 1

 latest topics 
 Topics   Replies   Author   Views   Last Post 
No new posts How to select limited sites in addthis share
0 rajkumar 12 Wed Sep 08, 2010 7:16 am
rajkumar View latest post
No new posts Capitalize First Letter Of Every Sentence in php
0 rajkumar 8 Wed Sep 08, 2010 5:47 am
rajkumar View latest post
No new posts seo test
1 admin 314 Tue Sep 07, 2010 10:54 am
chrisadam View latest post
No new posts How to change joomla urls as SEO friendly
2 aababu 168 Tue Sep 07, 2010 10:50 am
chrisadam View latest post
No new posts Passing numeric as a string
0 holepro 40 Sun Sep 05, 2010 3:55 pm
holepro View latest post
No new posts How to call cross domain requests in ajax using php
1 Sanjana 54 Fri Sep 03, 2010 10:54 am
AnilKumar View latest post
No new posts how to delete plugins in openinviter
2 aababu 275 Wed Sep 01, 2010 7:27 am
aartylamba View latest post
No new posts ERROR IN PAYPAL PRO
0 tapati 49 Tue Aug 31, 2010 12:35 pm
tapati View latest post
No new posts file_exists always return false
0 orenk 149 Mon Aug 16, 2010 9:49 pm
orenk View latest post
No new posts problem with include fuction
0 bluearrow 148 Mon Aug 16, 2010 1:02 pm
bluearrow View latest post





Hire an expert PHP developer / coder / programmer or development team from India now!!

Other Forums : Ruby on Rails   ::   .Net   |   Free unlimited HTML CSS Joomla Wordpress Drupal templates download

Nyros Technologies   |   Developers Blog   |   Kakinada City Portal   |   About PHP Experts   |   More