The tag has no usage guidance.

learn more… | top users | synonyms (1)

0
votes
1answer
455 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 ...
3
votes
2answers
495 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 ...
1
vote
1answer
29 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 ...
31
votes
6answers
7k views

Where can I find a list of WordPress hooks?

Where can I find a list of all the WordPress hooks and over-ridable functions (pluggable, scriptable, etc)? Edit: Plugin is listed here.
1
vote
1answer
60 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
42 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 ...
2
votes
1answer
333 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 ...
1
vote
0answers
91 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
3answers
485 views

How to customize this automatic slug shortener with an overrwrite function

I am using a slick little piece of code which I have included within my functions file which automatically takes any information entered into the title of a new post and create a slug with specific ...
0
votes
0answers
195 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
125 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
141 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
125 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 ...
243
votes
108answers
123k views

Best Collection of Code for your functions.php file [closed]

Please vote on the question and any answers you find useful by clicking on the UP arrow on the left hand side of the question or answer. As with many others who are now viewing this post, I have been ...
3
votes
2answers
4k views

Wordpress 3.1 - How does one add sticky post capabilities to post types

In wordpress 3.1 they finally added the option of allowing posts belonging to a custom post type to be marked as "sticky"... what I can't figure out though is how to enable this so the admin menu ...
0
votes
1answer
49 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 ...
0
votes
1answer
501 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 ...
0
votes
1answer
90 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
2answers
92 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
0answers
61 views

Override plugin php file

Is there a way to override an entire php file from a plugin? I want to customize the output of the plugin, and with how the plugin is written I can't just overwrite the one function that controls the ...
0
votes
1answer
1k 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
0answers
47 views

Override custom function in parent theme

I am creating a child theme.In the parent theme function.php there are certain files which have been included using include_once. On those files there are certain user defined under a class which I ...
0
votes
1answer
187 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
45 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
50 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 ...
3
votes
2answers
8k 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 ...
0
votes
1answer
29 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', ...
2
votes
2answers
991 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 ...
0
votes
2answers
77 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() { ...
1
vote
2answers
896 views

Using Default WordPress Custom Header Image Crop Feature in a Post Type / MetaBox

I am not sure how many of you have experimented with the new custom header image functionality of wordpress 3.0 but its actually very cool (enabled by adding the function to your functions.php file). ...
1
vote
1answer
49 views

// Nonce generated 0-12 hours ago

[x-post: SO] 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 ...
1
vote
1answer
92 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 ...
4
votes
3answers
5k 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: ...
3
votes
1answer
145 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 ...
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 ...
1
vote
1answer
584 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
98 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 ...
4
votes
1answer
827 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
1k views

Overwriting Core Wordpress Functions with Plugins

Is there a way to overwrite a core function is the Wordpress core using a plugin? I don't need to inject code, I need to replace the function entirely with a re-written version. The specific function ...
2
votes
1answer
513 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 ...
0
votes
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 ...
3
votes
5answers
2k views

Removing custom background and header feature in child theme

I am creating a child theme using twentyten as my base. I am looking for a way to remove the features of adding custom header and background without touching functions.php file in the parent theme. ...
0
votes
1answer
223 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 ...
0
votes
1answer
184 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 ...
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 ...
0
votes
1answer
252 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 ...
2
votes
4answers
2k views

Extract & Display the REAL first image attached to a post - extend the_post_thumbnail()

I have an interesting problem which I am sure someone here can solve. I have gone through a bunch of different plugins and code snippets in search for the perfect code to extract a primary image to be ...
0
votes
1answer
291 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
909 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', ...