start/wp-content/plugins/js_composer/include/classes/editors/popups/class-vc-templates-panel-editor.php
/**
	 * Used to compare two templates by category, category_weight
	 * If category weight is less template will appear in first positions
	 * @since 4.4
	 *
	 * @param array $a - template one
	 * @param array $b - second template to compare
	 *
	 * @return int
	 */
Used to compare two templates by category, category_weight
If category weight is less template will appear in first positions
@since 4.4

@param array $a - template one
@param array $b - second template to compare

@return int
Used to compare two templates by category category_weight If category weight is less template will appear in first positions @since 4 . 4 @param array $a - template one @param array $b - second template to compare @return int
protected function cmpCategory( $a, $b ) {
		$a_k = isset( $a['category'] ) ? $a['category'] : '*';
		$b_k = isset( $b['category'] ) ? $b['category'] : '*';
		$a_category_weight = isset( $a['category_weight'] ) ? $a['category_weight'] : 0;
		$b_category_weight = isset( $b['category_weight'] ) ? $b['category_weight'] : 0;
		return $a_category_weight == $b_category_weight ? strcmp( $a_k, $b_k ) : $a_category_weight - $b_category_weight;
	}
protected function cmpCategory ( $ a , $ b ) { $ a_k = isset ( $ a [ 'category' ] ) ? $ a [ 'category' ] : '*' ; $ b_k = isset ( $ b [ 'category' ] ) ? $ b [ 'category' ] : '*' ; $ a_category_weight = isset ( $ a [ 'category_weight' ] ) ? $ a [ 'category_weight' ] : 0 ; $ b_category_weight = isset ( $ b [ 'category_weight' ] ) ? $ b [ 'category_weight' ] : 0 ; return $ a_category_weight == $ b_category_weight ? strcmp ( $ a_k , $ b_k ) : $ a_category_weight - $ b_category_weight ; }
Used to compare two templates by category, category_weight
 If category weight is less template will appear in first positions
 @since 4.4
Used to compare two templates by category category_weight If category weight is less template will appear in first positions @since 4 . 4