Last active
November 26, 2023 18:49
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} |
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
This should be installed as a plugin.
How to Install a WordPress Plugin from a Gist