searchwp\weights
Seit: 4.0.0
Passen Sie die verfügbaren Gewichtungsintervalle bei der Konfiguration von SearchWP Engine Source-Attributen an.
Parameter
| Typ | Parameter | Standard | Seit |
|---|---|---|---|
| Array | $weights |
Array-Schlüssel sind ganze Zahlen, die das Gewicht darstellen, der Wert ist die Bezeichnung des Gewichts | 4.0.0 |
Beispiele
All hooks should be added to your custom SearchWP Customizations Plugin.
Passen Sie die verfügbaren Gewichtungen der Engine-Quellattribute an
This file contains hidden or 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 | |
| // Customize available Engine Source Attribute weights in SearchWP. | |
| add_filter( 'searchwp\weights', function( $weights ) { | |
| // Make available only two weight choices. | |
| return [ | |
| 1 => 'Lowest', | |
| 1000 => 'Highest', | |
| ]; | |
| } ); |

