Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [plugin-development]

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.

-1
votes
0answers
12 views

Including WP-Load Causing Issue on PHP - MySQLi Prepared Statement

I have a custom php file and trying to run WP_Query there by including the wp-load.php file there. The file is simply getting some data from external table like require_once "config.php"; $myArray = ...
0
votes
0answers
9 views

Looking for split screen debate forum Wordpress plug-in

I'm trying to find a debate forum Wordpress plug-in that'd function much like the example image below. Any suggestions? The difficulty has been finding something that's split-screen (left & ...
1
vote
2answers
30 views

Memory Leak in plugin action

I made a plugin that basically reads a CSV file and imports data to relevant tables. However, the action seems to create an error: Fatal error: Allowed memory size of 134217728 bytes exhausted (...
0
votes
1answer
11 views

Shop Manager role cannot edit pages using WPBakery Page Builder

I'm using both WPBakery Page Builder version 5.4.7 and Woocommerce version 3.5.1 on a site I'm working on. Even with the settings enabled for the Shop Manager role to access and use the Visual ...
0
votes
1answer
16 views

Why after a file is programmatically deleted, is there still a reference in the media library?

I work on a plugin that gets a file uploaded to the upload folder through media. The file is processed if it does not meet x condition the process is aborted and the file is deleted. The deletion is ...
0
votes
1answer
15 views

Integrating colorpicker into array field

I am using this code and i am trying to show a colorpicker onto an array field. Any ideas, how to do it? <?php class Smashing_Fields_Plugin { public function __construct() { // Hook ...
-2
votes
0answers
19 views

Webmail not working in Gmail [on hold]

I have connected my webmail server to Gmail so that any email come to my Cpanel webmail will directly transfer to Gmail. Recently i have uploaded my website to Cloudflare. After uploading, my webmail ...
0
votes
1answer
13 views

add_action not calling back to function

I am working on a plugin, but add_action doesn't call the callback. The code is as follows: require plugin_dir_path( __FILE__ ) . 'includes/class-network.php'; $distro = new Classnetwork(); ...
1
vote
0answers
12 views

async code or cron job?

could you advise me on what is the best method to deal with this case. I work in a task in which when uploading a file with xlsx extension I must process the information of this file and include the ...
0
votes
0answers
14 views

LEFT Join in post_clauses filter causing 502 error timeouts (column sorting)

I'm running a column sort in my posts listing page using LEFT JOIN on a custom table that records page views. You could say I am sorting by page views. Here's what my query extra pieces look like: ...
1
vote
2answers
29 views

Self deactivate plugins after an action occurs

I'm developing a WordPress plugin. I want to download a file from a server, then unzip and put it inside the main directory of WordPress after the plugin is activated. The process of download and ...
0
votes
1answer
8 views

How to remove “Contact Form by WPForms” dashboard widget

How to remove dashboard widget which adds WPform lite plugin (free version)? Current title of the plugin is "Contact Form by WPForms – Drag & Drop Form Builder for WordPress". There is no ...
0
votes
0answers
18 views

modify attachments meta wordpress plugin

I am working on a wordpress website in which I want to replace modify attachments meta wordpress plugin as it is no longer developed. As written on the website: This plugin hasn’t been tested with ...
1
vote
1answer
15 views

js/css updating when making a plugin

I'm relatively new to writing my own plugins and there's something I can't figure out and can't seem to find an answer anywhere. Apologies if this seems obvious. My plugin has js and css files that ...
0
votes
1answer
21 views

Where to write custom logs in WordPress

I am creating a plugin in WordPress, the plugin creates logs for some events, my question is where should I write custom logs, so that no explicit file read/write permission required. I am looking to ...
0
votes
0answers
16 views

Can i use php phar to archive a wordpress plugin source files or few files only?

I want to secure main logic of my wordpress plugin. Only solution i got except encryption and obscurification is by making an archived file of my plugin source files via php phar but how and is it ...
0
votes
1answer
28 views

Backbone event attachment:compat:ready can't hook

I want to ask question about events in backbone. I have problem to run some function when hook is triggerd. I want to wp.media.view.AttachmentCompat.prototype .on("attachment:compat:ready", ...
0
votes
0answers
11 views

Show item on shop as per user vehicle what he mention his profile as a default search [closed]

i want shop page show as default item based on user vehicle what he mention in his account setting. here is account setting page http://hius.tsm.team/my-account/edit-account/ this is shop page in ...
0
votes
1answer
15 views

add_action pre_term_description vs. pre_category_description

I am trying to set a default tag and a (different) default category description in case there is none given on creation. I have found the action "pre_category_description", but no equivalent for the ...
0
votes
0answers
11 views

How to create page in admin panel. that show pending post list

I want to create new page under posts menu, that just show pending posts list. I create page under post, but i dont know what should write in function add_action('admin_menu', 'my_theme_menu'); ...
0
votes
0answers
12 views

WP_cron not updating usermeta in plugin

Does anyone know if wp_cron can update user meta on a schedule? I have a plugin that I adapted from a wp_cron outputter (lets you print all the running Cron Jobs): How to test wp_cron? When I print ...
0
votes
1answer
13 views

Auto Woocommerce user name and password from first name and last name [closed]

Is it possible to auto generate woocommcerce customer user name from first name of shipping address and password from last name of shipping address ?
0
votes
1answer
35 views

How to check whether checkbox is checked in WordPress customizer

I am building a plugin and I want to add some settings which rely on checkboxes. I know how to get data from the checkbox in PHP but got stuck in WordPress. Because we have no option to add the name ...
0
votes
0answers
19 views

plugins replacement in wordpress

I am working on a website (built on wordpress) in which I want to replace some plugins. The name of the plugin which I want to replace is Accordion Shortcodes. I am wondering what best practice I need ...
-1
votes
0answers
15 views

php count function not working

I am developing a plugin that will show users treehouse profile info. I am getting profile data in json formate and echoing out required data. The problem I'm facing is counting the number of badges ...
0
votes
1answer
21 views

How WordPress core manage the plugin installation

I'm learning about wordpress plugin creation. I've found very useful the documentations found on wordpress codex about this argument, but I've a question: How the wordpress core manage the plugin ...
0
votes
2answers
28 views

$wpdb->prepare with LIKE and sprintf

Ok, I know similar questions have been asked before but none of the answers I found seem to work. Here's my code: $sql = $wpdb->prepare('SELECT ID FROM ' . $ignore_url_table_name . " where url ...
0
votes
0answers
6 views

Gravity Forms to Word file filename issue [on hold]

I'm having difficulties changing the file name of a generated word document. Basically, someone fills out a form from gravity form, and a plugin (that I bought) converts it into a wordfile, the file ...
0
votes
0answers
17 views

Not getting register_setting callback parameters in WordPress

I'm creating a WordPress plugin using Settings API. Everything else is working fine except the callback for register_setting() function. Here is the line: register_setting( self::ADMIN_PAGE, self:...
-1
votes
0answers
16 views

wordpress admin-ajax.php 400

Playing since hours around. Getting every Time a 400 and a return of 0. $('.save-date').on("click", function () { var pickrDate = $(this).parent().parent().find('.date-pickr').val(); ...
1
vote
1answer
14 views

How do I unlock a post programmatically?

I can use wp_set_post_lock to temporarily lock a post so that only I can edit it. I can use wp_refresh_post_lock to refresh that lock. I can use wp_check_post_lock to check whether a post is locked. ...
0
votes
0answers
12 views

OpenSource WordPress Plugins, integrations: Credit and ownership - What is the nature of the beast?

This may not be the right place for this discussion as I suspect it relates more to OpenSource in general (if so, let me know and I will move it), but since it happened with a WordPress Plugin and the ...
0
votes
0answers
7 views

Groups plugin: Add date field

I am building a website for a school and I am using Groups plugin. Each group is a lesson, so I can add a student to multiple lessons-groups (the lessons that the user has passed). The question is how ...
0
votes
0answers
10 views

How do I exclude a function from running on AMP pages in Wordpress?

How do I exclude a function from running on AMP pages in Wordpress? if (!(is_admin() && is_amp_endpoint())) { function defer_parsing_of_js ( $url ) { if (FALSE === strpos ($url, '....
0
votes
0answers
8 views

Revoke membership access after refund from transaction table in memberpress

I have created custom plugin and trying to revoke member access from MemberPress course. MemberPress API is not working because we are purchasing product from third party and then creating membership ...
0
votes
1answer
14 views

wp_ajax function return the html page

I´m trying to do a plugin feature : download a file by a button click using wp_ajax feature. I already used wp_ajax but in this case I did not find my error. When I click on the button, it runs ...
0
votes
0answers
9 views

custom post to “add email” has white background - not admin

I am trying to develop a plugin that runs in the admin space. It is very simple. I'm using WP_List_Table to display a list of the items in the db. That works perfect. I have an "Add" button on the ...
0
votes
0answers
12 views

how to create public file in wp plugin to access it from other apps?

I want to write a plugin so that I can connect to it with an app bot, and store information inside the database. Note that because I directly connect to php file inside this plugin, the public ...
0
votes
0answers
9 views

Linking plugin submenu links to PHP page

First time making a custom plugin so please go easy on me! I'm attempting to build a custom plugin with an admin panel. I have created the menu without too much trouble, but I'm now struggling to make ...
0
votes
1answer
20 views

How to create a wordpress widget that dynamically changes according to the page

I am creating a plugin in which my custom sidebar widget changes content depending on the page it is loading on. One way to do this is // Register and load the widget function custom_register_widget()...
0
votes
0answers
15 views

I need to change code in plugin admin file with using another plugin don't touch main plugin

I need to change this code // wildcard postcode ? $wildcard_position = strpos( $rate_postcode, '*' ); // The rate has a wildcard match only the beginning of both if ( $wildcard_position ...
0
votes
1answer
20 views

Is admin section completely customizable in terms of styling?

Can we completely customize the WordPress dashboard in terms of appearance and style? I have uploaded the image: Or Wordpress doesn't allow such conversions. I mean the right-hand side part shown ...
0
votes
1answer
19 views

Make another copy of a plugin and install it

I'm trying to make another copy of this plugin SyncFields It contains just one file syncfields.php, So I tried to edit it and edit the functions with another name but it didn't work It appeared in the ...
0
votes
1answer
22 views

Custom admin plugin read CSV

I've made a plugin in admin, very simple. I just need to read a CSV files, put data into an array. I use this : $csv = array(); if (($file = fopen('my-file.csv', 'r')) === false){ echo '...
0
votes
0answers
13 views

How to Add Custom Value Box to Quick Edit Screen on wp-admin?

I am trying an Coding for Adding My Custom Field at Quick-Edit Page. But Not working, Can anyone help to make it work for me based on my custom function name (written below) Here is Code which i am ...
0
votes
1answer
50 views

WP REST API Custom endpoint don't work in my plugin

I would really appreciate help on this, as i have tried and tried. I have made this very simple endpoint to som basic info from a custom post type called 'ydelse'. Here is my class for the creation ...
0
votes
1answer
31 views

Buddy Press restrict the capability to edit users

im trying to modify the Wordpress capability 'edit_users' for my plugin. In my case some User Roles should have the ability to modify some other Users with an specific Role BUT not every other Users. ...
0
votes
1answer
22 views

get_posts() not working when accessing with a custom user role

I've stumbled across something that I can't seem to find any documentation on regarding WP 'get_posts' function. I've got a web application that has multiple custom post-types and multiple custom ...
0
votes
0answers
19 views

Checking and Incrementing a custom user number

I've got this function that checks when a user is created that if the option Candidate is selected it adds CAND infront of the USER ID: function fidsa_member_number($user_no = false){ global $...
0
votes
0answers
13 views

Add Cart Item meta data based on other items

I use the following function to show the discount in the cart if a product in the cart is on sale: function my_custom_show_sale_price_at_cart( $old_display, $cart_item, $cart_item_key ) { /** @...