Snippets

picu Custom Filename Separator

Updated by Florian Ziegler

File snippet.php Modified

  • Ignore whitespace
  • Hide word diff
 // Use this in wp-config.php
 define( 'PICU_FILENAME_SEPARATOR', "\n" ); // New line after each filename
 
-// Use this in the theme's functions.phph
+// Use this in the theme's functions.php
 add_filter( 'picu_filename_separator', 'my_custom_filename_separator' );
 
 function my_custom_filename_separator( $divider ) {
Updated by Florian Ziegler

File snippet.php Modified

  • Ignore whitespace
  • Hide word diff
 define( 'PICU_FILENAME_SEPARATOR', "\n" ); // New line after each filename
 
 // Use this in the theme's functions.phph
-add_filter( 'picu_filename_separator', 'my_custom_filename_separator', 10, 2 );
+add_filter( 'picu_filename_separator', 'my_custom_filename_separator' );
 
 function my_custom_filename_separator( $divider ) {
     return ', '; // Adds a comma after each filename
Created by Florian Ziegler

File snippet.php Added

  • Ignore whitespace
  • Hide word diff
+// Use this in wp-config.php
+define( 'PICU_FILENAME_SEPARATOR', "\n" ); // New line after each filename
+
+// Use this in the theme's functions.phph
+add_filter( 'picu_filename_separator', 'my_custom_filename_separator', 10, 2 );
+
+function my_custom_filename_separator( $divider ) {
+    return ', '; // Adds a comma after each filename
+}
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.