WordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins.

learn more… | top users | synonyms (1)

0
votes
1answer
28 views

How to replace settings in WordPress plugin from a theme

I created an array with some default settings in a plugin, and want to allow it to be replaced from functions.php in a theme without using stored data (eg. add_option). I want this to be just a hook ...
1
vote
1answer
22 views

How to exclude certain files from the plugin editor?

Is there a way to tell WordPress not to list certain files of my plugin in the Plugins -> Editor screen?
0
votes
2answers
68 views

How to use get_sidebar in plugin folder?

I've created the plugin that adds custom post type and custom taxonomis for this post type. Templates for the post type and the taxonomies are located in plugin folder. Now I need to add sidebar for ...
-2
votes
1answer
28 views

Getting Plugin directory and url

In one of my theme the path and directory is set by if( !defined('ADMIN_PATH') ) define( 'ADMIN_PATH', get_template_directory() . '/admin/' ); if( !defined('ADMIN_DIR') ) define( 'ADMIN_DIR', ...
0
votes
0answers
31 views

Web System Architecture

We are building a web system in wordpress. I have read some articles on how to architect a wordpress web system. I really liked the one which suggested using loose MVC Pattern. I have read a couple ...
1
vote
3answers
124 views

What are the benefit in adding hook in the init() hook?

I see a lot of plugins using this approach to add a new hook, e.g. add_action('init', function() { add_action('SOME_LATER_HOOK', xxx); add_filter('SOME_LATER_FILTER', yyy); }); Why they don't ...
1
vote
2answers
54 views

add javascript files only when plugin is called?

I'm writing a WP plugin that might be called on any page using a simple function call:getDeck(Deck_id) - and i'd like to add my javascript files on pages where this function is called ONLY, as ...
0
votes
0answers
121 views

using hyperlink in wordpress plugin

Im developing wordpress plugin . I added a plugin to the admin menu . After clicking on the plugin is displayed user login. (I used parameter-magic func from the wrapper function ...
0
votes
0answers
1k views

WordPress Plugin: Global Update

Hi I want to be able to make a plugin that will check for updates of other plugins that i have made from a single place. In my main plugin file i have include_once( 'class-login-slider-updater.php' ...
1
vote
1answer
72 views

wp_dropdown_roles() to replace option value = code

I'm trying to replace a hardcoded dropdown list of roles in a plugin. Currently this is the code: echo '<select name="xf_user_role_' . $id . '" id="xf_user_role_' . $id . '">'; ?> ...
0
votes
1answer
68 views

Ajax, jQuery and Wordpress

I'm having trouble getting AJAX and jQuery to work with WP, and wondering if someone can point me in the right direction. I have a form, and I want to pass the data from the form to a PHP function, ...
0
votes
1answer
58 views

Remember the meta value with radio buttons

I've created a simple meta box consisting of two radio buttons: yes or no. When they click on the appropriate box, it saves the meta value to the database. However, the post page does not remember it ...
1
vote
0answers
48 views

Wordpress Custom field Colors

I came across this code and would like to use it in my project. It works fine, but the problem is, I need to change those colors in the array to instead pick transparent images from url since I am ...
1
vote
1answer
69 views

Common functionality between my own plugins

I read that when creating new post types, creating a settings page, and creating a new taxonomy, you should create a plugin. So I have done that. But I have functionality, which could be generalized, ...
0
votes
1answer
186 views

How to add custom content under plugin row in WordPress admin plugin list?

I'm looking to add a custom message under my plugin in the "Plugins" page, much like the following screenshot: What action or filter should I use? Thank you!
1
vote
1answer
287 views

How to safely sanitize a textarea which takes full HTML input

I'm developing a plugin which enables the user to send HTML emails from within the WordPress admin. How should I sanitize the textarea input? It has to be able to contain the whole range of HTML tags ...
0
votes
2answers
63 views

WP Plugin Running before jQuery

I'm having problems with jQuery and a plugin, the console error says jQuery is not defined. What I don't understand is it only fails when I load it to the production server, on my local dev ...
0
votes
0answers
14 views

Problem Display Custom Post On Page

i am new in wordpress and first time i make plugin with help of tutorial i make custom post i need when i add data in custom post display on page but i still didn't find the mistake please suggest, i ...
0
votes
1answer
50 views

Using user_status in conditional with get_users to return existing users

I'm working on a plugin needing to return avatars a specific way. If the user exists in the wp_users table the code is run else a different set of code is run if the user is not in the wp_users table. ...
0
votes
0answers
47 views

What method should I use to store my plugin data (multi level menus with options on each item)

So the background on my plugin - it generates taxonomy/term filters to give you a filtering system similar to what you'd see on NewEgg where you filter your results by category/manufacturer/other ...
0
votes
1answer
27 views

remove all submenus from plugin

Is there a way to un register all submenus at once instead of using the code below? remove_submenu_page('myplugin', 'sub-page-1'); remove_submenu_page('myplugin', 'sub-page-2'); ...
-2
votes
1answer
65 views

Why haven't I see plugins using get_file_data to handle retrieving plugin version?

In terms of best practices, I'm curious as to why I haven't seen anyone using get_file_data or get_plugin_data to handle getting a plugin version (for versioning CSS/JS files). Many quality plugins do ...
0
votes
1answer
174 views

How To Remove The Filter That Adds JetPack Related Content To Dom

I am trying to remove the filter in JetPack's Related Posts module that adds the element to the DOM that the module's JavaScript populates with the related posts. Once I remove it, I can achieve my ...
0
votes
1answer
42 views

Why function hooked using object are executing at all time?

I tried to use class and object in plugin. I made a simple function with a shortcode but it is executing the function without pasting the shortcode to any page/post. class example{ function ...
0
votes
0answers
37 views

wp_register_sidebar_widget in loop within a plugin?

I'm trying to dynamically create widgets based on a posts from a post type. The code is as below. This function is pulled from my plugin class: public function initWidgets() { // Config ...
0
votes
1answer
52 views

Odd behaviour with submenu link creation

I'm trying to develop a plugin that needs to add two pages to the dashboard side-bar menu. One of these being a main category. Everything is fine, except for the second submenu item for the settings ...
0
votes
1answer
83 views

Catch own Exceptions

I build some package with my own Exception but when I try to catch a exception I got fatal error: Uncaught exception. This situation is only when method with throw is passed by add_action( 'init', ...
0
votes
3answers
65 views

wordpress plugins with add-ons

Im wondering if anyone can point me in the direction of how to create a plugin with add-ons. It looks like the approach is first to create a plugin with the core feature, and then write other plugins ...
-2
votes
1answer
87 views

Ajax Contact form plugin [closed]

I am facing strange problem .I am building ajax contact form plugin.My problem When I add jquery script in theme footer there is no problem at all everything works fine. But if I add same script from ...
0
votes
0answers
33 views

Create a Module inside the new pages admin site

I got the following problem: I have a plugin and with this plugin I want to create a module which will be visible if I create a new Pages in the admin section... like in the Picture the "Title Bar ...
0
votes
2answers
151 views

First and last name fields not filled when using wp_insert_user

I've written a plugin to allow authentication to a WordPress install via an external API. Everything is working except the first and last names are not being set for the new WordPress user created by ...
0
votes
0answers
67 views

How to show post attachment image

i am going to create a slidershow by post attachment in single.php. i use this code but the result is null. <?php if ( have_posts() ) while ( have_posts() ): the_post(); ...
0
votes
1answer
26 views

Forward an old url rewrite scheme to a new one?

I have the following url rewrite for custom post type: add_rewrite_rule( 'event/([0-9]+)', 'index.php?post_type=event&p=$matches[1]', 'top' ); Due to a site structure change, I'll ...
0
votes
0answers
33 views

Saving options for the fields on paginated pages

I am working on a WordPress plugin with some options for the fields which are working fine without pagination. I am kind of new to WordPress plugin development. The problem is I added pagination to ...
0
votes
0answers
27 views

problem with blank page

i have a real big problem with my wordpress website functions.php when i put the following code to achive post view and thumbnail. i'm getting the blank page error which when i publish or update a ...
2
votes
1answer
54 views

Tips for targeting widget dragable for WP Pointer on widgets.php page

I'm updating a widget plugin I wrote called Feature Me and am adding in WordPress pointers for first time users to help them find the widget after installing the plugin. However, I have come across a ...
0
votes
1answer
100 views

What is the use of wp_schedule_event hook?

I want to do a cron(executes function at specific time, like email,db backup etc) job. I searched in wordpress, i got this wp_schedule_event Here they say it will execute job when someone visits ...
0
votes
1answer
68 views

Apache rewrite rules and wordpress problem

I tried to fix my problem by using wordpress rewrite rules but sadly it took me so long I tried this approach. I got it working for one of my simpler problems but now I can't get it to work for my two ...
2
votes
0answers
216 views

Custom media upload content for inserting custom post shortcode

I’m working on a plugin that creates custom post type “portfolio” along with shortcode to insert in any page or post. The shortcode is: [portfolio option1=“1” option2=“0” option3=“1” ] And it works ...
0
votes
0answers
33 views

Building a plugin: use offset values, save to database, call values on frontpage in loop

I first posted this on StackOverflow, but now I realise that this is probably more suited for this site. Updated 26 Feb. 2014 I already that this question will be quite elaborate, so for everyone ...
0
votes
1answer
63 views

Set user ID at time of wp_create_user

I'd like to add a new user to the WordPress user table. The code for wp_create_user works fine but it is adding the user incrementally to the next available ID in the user table. Instead, I want to ...
0
votes
0answers
36 views

remove_action(“wp_ajax_function”, “function”); not working

I have the following code in a file called contact-form.php. The file lives here: wp-content/themes/NAMEOFTHEME/ (premium theme) function theme_contact_form() { // some code here (send mail when ...
0
votes
0answers
50 views

captcha not working in my custom plugin

I am trying to create a contact form with captcha, but captcha not working. I created captcha image by this in another file and stored value in session: //I already have start session and the ...
0
votes
1answer
66 views

Use options to control jQuery plugin

This may be a dumb question, but I've been teaching myself Wordpress and I've been struggling with this for a while. What I want to do is use a Wordpress control panel page to control a countdown ...
0
votes
3answers
180 views

How to list the Hooks and order of execution in current loading page?

I need to know the list of hooks that are called in the current page . How to identify the priority assigned to the action and filters in the action . If i want to remove the default action on ...
3
votes
1answer
110 views

How to Loop Plugin Option Field Set?

Problem/Background Currently, I'm creating a plugin for a client that will enable them to mark and modify predetermined Google Map polygons (displayed on the site) in the dashboard. I want to let ...
3
votes
1answer
65 views

How to Structure a New Role/Capability Scheme?

I have a situation where I need users to be flagged as "Instructors" on a site. That role should basically be whatever the user's current role is with the added capability to see comments from ...
1
vote
1answer
1k views

Creating a WordPress admin page without a menu for a plugin

I am writing a plugin, that will list a number of entries from a custom set of tables. I added the main page for the plugin using the following WordPress functions: // Add menu and pages to ...
0
votes
0answers
30 views

how a query can use local parameters in plugin function?

I've wanted to add a custom post type, so i've done a plugin to put on/off this post type. i have widgets inside the plugin in order to print posts with this custom type, that call more or less a ...
0
votes
0answers
22 views

Remove Certain Fields From Review Form?

I'm using a plugin called WP Customer Reviews and I want to remove some fields that are currently required to fill in. How can I remove certain fields from the review form. I'd like to remove the name ...