0
votes
1answer
37 views

What exactly do this function declared into functions.php file of a WP theme?

someone can help me to understand what exactly do this function declared into the functions.php file of a theme? function exclude_featured_tag( $query ) { if ( $query->is_home() && ...
0
votes
0answers
13 views

Some doubts about the WP development IDE, how to obtain the IDE code assistance? [duplicate]

I am pretty new in WordPress theme\plugin development (I came from Java and C#) and I have the following doubt about the IDE and how to correctly handle the WordPress development process. My main ...
0
votes
2answers
33 views

How to cancel Wordpress' action/filter when using OOP with anonymous callback

Most of the wordpress plugins I found is functions based, for example, the offical akismet plugin function akismet_init() { global $wpcom_api_key, $akismet_api_host, $akismet_api_port; // ...
0
votes
1answer
20 views

Second select list values are not saved after clicking update

I have a select list in a metabox which value is saved successfully after clicking "Update" when editing post. Of course, the values are custom taxonomies. But i don't know how to add another select ...
0
votes
1answer
16 views

Save data of select list after clicking save

I already have a meta box in the edit post that has a select list with custom taxonomies. But after i save the post the select list returns it value to none, so i don't know how to save the selected ...
0
votes
1answer
22 views

Removed jQuery script from header.php , any problems?

To avoid multiple jQuery calling from my theme and plugins, I removed <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ...
0
votes
1answer
30 views

How to prevent plugins from loading jQuery

I recently downloaded a free plugin from wordpress.I want to remove the plugin from loading jQuery because you experts know that it is already loading from wordpress header.php file. The plugin is ...
0
votes
1answer
27 views

See output of a sql query while plugin installation in wordpress

Doing wordpress plugin development, I am creating a table (while installing the plugin) with the following string: $sql = "CREATE TABLE (query skipped)..."; /*someting*/ For example: I have this ...
0
votes
2answers
53 views

Resize Image without cropping

Currently I’m working on a WordPress plugin and as part of it users can upload Images. What I want to do is that these uploaded images of any size will be resized to 100px by 100px without cropping. ...
0
votes
1answer
44 views

How to access global variable $menu inside a class function

am puzzling why can't i access the global variable $menu inside a php class function class adminMenus { public function getWPdefaultmenus(){ global $menu; return $menu; } } using ...
0
votes
0answers
35 views

How to link PHP pages not included in menu?

I'm developing a plugin which has basically four pages in menu, each page contains a form that the action value should link to another page (not included in menu). My questions are: how do I link the ...
0
votes
1answer
50 views

Accessing Variables Used In a Plugin Using PHPStorm + XDebug

I'm currently attempting to use XDebug 2.2.1 and PHPStorm 7.1 to debug my WordPress plugin. So far, I've successfully installed XDebug and breakpoints are working fine. However, I'm unable to access ...
0
votes
0answers
81 views

Adding a dropdown list box to the comments page

I'm creating a plugin that will add a dropdown list box as an additional field on the comments page. The data in the dropdown is not being added to the MySQL database. Can someone take a look at my ...
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
1answer
42 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 ...
1
vote
1answer
63 views

Making Quote Plugin more efficient

I've been working on this plugin the past couple of nights and have been jotting down idea's of how to improve it. My knowledge of php isn't the strongest and I'm learning as I go along most of the ...
0
votes
1answer
53 views

Saving an array to get_options

I'm trying to save an array to get_options in wordpress, I'm aware that I don't have to serialize the array due to get_options doing that. At the moment I don't get any success of failed message upon ...
0
votes
1answer
21 views

Permission error on plugin save

When I pass a quote to the input field and save it I get this error message in wordpress - I'm using the latest installation version. Error "You do not have sufficient permissions to access this ...
0
votes
0answers
23 views

Saving plugin data returns “You do not have sufficient permissions to access this page.”

I'm developing a quote plugin which will save a quote to the WPDB using a form to input the quote. I've created half this code and got the other piece from another programmer on here. I'm looking to ...
1
vote
1answer
107 views

Saving Plugin settings to the database

I'm not a complete novice with php or wordpress but am wanting to approach this problem the most efficient way so believe asking here will help. I've got a plugin that randomly generates a quote - ...
1
vote
0answers
46 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 ...
0
votes
3answers
103 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
103 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 ...
-1
votes
1answer
25 views

What can I do to customize a widget provided with this plugin? from where have I to start?

I am using this WordPress plugin to create an immage gallery: http://wordpress.org/plugins/easy-media-gallery/ This plugin provide a single widget inside it and I would customize some litle function ...
0
votes
1answer
50 views

Plugin Breaking Wordpress Login

Two issues with this plugin, please help... 1 My plugin is breaking my /wp-admin to where all I get is a white screen instead of forwarding to the login screen, which is also broken when this is ...
0
votes
1answer
17 views

How to get site homepage from plugin?

I am creating a plugin that has a preview, kind of like the theme customizer preview. It displays the users site in an Iframe. The issue is that I can't seem to be able to get the users homepage using ...
0
votes
0answers
25 views

How to add a handler for a button in plugin?

I am working on my first plugin, and I am having some confusion. I am trying to figure out how to set a handler for a button on my plugin UI. Here is how the button is displayed: <li ...
0
votes
1answer
96 views

Execute Jquery when a specific page in my plugin is loading

I am building a plugin and I would like to be able to hide the wordpress admin side menu and top bar when a specific page is shown(or menu item clicked)? Should I call the jquery directly as a ...
1
vote
1answer
77 views

Wordpress Plugin Page is Loading in Admin Content Container Instead of Separate Page

I am creating a wordpress plugin that has it's own UI. It looks like a standard web application, so everything that is done within the plugin is handled in this UI instead of integrating it with the ...
0
votes
0answers
30 views

get_post_templates lists one item with gibberish

This code at the bottom of this question draws a listing of page templates on the edit post screen. The problem is that on the listing of page templates on the page editor as well as at "Appearance ...
0
votes
0answers
56 views

Customized Upload File Control not saving the files URL as value

I have modified a customized version of the Upload File control so that I could upload mp4 videos and use the media library. The control seems to be saving the videos as 'Array'. After uploading a ...
1
vote
1answer
39 views

Instantiate class to be available to all plugin functions

I'm developing a plugin for a site that has to communicate with several non-wp tables in a database. For that I made a class that contains all of the MySQL-related functions. When you declare a ...
0
votes
0answers
28 views

Can anyone tell me why I can't edit a plugin when it is installed without having to re-install?

I am using a shortcode plugin as a framework for the short codes I want to add that go with my theme. I decided to just include the plugin in a repo for the user to dl so I am not building theme right ...
0
votes
0answers
14 views

Alternative ways to make ajax requests in wordpress [duplicate]

I'm currently having a problem with working with AJAX. Well not really a problem since I can pretty much do what I want to do. The only problem is my boss saying that the admin-ajax.php file is an ...
0
votes
1answer
41 views

How can I get plugin meta data without knowing the plugin folder?

I am looking to get meta data about an installed plugin from another plugin. Theoretically, to get the version, I could do: $data = get_plugin_data( 'expected_plugin_folder_name'); $version = ...
0
votes
1answer
29 views

How to get Wordpress Adminmenu items?

I want to get all the menu items in the admin menu in the backend. To be clear, the menu which is generated from /wp-admin/menu-header.php. How can I do this, I see that plugins for instance ...
1
vote
1answer
105 views

Best practice for show data to one specific user?

I'm attempting to build a locked page on wordpress (through a plugin) that shows differant data, depending on who signs-in. Essentially it has three screens, as follows: If you sign-in as the admin ...
0
votes
1answer
238 views

Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions

At first I thought it was a browser issue, but it looks like my code only sets a cookie if the user is logged in the administrator. If you are not logged into the Administrator account then it does ...
0
votes
0answers
91 views

Create and update Custom Cookie based on multiple GET and POST Values for first time visitors?

I am not exactly sure the most efficient way to write this code. I collect custom data in my forms and also in my url via get such as: Name utm_campaign URL Referrer ID Among many more. Do I ...
1
vote
1answer
53 views

wordpress plugin is not activating from widget

I am just creating a plugin in wordpress. In this plugin I am trying to create a widget, In that widget it will show a title, input text and text area in the widget section and when the values will be ...
0
votes
1answer
228 views

Using flickr api in custom wordpress plugin

I'm currently trying to add flickr api to my custom wordpress plugin... and am failing. :( I was trying to use this tutorial, Getting Started With Flickr API, to learn the basic code structure and ...
0
votes
1answer
52 views

Create “new pages” within the admin section of plugin

Here is my situation, I'm trying to create my first plugin for Wordpress, but I'm having an issue of trying to change the display within the plugin admin page. Here is what I currently have: As ...
0
votes
1answer
49 views

Toolbar Hidden in a Virtual Page

I am trying to create a virtual page, but my admin toolbar is not showing up. This is how I am creating the virtual page: functions.php add_action('init', function() { ...
0
votes
0answers
19 views

Errors with paginating custom table [duplicate]

I have this code for a custom table with pagination. But my error is that it is not redirecting to paged_numbers. And additionally, it produces a 404 error. My code is: add_filter( 'the_content', ...
0
votes
0answers
47 views

make data result from mysql as link

I'm not really a good web programmer but I wanted to try. I want to make my result from database as a link for example I want "click here" as click would redirect to a new page or something. and I ...
0
votes
1answer
102 views

Do I require the use of nonce?

Im creating a visit/page views counter with ajax,jquery and php, I have been reading a few articles that recommend the use of nonces for data manipulation through ajax, however i am not sure if i need ...
0
votes
1answer
40 views

Wordpress rewrite question

I am new here and have a question about URLs in WordPress. The very front-facing portion of my website uses WordPress just so I can use the CMSs and blog for my SEO. I have a real estate portion of ...
0
votes
1answer
127 views

Using Nonce for my Form

Essentially I need to verify my data using a nonce, but I'm not sure that I'm doing it right. What I'm trying to do is remove a menu option for a user that isn't an admin. If a checkbox is checked and ...
0
votes
0answers
43 views

WordPress Menu Targeting

Okay so I'm building out a plugin that generates a list from the $menu and possibly $submenu. I want to loop through that array and generate that list by the menu_slug, but I cannot seem to figure out ...
0
votes
1answer
511 views

Create new folder and upload files to custom folder via wp_handle_upload

I am using wp_handle_upload to upload files from a theme template file. if ( ! function_exists('wp_handle_upload') ) require_once( ABSPATH . 'wp-admin/includes/file.php' ); $uploadedfile = ...