wordpress-plugin-dev

Wordpress Database $wpdb versus get_option()

So I have been developing plugins that create interact and delete to a database by using the get_option functions. I have now seen some tutorials showing how to use the global $wpdb way of getting values from the database. What is the difference between the two, and is one better than the other? ...

Modifying wordpress plugin markup

Is there a 'good working practise' way to modify the markup that a wordpress plugin produces without editing the plugin's core files. The problem i foresee is that when you update the plugin, the markup that you would have modified overwritten. I know in drupal there are template overrides, but i don't know enough about wordpress to do ...

Inserting Wordpress Plugin content to posts

Hi All I am trying to learn more about Wordpress and creating plugins. I have seen an existing plugin use a technique where you can add a 'reference' to it within your posts and WP will parse it and replace it with the plugins own content. The example i am referring to is the NextGen gallery which uses the following code [nextgen id=9]...

User permission - triggering code on user role (Wordpress)

I'm developing a custom plugin in PHP so existing plugins are not usable. What I want to achieve is that I want to display different url within a post for some users . For users that are registered in wordpress, contacted me and are 'approved'. I want to set up this extra user profile field so I can use this field in a condition. So gues...

Is possible to use built-in wordpress post selector on my own plugin admin page?

Hi Guys i have a wordpress plugin for create photoalbums, now i need to associate albums to a specified post, for that, need when build a new album to select a post, have thought to use a system like "attach media to a post" that visualize an ajax post selector, is possible to reuse on my plugin this system? ...

treeview/hierarchy structure in wordpress

could anybody suggest solution how to display data in treeview like format in wordpress. There is no plugin for that. I want to display something like table of content. Not talking about pages/categories from wordpress itself. I found this jQuery plugin that can be used to display my data. I cannot edit and store data using this plu...

Wordpress Authenticate Filter

Hi All, I'm currently trying to override Wordpress' wp_authenticate function (without modifying the core files, mainly pluggable.php), however I'm not sure if I'm going about it the correct way. There are two great references (see below), but they don't explicitly state what to do in order to prevent the login provided certain criteria ...

How to add new custom submenu under another plugins menu

There is plugin called Shopp in my WP admin page , this plugin has got top level menu "Shopp" . This is the top level menu: $menus['main'] = add_menu_page('Shopp', 'Shopp', SHOPP_USERLEVEL, 'shopp-orders', array(&$this,'orders')); And I've created some plugin which need to add as submenu under "Shopp" top level menu , so it is adding...

Make Wordpress tinyMCE Editor looks like Dreamweaver code highlight in HTML view

¿Anybody know a plugin or something who makes tinyMCE Wordpress editor in HTML mode highlight the xhtml code for better editing? Thanks ...

How do I make a new top level menu in Wordpress?

I want to create a new Menu in the admin panel of Wordpress for my new plugin. Just like 'Tools', 'Users', 'Settings', I want a new item, 'My Plugin'. I'm aware of the function add_menu_page(), but how do I use it? What is the code for doing this? thnx! ...

Wordpress API: Add / Remove Tags on Posts

I know it seems like a simple operation, but I can't find any resource or documentation that explains how to programmatically add and remove tags to a post using the post ID. Below is a sample of what I'm using, but it seems to overwrite all the other tags... function addTerm($id, $tax, $term) { $term_id = is_term($term); $ter...

how many (generic ?) class wordpress have ?

what i meant with generic is those class that create by non lead wordpress programmer. i just start reading the source code directly and encounter a class who name filereader and i use it to read stream of file. Is there any other useful class ? i would like to know so i can utilize it when work on wp ? I know this is a question spesi...

is there any way to hook a debug function into a hook such as init and retrieve every php function whose operates there ?

is there any way to hook a debug function into a hook such as init and retrieve every php function whose operates there ? what i meant with PHP function is its name ? is it possible to retrieve any php function name via php built in function ? ...

Wordpress: How do I convert a generated URL (permalink) to a pretty URL?

In a plugin, I am generating a paginated link to a category, i.e. http://localhost/?cat=17&paged=5. The category is known by slug and id. Is there a way to have this URL converted to the user defined "nice permalink" format, i.e. http://localhost/category/foo/page/5? (Assuming we're running Wordpress 2.8/2.9+) Edit: Since there ar...

Manage widgets from page edit screen

Hi there. I'm looking to find a way to integrate the widget control area into the page edit screen. For the site I'm making it would be perfect with the same drag and drop functionality. I want a list of the available widgets that I can drag and drop into the page widget area. The widgets will then only be shown on that particular page...

Wordpress plugin - add a new page

Starting out with Wordpress plugin development - how does a plugin add a page to Wordpress that utilizes the current theme? For instance the plugin would create a page at this URL: http://wordpress/plugin-name/start This page should display a form using that utilizes the current theme. At the end of the day I'm going to replace the cur...

Sequential Order of Wordpress Hooks?

hello, can anybody help me. is there any documentation about sequential order of wordpress hook ? especially for action and filter in backend ? ...

I need to block my feed completly

i'm in need a solution via coding. on how to completely hide my blog feed. I know how to optimize related hook and filter such as 'the_excerpt_rss' and 'the_post_rss'. And also understand how to limit access or make my blog private. so, the question is more about howto blocking feed access without make my blog private ? i hope the sol...

How to make WordPress "Add/Edit Post" form more Tumblr like?

Hi, WordPress requires you give each blog post at least two fields: a title and text body content. I'm wondering how to modify WordPress admin so I can sometimes enter a single field for a blog post, in particular a URL, without WordPress requiring a title (related but not the point of this question: a custom theme would then know how ...

WP plugin based on useragent

I am writing a plugin which does some js stuff, but does not work for other browsers than FF . I've thought why not execute the plugin for the browsers which support it. I've added the code, but for some reason when I activate the plugin and check the site with a FF all I get is blank page. If I visit with a IE the site is shown correctl...