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 [pluggable]

The tag has no usage guidance.

0
votes
0answers
13 views

Avada Masonry override html - change title tag [on hold]

Is it possible to override the file rollover.php located in Avada/includes/lib/inc/templates? I need to change fusion-rollover-title from h4 to h5. Thanks! UPDATE: it seems not possible to override ...
-1
votes
1answer
33 views

Adding placeholder text field to woocommerce checkout [closed]

I am trying to add placeholder text to checkout page but it is not displaying any placeholder text on the first name and last name.It is displaying a new text field with the palceholder text which i ...
0
votes
2answers
49 views

Overriding a plugin's pluggable function in theme's function

I came across this snippet - https://gist.github.com/mikejolley/1751128 - that creates a function with the same name as an existing WC function as a means of overriding it. I also learnt that this ...
0
votes
0answers
31 views

disable specific plugin if logged in with an administrator role

I found this trick to allow me to do what I want. This is the code : add_filter( 'option_active_plugins', 'disable_logged_in_plugin' ); function disable_logged_in_plugin( $plugins ) { // The '...
0
votes
1answer
165 views

Calling an API to do authentication / user login

I'm relatively new to wordpress and am working on a customized site. I have an API endpoint that I'd like to call to do authentication, because our users are going to have their credentials stored/...
1
vote
1answer
268 views

How do I override template-tags.php in twentyseventeen theme

I created a child theme from the TwentySeventeen theme and it seems to work. I can override the content.php file by creating a matching folder and my own content.php in my child theme. /template-...
0
votes
1answer
172 views

Call to undefined function get_userdata in user.php

My website error log is full of [lsapi:error] [...] Backend fatal error: PHP Fatal error: Call to undefined function get_userdata() in /home/.../public_html/wp-includes/user.php on line 460 ... ...
0
votes
1answer
54 views

Prevent sending emails on user creation in OOP context?

I need to block any user creation email on the site, and I tried overriding any pluggable function that is responsible for mail sending. The only thing that works is $this->loader->add_filter( '...
0
votes
2answers
131 views

How to override get_avatar() function?

I need for a specific plugin to override the wordpress function get_avatar() to bind the profile image to an other image with some condition. How can I do this ? Is there a specific hook or filter to ...
0
votes
1answer
191 views

Repeated headers in wp_mail

I am passing a custom header multiple times, for tagging reasons, to wp_mail(), but only the last instance of the header is actually getting sent. It appears that wp_mail() is filtering the custom ...
3
votes
1answer
82 views

WordPress how to override function adjacent_posts_rel_link_wp_head() in link-template.php the correct way

I'm quite new to WordPress development. I'm using WordPress 4.9.2. I'm currently working on the following issue. I have several blog categories which have no relation to each other. For example "Our ...
0
votes
0answers
991 views

Override function inside parent theme shortcode Avada

I am using Avada as my parent them and I am trying to override the fusion-faq.php file so that I can make some further customization to it. I have tried override the shortcode with no luck and am ...
0
votes
0answers
59 views

Override function in class in child theme

I have a class class Header_Constructor { function __construct() { } private function menu_html() { ...... echo $this->logo_html(); ...... } ....
1
vote
0answers
276 views

How to override Woocommerce functionality in Reports section?

I need to customize the Reports in WooCommerce, so I have to edit the core file class-wc-report-sales-by-date.php, such file doesn't use any hook. Check: https://github.com/woocommerce/woocommerce/...
0
votes
0answers
1k views

Extend plugin Class through functions.php

Move manual fix applied to plugin source code to theme functions.php or as Code Snippet I've applied a manual fix to a plugin file. I'd like to make this fix more accessible and scalable by hooking ...
0
votes
1answer
19 views

Wordpress reading old version of functions.php, breaks site

I added a function to the child theme functions.php to check if a plugin class exists. The code was something like function check_class_exists() { if (class_exists('classname')) { echo "...
0
votes
2answers
317 views

overwrite code snippet from parent to child theme

I'm trying to overwrite following code in the child theme. I want to load file /inc/soundtheme-admin.php from child folder. I copied same code snippet in child-theme/functions.php and also copied the ...
0
votes
1answer
60 views

Set up functions to be overridden without using function_exists() by short-circuiting them?

A few years ago I read an article about short-circuiting functions with apply_filters() rather than using pluggable functions via function_exists(). I love the idea because of how flexible it is- I'm ...
1
vote
0answers
152 views

Replace part of a parent-theme customizer in the child-theme

I'm created a child-theme of the OnePress theme and would like to update a part of the inc/customizer.php function. Specifically, the theme customizer adds the following control: $wp_customize->...
0
votes
1answer
110 views

Bug in pluggable.php? [closed]

Can anyone help out here? For several months by now, we start getting problems right after bringing up our website. (we had to restore old pluggable.php to avoid this error) Fatal error: ...
0
votes
0answers
63 views

Moved wordpress site new server and domain

I am trying to move a Wordpress Site to a new domain and new server. I've updated the database with the correct URL's and paths as well as wp-config.php. However when trying to access wp-admin I ...
2
votes
0answers
805 views

Postman: wp_mail has been declared by another plugin or theme

I need use Postman for send email using SMTP server, but when install show message: Postman: wp_mail has been declared by another plugin or theme, so you won't be able to use Postman until the ...
0
votes
3answers
957 views

Providing fallback function and allow override by plugin

I'm using ACF (Advance Custom Fields) plugin in my theme. This plugin provides a simpler methods get_field() which we can use in place of WordPress native get_post_meta() method. Now, the issue is the ...
2
votes
3answers
8k views

turn off new user registration emails

I would like to turn off the emails that the admin gets when a new user registers. We are getting a lot of emails because of new registrations (they are legitimate registrations) but I just don't ...
0
votes
1answer
783 views

Wordpress Registration Email by Role

I'm wanting to send out a custom html email to a new user based on their role during registration. So, I have 2 roles that will be specifically registering on the site: photographer and subscriber and ...
0
votes
0answers
146 views

How to Publish a Post Multiple Scheduled Time

I want to publish a post in WP, but not immediately. So what I am doing is like this- From this tutorial. So, I am getting only 1 time when the post will be published. But I want to the post be ...
6
votes
1answer
227 views

How to override a function when isn't at functions.php

I am trying to override a function for a theme in the child-theme but I can't get it to work. At functions.php on the theme I can see this require_once line: require_once("inc/alterna-functions.php");...
0
votes
0answers
418 views

Pluggable Function wp_new_user_notification exists too early

I have recently updated from 4.1 to 4.4 directly and I can't override wp_new_user_notification anymore. Obviously the function should not exist when the plugins are loaded. I wrote a mu-plugin with ...
0
votes
1answer
44 views

Solution dealing with Child Theme / Parent theme functions

This week I was struggling a bit customizing an exsisting theme for a client. To prevent the theme from being overwritten each update I created a child theme. This allowed me to cusomize most of the ...
5
votes
2answers
617 views

syntax for remove_filter in parent theme with class

I'm trying to remove a filter on the register_url hook a parent theme added, that seems to have a class nomenclature I can't figure out. Ordinarily, a filter for this hook would be easily added like ...
10
votes
6answers
14k views

Disable email notification after change of password

I want to disable the emailnotification if a user or an admin changes the password of a user. After some Googleling I came to find that I need to create a plugin and overwrite the ...
0
votes
1answer
2k views

How to override filter in child theme?

I'm trying to override a parent theme filter in a child theme; I must have the syntax wrong as the override is being completely ignored. Here's what's in my child theme's functions.php: //* remove ...
4
votes
1answer
795 views

How to overwrite a JavaScript core function?

Since the newest WP version 4.3.1, there's a change in the WordPress core JavaScript file: /wp-admin/js/edit-comments.js At line 376, the WordPress dev added a check for how many table columns there ...
1
vote
2answers
278 views

override pluggable.php functions

I just not only want to override a pluggable function (wp_new_user_notification) but I want to make sure that if any other plugin is overriding the same function, so my function , override that too or ...
1
vote
1answer
564 views

Current user in plugin returns NULL

I am currently developing a plugin and I am trying to make use of the $current_user global. class Something { public function __construct() { $this->get_user(); var_dump( $this->user )...
0
votes
1answer
1k views

How to override this theme function in child theme

I'm working in a child theme and I need to override a function in order to remove some unwanted items on a top menu. So I have research a bit and found a lot of docs, really, like this, this and this ...
0
votes
1answer
1k views

remove_action not removing add_action from constructor

I am trying to replace a message from a function that got hooked in a constructor from a class from woocommerce. This is what I tried to remove the message: What I tried. function remove_actions() {...
0
votes
0answers
515 views

Integrate WP Tiles into existing loop (index.php) and theme

I want to integrate WP Tiles directly into our Wordpress theme and into our existing loop but their documentation is pretty thin and I can't find much in the way of examples so not really sure how to ...
1
vote
0answers
413 views

Override default new user registration email with custom message (non sub-domain multi-site installation)

My problem is as follows. I have a multisite running on a non-sub-domain install. I am trying to customise the welcome email a user receives upon registration. I managed to customise the welcome ...
0
votes
1answer
166 views

save_post hook - headers already sent?

I'm trying to create a very simple alert for each time a post is created or updated with the below... add_action( 'save_post', 'updatedAlert' ); function updatedAlert() { echo '<script>alert("...
3
votes
2answers
711 views

Editor access to plugin settings

I'm trying to give access to an user with the role Editor to this plugin settings page: https://wordpress.org/plugins/commenter-data/ In the code of this plugin on line 31 of commenter.php there is ...
0
votes
1answer
1k views

Override email_exists function

I am trying to override the email_exists function to modify the way it works slightly. It is not listed as a pluggable function so I am unsure how to go about it. I would like thef following to ...
1
vote
3answers
99 views

Best way to modify a plugin with no hooks and no pluggable functions?

I have to make some changes to some functions in a plugin that don't have hooks and aren't pluggable. My idea was to wrap the functions I modify in a if ( ! function_exists()) and move my ...
0
votes
1answer
69 views

pluggable function in theme, to be overridden by plugin

Is it possible to add a function in functions.php like this: // ACF if ( !function_exists('get_field') ) { function get_field() { return false; } } and then let ...
2
votes
2answers
8k views

Is it possible to override this function/class in a child theme?

Is it possible to override this widget function from a parent theme? I saw this blog, but it dealt with a simpler case. http://venutip.com/content/right-way-override-theme-functions parent class ...
0
votes
1answer
44 views

Overide enqueue in non plugable function via child theme

I am trying to override a non-plugable function using the information on this page but it seems to have no effect. Can anyone see what's wrong. My code is remove_action('wp_print_styles', '...
3
votes
1answer
2k views

function triggered by “manage_users_custom_column” filter not working

I am trying to add a custom column un users.php but it stays empty. I have successfully added a column to the users admin page with this code in my theme's functions.php file: function ...
0
votes
1answer
271 views

Removing sensitive information from comment notifications - notify_post_author

Basically I need to remove or comment our lines 1114 - 1116 in pluggable.php, and edit line 1113 These are the lines $notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->...
4
votes
1answer
1k views

How does Wordpress resolve permalinks internally?

I am doing some deep modding of the rewrite system and custom post_types but before I can continue I must find out how WordPress handles the rewrites. I found the function url_to_postid() but ...
0
votes
2answers
207 views

Filter a pluggable function

The following function is pluggable as it contains a filter : // Make function pluggable/overwritable if ( ! function_exists( 'wpsight_layout_images' ) ) { function wpsight_layout_images() { ...