The tag has no usage guidance.

learn more… | top users | synonyms (1)

2
votes
0answers
33 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: ...
0
votes
0answers
11 views

Get the user_activation_key link

I don't know why but my Wordpress website won't send mail to new registered users. I'd like to know if you know a code that I can add into my functions.php file that will allow my wordpress website to ...
0
votes
0answers
17 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
16 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 ...
4
votes
2answers
46 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 ...
0
votes
2answers
100 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
88 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 ...
3
votes
1answer
250 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
1answer
46 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
86 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
96 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
0answers
381 views

PHP Warning: Cannot modify header information - headers already sent by

I am very new to Wordpress development (and Wordpress in general). I am trying to copy a site to my local environment and I am having issues. I grabbed the files (via git) and database. However, when ...
0
votes
1answer
318 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
212 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 ...
0
votes
0answers
187 views

Override A Plugin Variable And Function Via Functions.php

Is it possible to override a variable in a plugin function without altering the plugin? The closest thread I found to answer this problem is this one : Pass A Value From Outside To A Plugin Variable ...
1
vote
0answers
162 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
63 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 ...
2
votes
2answers
137 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
300 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
54 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
54 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 ...
1
vote
1answer
2k 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
32 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', ...
0
votes
1answer
628 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
100 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)'), ...
2
votes
1answer
462 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
90 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() { ...
0
votes
1answer
551 views

Undefined constant error in pluggable.php

Ok, so to preface this question, I think this error is caused by the plugin I am developing. I actually am trying to create a v2 of the plugin, and every time I try to overwrite the plugin files in ...
1
vote
1answer
62 views

Nonce generated 0-12 hours ago

In WordPress there's a nonce generating/verifying mechanism, and I'm having trouble understanding why it's not working correctly... At a point it checks for whether the nonce was generated 0-12 hours ...
2
votes
1answer
109 views

Overriding a function in wordpress

A theme that I bought is adding unnecessary inline JS code that is not needed in the front page. /* Scripts - dynamic css */ add_action('wp_footer', 'upme_custom_scripts'); function ...
3
votes
1answer
153 views

Why allow overriding crucial pluggable functions wp_verify_nonce and wp_create_nonce?

Among the functions in /wp-includes/pluggable.php are the functions wp_verify_nonce and wp_create_nonce. Both functions are very important in the protection against CSRF-attacks. However, it is easy ...
3
votes
2answers
11k views

Adding a second email address to a completed order in WooCommerce [closed]

Before I ask this question, I know there is a (legitimate) hesitation to answer questions here about Woo products since they have their own support and their users should be encouraged to use that. I ...
1
vote
1answer
1k views

get_avatar() default image not working as of wp 3.5 [closed]

As of upgrading to wp 3.5 the get_avatar function started not pulling in my default backup image. This has worked for many years this way and curious to why it would stop. I am using the normal use of ...
2
votes
2answers
1k views

Convert hyphen to underscore in permalinks

I would like to use underscore in my permalinks instead of hyphen. Current permalink: www.example.com/2013/01/hello-this-is-a-test-post/ Desired permalink ...
1
vote
1answer
686 views

Override pluggable functions in a plugin?

WordPress has a file called pluggable.php which contains a list of functions you can override in your plugin. The problem I am facing (I am overriding wp_authenticate) is for each blog in my network ...
3
votes
1answer
103 views

How to prevent deleting of comments when deleting a post

Like the title says: How can i prevent Wordpress from deleting post comments when i delete a post? What i am trying to accomplish is that i want to merge all comments from different posts to posts ...
2
votes
1answer
566 views

redirect pages with no content, instead of 404 error, using max_num_posts?

I have a site that has changed its pagination structure, resulting in a huge amount of 404 errors (more posts are being shown per page than previously, so there are lots of pages that were once ...
1
vote
2answers
4k views

Customized wp_new_user_notification

Customized wp_new_user_notification I'm kind of inexperienced with it comes to editing Wordpress functions, yet i'm currently trying to customize wp_new_user_notification in order to personalize the ...
0
votes
1answer
250 views

Form Submission Warning: Cannot modify header error only when plugin is deactivated

I have created some custom post forms that I'm now using in place of a plugin called WP User Frontend which allows you to post and edit from front end. These post forms we're working great but when I ...
2
votes
1answer
1k views

Removing custom meta box added in parent theme

I am using a child theme, and wish to change one of the meta boxes defined in the parent theme. The meta box is for 'pages' only. I tried using the remove_meta_box in my functions.php, but it has no ...
4
votes
3answers
6k views

How do I call wp_get_current_user() in a plugin when plugins are loaded before pluggable.php?

The current result is "PHP Fatal error: Call to undefined function wp_get_current_user()" which makes sense, but doesn't help. I need to use $current_user. Here is the code I'm currently using: ...
0
votes
1answer
275 views

How to Override A Function in ms-functions.php

I want to execute my own welcome new user email notification instead of function welcome_user_msg_filter(){} located in ms-functions.php I recently learned how to override functions in pluggable.php, ...
7
votes
3answers
1k views

How to override pluggable function in theme?

All the documentation I've encountered discusses overriding pluggable function via your plugin. What if you're doing theme development instead? My functions.php requires another file that overrides ...
0
votes
1answer
314 views

How to add custom function to pluggable.php

I am working on a WP plugin and I want to add a custom function to pluggable.php (located in /wp-includes). I am calling that function from admin.php (located in /wp-admin) eg. Consider the function ...
1
vote
1answer
968 views

How to override wp_insert_comment()

I am trying to override wp_insert_comment() (wp-includes/comment.php). I added the following lines of code in my functions.php file, located in my theme : add_filter('wp_insert_comment', ...
4
votes
1answer
900 views

How do I “replace a function via plugins” in WordPress?

I'm new to WordPress and am not understanding their docs. What I'd like to do is to replace the wp_hash_password (and a few other password related functions) with my own. I've already written the ...
3
votes
2answers
519 views

Override user authentication with external credentials

I'm working on a site running WordPress along with a vBulletin forum. The user base is registered on vBulletin. I need to allow users to appear logged in on WordPress as well for the sole purpose of ...
0
votes
1answer
194 views

Cannot Modify Header Info Error on updating User Profile

I keep on getting this error on updating a user: PHP Warning: Cannot modify header information - headers already sent by (output started at /wp-admin/includes/update.php:134) in ...
-1
votes
1answer
773 views

External Authentication

I currently have a website with its own user authentication. It also has 3 separate installations of WordPress in its subdirectories, each loading data from 3 separate databases. What I would like to ...
0
votes
1answer
2k views

Warning: Cannot modify header information - headers already sent

I've just received this error/warning after trying to upload an image, any ideas what it means and what I can do to fix it? Warning: Cannot modify header information - headers already sent by (output ...