Articles of filters

Echo string in admin panel footer beside version no

can anyone help me out about how to showing something lets say “Hello World” beside the version no that shows up in the wp admin dashboard footer? I’ve already tried the action named admin_footer and then via css I’ve floated it on right, but it doesn’t show up as a single string, beside overlap one […]

How to change default text for specific post type

Prelude: Let’s say the text “Comments are closed” is a default WP String and you wanna change that text string to something else like “Hello World!” if is_singular(‘post-type’) is true. Issue: Now, I do know that there is a plugin called Say What? which does this exact thing, you just have to provide the string […]

How can I get the default content of WordPress post?

Is there a way where I can get the default output of the_content in WordPress post? Some of the plugin is using add_filter to the content to add their desired result like related post plugins where they add the result at the end of the content of a post. What I want to happen is […]

Why current_user_can('edit_comment') always true?

I am always getting TRUE for current_user_can(‘edit_comment’); on two different installations of WordPress (4.2.2 and 4.2.4) no matter what role the user is. Even when the user is logged out. I tested this on a clean WP install and got the same result. Why would this be?

How to customize category_description()?

In a website I am working on ,there are 50 categories + sub categories, each has a a very long description text, then in an archive page I display all the titles of the categories + their description ,but it makes more sense to show the title of each category + a few words of […]

I've set up an extra field for all the available widgets. How do I show it's value in the front-end?

Thanks to another great post here I managed to set up an extra field (called “subtitle”) for all WP Widgets. Now I am trying to make all WP widgets display the value of this extra field (naturally, after_title, since it’s the subtitle), but I can’t quite figure this out. Here is the code I use […]

Modify WP_Post before processing

I am looking for a way to modify WP_Post object before it’s processed and displayed on the page. Reason – I built my site when WP was still in version 2.0, or even earlier. I didn’t attend to it for a couple of years, but now I’m back making updates. First version of my site […]

remove/hide wp-editor

I have created a meta-box for a certain page_template. So if the adminpage is loaded with the template it shows the metabox. This does not require the wp-editor to add content. So I would like to hide or disable it. I have searched the interwebs but they all came up with the disablement of the […]

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 and replace parent filter function child_remove_parent_function() { remove_filter(‘filter_name’,’parent_function’); } add_filter(‘filter_name’,’child_function’); //* my custom function function child_function($link){ //* function code here return […]

Change Password Strength Indicator names?

Is it possible to change the labels for “Weak, Medium, Strong” etc… in the Password Indicator that’s used in the user profile? I’ve been asked to change the word “Weak” to “OK” since this level of passwords is acceptable for our subscribers. Is there a filter I can hook into?