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
0answers
38 views

Access WordPress Tag Function From Modal

I am currently working on a plugin that will require the use of the Tag library inside the given WordPress installation. From a page, the user can click a button from the editor, which then opens a ...
0
votes
1answer
22 views

Get section of input passed to the sanitize_callback

How can I find out what section each input is in when viewing the $input array passed to the sanitize_callback function defined in register_setting()? I suppose one option is to include the section ...
1
vote
0answers
51 views

Manually set a custom admin sub-menu selected?

This question might have been asked already, and if so I apologize but none of the other answers pointed me in the right direction. I am developing my first Wordpress plugin. Lets say it contains the ...
1
vote
1answer
43 views

How can I edit commit messages in my wp-hosted plugin repo?

I stupidly committed code with a commit message that doesn't make sense. I looked up how to edit commit messages for SVN repos and read this stackoverflow post, however, unfortunately it seems like I ...
1
vote
1answer
38 views

Extending WP_List_Table seems getting wrong with $this->get_columns() - what's wrong?

I'm trying to implement an Admin Table for a view page of a plugin of mine by following the following tutorial: Create Native Admin Tables In WordPress The Right Way    by Jeremy ...
0
votes
1answer
43 views

Why this plugin is not working?

I am testing jQuery in my wordpress plugin. Two files 1. main_plugin.php 2. js_plugin.js (Both in the same directory HelloWorld). CODE: PHP FILE: <?php /* Plugin Name: jQuery Test Plugin Plugin ...
0
votes
0answers
24 views

Custom post not working on template page

I am using promotion-slider plugin. I am writing <?php echo do_shortcode('[promoslider]') ?> but it has been very inconsistent. As sometime posts are coming some time it does not. I am not able ...
1
vote
2answers
85 views

Plugin updates, version dependencies, and backwards compatibility

Let's say I have a plugin that's currently at version 1.1, and I am releasing version 1.2. When you run the 1.2 update, a script will run to add new options, columns, tables, etc. A month later, 1.3 ...
0
votes
1answer
29 views

A question about add_action()

I was following this ( http://codex.wordpress.org/Plugin_API ) tut on codex. The part where a class is created and is called in add_action. No argument was passed to emailer::send ? Why? It was ...
0
votes
0answers
33 views

Updated plugin uses old source codes

I am a beginner with wordpress. I am developing one simple plugin for WordPress 3.9.1 now. My wordpress instance is deployed on openshift. I am facing one big problem. When I try to install plugin ...
-3
votes
2answers
41 views

Is it possible to load plugin from console with core ?

I developing some scrapping plugin for my own purpose. So each 10 minutes i need to start my plugin from the cron. Plugin will parse some posts from other pages and add it to wp. So is it possible to ...
2
votes
2answers
35 views

What's the earliest point I can get the queried object ID?

I'm writing a supplement plugin to Wordpress Mobile Pack because I would like to use the default theme on pages that are assigned a certain page template. My plugin will only deal with the mobile ...
0
votes
0answers
22 views

Redirections the right way inside a plugin directory

I have a plugin, with the stylesheet: /wordpress/wp-content/plugins/pluginName/templates/templateName/style.css I'd like to access: /wordpress/pluginName/templateName/style.css I know I could ...
0
votes
1answer
23 views

Execute certain function on GET request

I am currently designing a plugin which will export some data in admin panel, only when a GET parameter export=data is passed. In normal PHP it will do something like: <?php ...
1
vote
1answer
39 views

Custom Plugin theme filter

I am creating custom plugin and in my plugin file I have this: add_filter('page_template', 'load_tq_templates'); function load_tq_templates() { if (is_page( 'transport-quote-1' )) { if ( ...
0
votes
2answers
32 views

Plugin generating unexpected output - on WP mysql dump import

I am developing my plugin and I am getting this error: The plugin generated 357954 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with ...
0
votes
2answers
88 views

Post curl function save twice using plugin hook function wordpress

when i save a data with my curl function using hook to save a data twice. public function __construct() { add_action('init', array(&$this, 'init')); ...
8
votes
1answer
4k views

How are bulk actions handled in custom list table classes?

I'm working on a custom data table to display in the WordPress dashboard. The table populates from a database table I built in a plugin. I've been using the provided WordPress Custom List Table ...
0
votes
1answer
39 views

Wrapping shortcodes in another shortcode

I'd like to wrap existing shortcodes in post content inside a new shortcode that I'm adding to my plugin. The existing content looks like this: Some text - could be <span>HTML</span> or ...
0
votes
1answer
26 views

Cannot update …/tags folder in SVN Repository

Could you please supply (I'm stupid) step by step process of what I'm trying to do? Thanks! I uploaded my first plugin using tortoiseSVN. With some difficulty, I got the files into the /tags dir but ...
0
votes
1answer
26 views

Why is my plugin version 0.1?

If you look at the changelog, it says my version number is 1.0.0. If you look at the button to download, it says 0.1. Also, if you hover over it (or click it), the url says 1.0.0, and the svn ...
0
votes
3answers
1k views

Creating custom field with drop down on new post page

I Am trying to create a default custom field drop down with pre populated values from the DB to be shown while creating a new Post or editing a existing post. I am aware about how to add a single ...
4
votes
1answer
131 views

Must-use plugins autoloader: How to use get_plugins() correctly?

My autoloader class is responsible for loading must-use plugins that do not sit in the root of the mu-plugins folder. To locate them, I need to use the get_plugins() function. According to Codex, the ...
0
votes
0answers
39 views

Why is there a code error in my plugin's search description?

So, I have finally uploaded my plugin to the WordPress list, but when I search for it an error comes up in the description: I don't even have that line of code in my trunk/ Going into the plugin ...
0
votes
1answer
40 views

Avoid class name collision when using third party libraries in plugins?

I am currently developing a Wordpress plugin handling very specific behaviours in our new Wordpress website. I started by reading the introduction articles in the Codex, and I also found the Wordpress ...
0
votes
1answer
39 views

Link to a admin submenu item using a custom link

Situation: I am developing my first Wordpress plugin with multiple admin pages. This plugin has a menu and some submenus in Admin Menu. I am using Wordpress 3.9 on XAMPP, Windows 8.1 Pro. Problem: ...
0
votes
0answers
27 views

Proper Failure of Plugin Activation

I am currently developing a plugin, which depends on another plugin (json-api). I use the following code to check for the presence during startup and in the constructor, in case the json-api plugin is ...
0
votes
1answer
30 views

wp_ prefix changed. What is the way to change so any prefix is understood?

I have a plugin with a line calling wp_capabilities. This works with the default prefix. If someone changes the prefix to something else (bluehost scripts do this), how do I fix this code? Can you ...
1
vote
1answer
218 views

How to remove plugin-specific custom taxonomy terms when plugin is uninstalled?

I'm trying to write a class that would allow for easy removal of all plugin-related data when the plugin is uninstalled. Specifically, I want it to remove plugin options, custom post type entries, and ...
1
vote
3answers
52 views

Checking if an attribute exists in a shortcode

I've written a small plugin that spits out html for a button. It works great, except for one thing: If the user doesn't specify an image, the image appears broken. Is there a way for me to check and ...
0
votes
1answer
16 views

plugin will not offer update even though a new version is available

I made a plugin, made revisions to it, and commited it again, yet in the admin area under plugins, I do not see under my plugin that an update is available. So I had, say, version 1.2.0 , and now I ...
0
votes
0answers
27 views

Duplicate WP3.0 menu php files?

He's my problem: I want to have a single page that a WP-admin can build by including different parts of the site by choosing posts. (I know the admin could add these posts to a category and then ...
0
votes
1answer
27 views

How can I pass value to function in add_menu_page?

I was use to pass value to function for the below menu. add_menu_page('Competition Manager 2013-2014', '2013-2014', 'manage_options', 'manager_2013_2014', 'manager_2013_2014', plugins_url( ...
13
votes
3answers
2k views

Where do I put the code snippets I found here or somewhere else on the web?

Many posts here or somewhere else contain code, but they do not say where to put it. Example: I have found this post: How do I turn off 301 redirecting posts (not canonical)? I'm a newbie with PHP. ...
0
votes
1answer
85 views

get_the_excerpt() not working in plugin loop

I am new in WordPress plugin development. I am developing a simple WordPress plugin in which get_the_excerpt() not working in the loop. Other tags such as get_the_title(), get_the_permalink() even ...
3
votes
1answer
43 views

How to use mysql IN statement with wpdb update method?

I am using wpdb update method and wish to update records where the id is not found within multiple ids. So if I wanted to update records where each had an id of 1 I would do for example: ...
0
votes
1answer
45 views

Adding class to the parent of current-post-ancestor / current-menu-parent / current-post-parent

Following situation: I have a drop down menu. At the moment we are located on a single post of the category "Produkt Design" Its class in the menu is menu-item menu-item-type-taxonomy ...
0
votes
1answer
50 views

Hide plugin dashboard menu item for specific roles

I am writing a plugin and I am trying to only display the admin dashboard menu item to specific roles. I have this controlling snippet so far... // Check User Role global $current_user; if( ...
0
votes
0answers
14 views

How do I build a settings panel under the plugin

I'm trying to build a settings panel for my plugin that is located under the plugin on the plugin page and slides down when the user clicks the settings link like other plugins (WP Maintenance Mode) ...
0
votes
1answer
32 views

Where and how does WordPress store and use its plugin and hook information?

When WordPress installs a plugin, where does it keep the fact of a hook/plugins existence? For example, wp-includes/plugin.php I can see do_action, but I'm not familiar enough to know how WP loads ...
3
votes
0answers
46 views

What is the correct way for plugins to create tables with special charset/collation considerations?

I'm using WordPress >=3.8. The default charset/collation values in wp-config.php are define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); // Becomes utf8_general_ci I am in a situation where ...
1
vote
2answers
298 views

Preferred way to include Advanced Custom Fields in a plugin?

So I am building a plugin for a site that is already using Advanced Custom Fields (ACF). I wonder what would be the best way to include ACF in my plugin? The site is already using ACF, so is it ...
0
votes
2answers
519 views

Settings options not showing up on Sub Menu page in WordPress plugin

So I have a plugin with two user-customisable settings. (It's not complete but I'm getting the framework in place.) When the two settings are on the "general" settings page they work just fine... ...
14
votes
1answer
3k views

Settings API with arrays example

I'm using the Wrox WordPress plugin development book as a primary reference for getting started with a new plugin and I understand all settings can be saved as 1 array but the book does't give an ...
2
votes
1answer
208 views

Get image URL from media library in input

On wp-admin/post.php?post=447&action=edit for example I have a link and an input. The link appears as follows: <a href="#" class="button insert-media add_media" data-editor="tj_image_url" ...
0
votes
1answer
47 views

Why won't register_setting() create a setting?

I'm stumped. I've been researching this like crazy, but I can't seem to figure out why register_setting() isn't working for me. I'm new to WP plugin development (obviously), so it's probably just ...
0
votes
2answers
48 views

Change the search results header from plugin

Hi I'm writing a plugin to include custom search results. I'm not really allowed to edit any theme pages, but the search results page in twentyfourteen's search.php seem hardcoded to me: ...
0
votes
1answer
108 views

Use 'get' form action within a WordPress plugin admin page

I am writing a WordPress plugin that has a dashboard URL like this... http://www.mydomain.com/wp-admin/admin.php?page=my-plugin.php I have a datepicker box within the page that I use to select a ...
10
votes
2answers
407 views

Single functions.php or split into many small files?

I am creating a simple framework with theme options. I have divided chunks of code within functions.php and placed it within a specific folder structure. Now in my main functions.php file, I only ...
0
votes
2answers
528 views

Auto-Update Plugin Creating .tmp directory, not overwriting old version

I'm using this library to auto-update my plugin, but it's only extracting the new plugin files into a .tmp directory, while the old plugin files stay where they are. Can anybody help me fix this to ...