I am doing some dev work on a WordPress website, and we would like to be able to create custom emails using the wp_mail() function. Currently the plugin is set up to work with outlook, the email tests work, and any contact forms that are being used are working as well.
We are building a quiz where your answers will be graded, we request the user to enter their email before they can see the results. Once they have entered their email the results will be displayed and an email should be sent to them that also holds the results. I have tried a number of ways of trying to call this function within the divi code module where you can use JS.
Can anyone help as to where I am going wrong or what can be done to be able to use this function. I have read the docs about this and many other articles, but none of them seem to really explain how you can call this function, or how it needs to be set up in the php if that is something that needs to be done. Any help that can be offered would be greatly appreciated! Thanks in advance
]]>Is there a way I can delete a user’s (i.e. by UID) data in Woocommerce using a function call?
I have checked the function reference but there is no one function to do this, there are multiple delete functions but I do not know which one I have to call and in what order to delete all data.
By law/tax/etc I do not have to keep data after 3..5 years so I can delete data, which I want to do.
I want to do this for many plugins and many users, but I do not want to go into the dashboard and for each plugin and each user and click three checkboxes/buttons to delete.
I want to write a function that calls functions of plugins to delete user data in one go and create a button in the user panel to do the lot, including Woocommerce.
I just want to bypass to do this for each plugin through the dashboard.
]]>Is there a functioncall to write in my template.php file to find out if the acrual reader of my page is member or not?
Thanks in advance,
Richared
]]>https://www.ads-software.com/plugins/social-warfare/
]]>I am developing a plugin for my website. When I am trying to call a function from my plugin’s menu page it says Call to undefined function though function is there.
Code looks like this:
file 1-
[ Moderator note: Code fixed, please wrap code in backticks or use the code button. ]
class abcd{
..
function admin_menu() {
add_menu_page('ABCG', 'ABCD XYZ', 'manage_options', 'abcd', array('abcd_gui', 'options_page'));
}
..
}
File 2-
class abcd_gui extends abcd{
function search($a,$b,$c){
..
}
function options_page() {
''
search($a,$b,$c);
..
}
}
Everything else works fine but when I try to call a function like search over here. It says Call to undefined function.
What is the problem ? I am new to wordpress development, Solutions are appreciated.
]]>It seems that in file ” wp-content/plugins/user-role-editor/includes/class-ure-lib.php “
at line 72, the function is_plugin_active_for_network is called.
But ! In the WP codex, it’s explain that this function is provide by the file ” /wp-admin/includes/plugin.php “.
And after taking a look, it seems that the dev forgot to include that file…
I just add
” require_once( ABSPATH . ‘/wp-admin/includes/plugin.php’ ); “
befor the call and everything work again.
Trace of the chage :
BEFORE :
protected function init_options($options_id) {
global $wpdb;
if ($this->multisite) {
$this->active_for_network = is_plugin_active_for_network(URE_PLUGIN_BASE_NAME);
}
AFTER :
protected function init_options($options_id) {
global $wpdb;
if ($this->multisite) {
require_once( ABSPATH . ‘/wp-admin/includes/plugin.php’ );
$this->active_for_network = is_plugin_active_for_network(URE_PLUGIN_BASE_NAME);
}
Good luck for you !
https://www.ads-software.com/plugins/user-role-editor/
]]>I have some code that includes the following line:
add_filter(‘the_content’, ‘disp_ssharebar’,1);
Is it possible to write a second line to make sure the disp_ssharebar() function is called on 404 pages?
I have tried using add_filter(‘404_template’, ‘disp_ssharebar’, 1), but that didn’t work.
Thanks,
Mads
I’ve managed to include custom navigation for my category posts by calling a function like this <?php blah_pagination(); ?>
from within the category.php template.
The function itself resides in functions.php and looks like this: https://pastebin.com/G1TNrTnv
For some reason it cannot be called in the same way from the single post (single.php and content-single.php) template.
Is there another, improved way to do this? Why won’t it work?
My php skills are limited and I’m done guessing…
Here we go:
1. Upload the contact-extended folder to the /wp-content/plugins/ directory.
2. Activate the plugin through the ‘Plugins’ menu in WordPress.
3. Enter you contact information on the options page Settings > Contact Us.
4. Display the information using either the shortcodes or function calls.
I have both the shortcode and function call. I just don’t know where to put them. I have look everywhere for this information. This is for a “contact us” plugin. I just want to put it in the contact us page.
Thanks!
]]>