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)

2
votes
0answers
47 views

add_rewrite_rule, plugin activation and plugin deactivation

I see a lot of example showing to call add_rewrite_rule in your init hook, e.g. function add_my_custom_rewrite() { add_rewrite_rule(... } add_action('init', 'add_my_custom_rewrite'); and in ...
2
votes
0answers
97 views

Saving data-URI to media library

I have a TinyMCE plugin that generates PNG images using HTMLCanvasElement.toDataURL() (MDN). Currently, I'm just displaying them on the backend by putting the data-URI in an image tag, but I'd really ...
2
votes
0answers
303 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 ...
2
votes
0answers
383 views

Customizing the 3.5 “Add Media” popup (Backbone.js)

Here's yet another question in regard to the new(ish) 3.5 "Add Media" popup and how to customize it! What I'm trying to do I'm attempting to do four main things: 1) Create a custom tab titled ...
2
votes
0answers
171 views

Can I use core's “or Link to Existing Content” feature in my plugin?

When adding a link in the TinyMCE editor, you get a nice search with ajax function that searches your existing content and lets you select from it. Is it possible/reasonable to re-use this in a ...
2
votes
0answers
81 views

Singular name Plugin localization

I'm trying to localize the singular name of a custom post type. ... 'singular_name' => __('key', 'plugindomain') ... I created a .po and compiled it as .mo. I also loaded the translation using ...
1
vote
0answers
23 views

Deleting taxonomy terms and relationships on a custom post_type when a user is deleted

First off, I have a custom plugin that registers a custom post_type. When a user signs up on the site, a post is created using the custom post_type. The post is populated by the user's company name ...
1
vote
0answers
48 views

tinymce.get() returns error after ajax request

In the backend, after an event I make an ajax request which populates certain fields. The problematic field is the textarea, for which I use wp_editor like so: <?php $settings = array( ...
1
vote
0answers
53 views

Modify how gallery.js builds the shortcode [gallery …] in tinyMCE?

The post editor helpfully removes default arguments like columns="3" from the [gallery] shortcode. How do you tell it to remove a custom attribute that has a default value? The answer at Enhance ...
1
vote
0answers
31 views

Upgrade Private Plugin without Deleting

I've seen numerous questions asking a way to update a private plugin by checking to self-hosted repository, or update plugin from personal API, but my question is quite different. As we all know, if ...
1
vote
0answers
233 views

Should I use spl_autoload_register() in my plugin?

When I use spl_autoload_register in my plugin, I get: Fatal error: Uncaught exception 'LogicException' with message 'Class wp_atom_server could not be loaded' ...
1
vote
0answers
46 views

Widget options are not updated

I'm creating a plugin which creates a widget with some options. I've extended the WP_Widget class: class Dynamic_Player_Widget extends WP_Widget { function Dynamic_Player_Widget() { ...
1
vote
0answers
756 views

How to set a custom path, for ajax image upload folder in admin?

I am coding my first Wordpress plugin that handles some data for a custom (shop-like) post type. It also has an image uploader within a metabox, where you simply drag in your images and it ...
1
vote
0answers
30 views

Including a meta box on a plugin page

I want to include the 'Comments' meta box (the one usually seen on the post creation page) on my plugin's admin page. Is there a way to do that? I am aware of how you can use add_meta_box() to add a ...
1
vote
0answers
148 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
0answers
54 views

How to remove default style of header in wordpress metabox

I have the problem which when I create a header in my wordpress plugin metabox, it always apply the default style on my header: even when I apply, my own style, <h3 style="background-color: ...
1
vote
0answers
22 views

Is there a directory my plugin can write files to that cannot be viewed via the browser/url?

I want to restrict access to some files uploaded via the admin interface but I cannot rely on the ability to use .htaccess (could be turned off, or they might be using a non-apache web server). I ...
1
vote
0answers
93 views

Custom code for WordPress dynamic menu

Without using plugins, how can I create a custom WordPress navigation menu to produce the following code? <div class="bottom_section_full"> <div class="bottom_section_left ...
1
vote
0answers
125 views

How to instantiate customize_save_after callback function?

I have to do some custom operations after settings are saved in the customizer. It looks like the callback function isn't invoked. What am I doing wrong? Something to do with the Ajax status of the ...
1
vote
0answers
308 views

Plugin generated virtual pages

I am currently devloping my first WP plugin. This plugin should generate dynamic pages on the fly if a fixed non-existing URL is requested. This means I want my installation to accept addresses like ...
1
vote
0answers
57 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
0answers
70 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 ...
1
vote
0answers
46 views

Plugin templates vs Parent Theme

I've been building a plugin using a WooCommerce like template system, where the plugin houses the default templates, but allows for overriding via a template folder in your active theme. It just ...
1
vote
0answers
105 views

How to redirect users to their profile after they successfully edit their profile

I am using the buddypress plugin for wordpress and would like to make a little change... I was wondering, if there was a way I could redirect users to their profile page after they save the edits to ...
1
vote
0answers
77 views

I have 2 plugins using the same wp_login action hook and one is not working

so this is after a few hours investigating, I have s2member plugin and a custom plugin what happens is they are both using wp_login hook in this manner, s2member: add_action("wp_login", ...
1
vote
0answers
40 views

How to use github to update my plugin

I am trying to use github for my plugin updates, i have looked around I found this WordPress-GitHub-Plugin-Updater. I am now stuck and cannot get it to work. I have created the simplest plugin to ...
1
vote
0answers
44 views

Selectively update themes in WordPress multisite

I have been running a WordPress multisite installation for a few years, and every time WordPress releases an update (from x.y.z to x.y or x.y.z to x.y.z) there is always a chance that one of the ...
1
vote
0answers
40 views

remove add new post, if there is already one post

I have a custom post type, but I want to allow only one post. if the user posts then the add new post should should be disabled or removed. so only post is allowed of that custom post type. If the one ...
1
vote
0answers
127 views

Help writing custom function with rewrite endpoint that generates a page from dynamic content

I'm creating a WordPress plugin that will pull content from an API and display it dynamically on a WordPress blog like it's native content. An example of this content would be company locations. I ...
1
vote
0answers
44 views

Create a custom capability to allow an 'Editor' to edit only 'Subscriber' users

I want to create a new "Moderator" role (in between Administrator and Editor), that can edit only "Subscriber" type user accounts. I can create the role and add existing wp capabilities, but I don't ...
1
vote
0answers
164 views

Create attribute for woocommerce on plugin activation

I want to create attribute on plugin activation.By below code,i'm able to create attribute in database table prefix_woocommerce_attribute_taxonomies but these attributes are not showing (or listed ) ...
1
vote
0answers
50 views

How to analyze wordpress plugin performance

Is there any plugin that I can use to determine the performance of the plugin that I'm writing? I'm currently checking out the following plugins to determine any problems that might cause low ...
1
vote
0answers
496 views

how to use shortinit in wordpress

I want to load a minimal resources in Wordpress because the server that I'm working on is very slow. I tried defining short init in the wp-config file: define('SHORTINIT', true); But then I got ...
1
vote
0answers
476 views

How can I save a multiple select array with the settings API for a plug-in options page?

I'm thinking this may be more of a problem with my PHP rather than my use of the settings API, but I can't seem to get Wordpress to save an array of data for a multi-select box. The multi-select box ...
1
vote
0answers
75 views

Wordpress daily cron is executing more frequently than once a day

I have a wp cron job scheduled based on what's in the options. In this case its schedule daily. add_action('init', function(){ if( !wp_next_scheduled('product_posting_cron') ){ ...
1
vote
0answers
50 views

Wordpress Localization and Templating

I'm using Smarty Templates for the back-end and Handlebars for the front-end for the plugin that I'm building. It's only now that I discovered that the localization doesn't work when I declare my ...
1
vote
0answers
77 views

Unable to delete custom post types, confusion around capabilities

So I'm working on a plugin for creating a questions/answers system that's as simple and well-integrated as possible (not unlike this site) but am stuck at the creation of the custom post types. You ...
1
vote
0answers
43 views

Ordering taxonomies by rank

I'm using a function (copied and modified a bit from this question ) which displays taxonomies in order by rank with » between parent and child and | between terms, but I get a mistake in the html ...
1
vote
0answers
241 views

Getting wp.me shortlink for wordpress custom post type

There is a button called "get shortlink" for wordpress builtin post type & pages. If we click on it we can get wp.me shortend url for that particular post This can also be got using the function ...
1
vote
0answers
288 views

Post added via wp_insert_post with category doesn't show in category listing

I've created a plugin that auto creates a post and attaches a category to it, which is then hidden from the main blog and only shows in the category listing... I can successfully add a new post via ...
1
vote
0answers
67 views

Possible to get all posts with my shortcode?

So here's what I'm trying to do. I'm building a plugin for a business directory. Each business is assigned to a category. There are two views, listing and detail. To give the user as much ...
1
vote
0answers
691 views

How to bind data-src attribute for the image in the post using jquery?

I'm trying to use foresight.js for responsive image in the wordpress blog. For that I have to add the data-src attribute in the place of src in the <img> tag. Or I have to get the url from the ...
1
vote
0answers
120 views

permalinks with get variables

I'm trying to create my own permalinks with wordpress rewrite API. I have been registering my get variables as it follows add_filter( 'query_vars','driver_vars' ); function driver_vars( $vars ) { ...
1
vote
0answers
284 views

Mamp Pro features like virtual hosts in Xampp or Wamp?

A friend of mine showed me the virtual hosts feature within Mamp, its pretty nifty. Using git and mamp pro to work locally makes it really easy to set up staging for WordPress sites. Was wondering if ...
1
vote
0answers
72 views

Link Pop-up in custom plugin

I am trying to build a plugin, for one of my current task, and at a field it requires user to provide the URL their content would link to. I have added a text-box where user could paste the link they ...
1
vote
0answers
40 views

Problems with cron

I have a this code that delete some post meta at al 7:55 hour of the server: if ( !wp_next_scheduled('borra_meta_datos') ) { wp_schedule_event( mktime(7, 55, 0, date('n'), date('j')), 'daily', ...
1
vote
0answers
21 views

How ( and mostly at what time ) can i prevent the alternate cron from running?

I'm using the alternate cron version, but i need to prevent it from running on some calls, how can i do this? In the cron.php file i've seen on line 225 if ( defined('ALTERNATE_WP_CRON') && ...
1
vote
0answers
61 views

gallery option is not available in media upload box in costum theme option page

Hi everyone I am creating a theme in which I have to created a sponsor upload image gallery on the admin panel in theme option page and its slide show on the front panel for this I follow tutorial to ...
1
vote
0answers
65 views

Add a new confirmation page before saving

I'm going to add a hook that does some modifications of the text before saving. Before making the changes permanent, I would like the user to confirm the changes after a "save_post" hook. Is there a ...
1
vote
0answers
105 views

add_settings_field Data not passing to Options Page Like it should

I am creating an options page with some fields. As you can see from the code below, I only have one field registered. However, when I try to send that field to my options page, it does not display the ...