INVP::translate_custom_field_names( string $nice_name )

Prefixes our post meta field keys so ‘make’ becomes ‘inventory_presser_make’. Careful to not prefix a key that has already been prefixed.


Parameters Parameters

$nice_name

(string) (Required) The unprefixed meta key.


Top ↑

Return Return

(string) The prefixed meta key.


Top ↑

Source Source

File: includes/class-invp.php

		$name = str_replace( '/', '-', str_replace( ' ', '-', $name ) );
		return strtolower( str_replace( '--', '-', str_replace( '---', '-', $name ) ) );
	}

	/**
	 * Prefixes our post meta field keys so 'make' becomes
	 * 'inventory_presser_make'. Careful to not prefix a key that has
	 * already been prefixed.
	 *