Articles of filters

How do I pass the value from a foreach loop to an add_filter function?

I’m trying to add multiple filters from inside a foreach loop. Unfortunately I can’t get the code to reference the value properly. How do I pass the value from the loop to the function? The following sets all the filters to null. foreach ( $myarray as $key => $value ) { add_filter( “plugin_filter_$key”, function( $value […]

Where is the changelog for 3.5? where is the list of added removed files?

This: is not a changelog. This: gives a few changes, etc, but no list of files added and removed. Where might I find a list of ‘breaking changes’? Actions and Filters that work differently?

Is there a way to remove or hide individual pages on the Edit Pages screen?

I want to create a handful of pages that I do not want the client to have access to through the edit pages admin screen. I do want the pages to have all the normal functionality of pages in other parts of the control panel. For example, I want the pages to show on… Appearance […]

How to remove_filter that filters iframes in posts?

This question already has an answer here: Make WordPress WYSIWYG not strip out iframe's 5 answers

Change content before writing to database

I’ve searched around but I can’t quite pin down the answer for this. I am attempting to use the content of a custom field as post_data and save it to the database as such when a post is created or updated. I need to do this in order to make a frontend posting solution work […]

Removing an action, or dequeueing style – Both not working

What I am wanting to achieve is to remove an action called inside of another action. The action is calling a style, and although I have tried to deregister, and dequeue the style, it is still displaying on the admin pages. Here is the code snippet (inside of WooCommerce): function woocommerce_admin_menu() { global $menu, $woocommerce;… […]

Custom search form to display users only

I’m trying to build a custom search form for one of my pages. I need the search form to be able to search for users. Not only will it need to search for users, but by first name, last name etc.. Something similar to this: The default WP search doesn’t allow for me to search […]

Disable widgets on specific posts

I run a horror related blog. Google is upset with me for displaying adsense in a sidebar widget for one specific post number (4603) that contains an article about an 18+ topic. How can I disable the widgets for a specific id?

Custom search page and search by title, content and tag

Can someone review my code , I need to know better solutions or any bug. Okey ! , I made a PHP file to get search results by parameters and search by title , content and tag PHP’s head look like: include(‘../../../../wp-config.php’); header(‘Content-type:text/html;charset=utf-8’); $keyword = $_GET[‘k’]; That I will bring search results by jQuery after. […]

Question about how do wordpress filters/actions work

I have a question that I’m curious. In WordPress we can add a filter or action like this code: add_filter($filter_Name, $function_will_be_hook); add_action($action_Name, $function_will_be_hook); We can pass some parameters into function_will_be_hook(). But how does WordPress know that these parameters are related to its filters/actions. Example: function my_the_content_filter($content) { $content .= “I added some additon content”; return […]