Skip to content

Instantly share code, notes, and snippets.

@xnau
Last active November 26, 2023 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xnau/23761addb1eb3103a04e52cfb30c87fb to your computer and use it in GitHub Desktop.
Save xnau/23761addb1eb3103a04e52cfb30c87fb to your computer and use it in GitHub Desktop.
Shows how to add a placeholder to the Participants Database standard list search input (deprecated)
<?php
/**
* Plugin Name: PDb Standard Search Input Placeholder
* Description: shows how to set a placeholder value in the standard list search input
*/
add_filter( 'pdb-search_input_attributes', 'xnau_set_search_input_attributes' );
/**
* sets the search input attributes
*
* @param array $attributes
* @return array attributes
**/
function xnau_set_search_input_attributes( $attributes )
{
$attributes['placeholder'] = 'enter your search words here...';
return $attributes;
}
@xnau
Copy link
Author

xnau commented Nov 16, 2023

This should be installed as a plugin.

How to Install a WordPress Plugin from a Gist

@xnau
Copy link
Author

xnau commented Nov 26, 2023

This is no longer needed as of Participants Database 2.5.6, you can now set this in the plugin settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment