Web lists-archives.com

OT: maybe_hash_hex_color not in formatting.php despite WordPress documentation




Not entirely off-topic, as I (think I) am using Debian's WordPress:

[goshen]:/web/FIFTHANDGRAPE/wp-includes:> aptitude show wordpress
Package: wordpress                       
Version: 4.7.5+dfsg-2
New: yes
State: installed
Automatically installed: no
<snip>

When using the hueman theme, I get a blank page. When I turn on debug in my config file:

[goshen]:/web/FIFTHANDGRAPE/wp-includes:> sudo cat /etc/wordpress/config-northfifthandgrapechurch.org.php 
<?php
<snip>
define('WP_DEBUG', true );
?>

and reload my site, I get:

Fatal error: Call to undefined function maybe_hash_hex_color() in /web/FIFTHANDGRAPE/wp-content/themes/hueman/functions/dynamic-styles.php on line 108

When I look in that file, I see several references to this function, such as:

[goshen]:/web/FIFTHANDGRAPE:> cat wp-content/themes/hueman/functions/dynamic-styles.php | grep maybe
      $prim_color = maybe_hash_hex_color( hu_get_option('color-1') );
      $second_color = maybe_hash_hex_color( hu_get_option('color-2') );
      $tb_color = maybe_hash_hex_color( hu_get_option('color-topbar') );
      $h_color = maybe_hash_hex_color( hu_get_option('color-header') );
      $mm_color = maybe_hash_hex_color( hu_get_option('color-mobile-menu') );
      $hm_color = maybe_hash_hex_color( hu_get_option('color-header-menu') );
      if ( maybe_hash_hex_color( hu_get_option('color-footer') ) != '#33363b' ) {

Googling reveals that ever since version 3.4 (long before the 4.7.5 I have installed), this function was moved from a "customizer" file to wp-includes/formatting.php (such as per the documentation at https://developer.wordpress.org/reference/functions/maybe_hash_hex_color/).

But when I look in that file, there is no "maybe_hash_hex_color". When I search for "maybe_hash" in a wider context, I do find a couple of references:

westk[@]goshen]:/home/westk/web/FIFTHANDGRAPE/wp-includes:> grep maybe_hash *
grep: certificates: Is a directory
class-wp-customize-manager.php:                 'sanitize_js_callback' => 'maybe_hash_hex_color',
class-wp-customize-manager.php:                 'sanitize_js_callback' => 'maybe_hash_hex_color',
class-wp-customize-manager.php:function maybe_hash_hex_color( $color ) {

So it seems to me (a noob when it comes to this stuff) that Debian's version of WordPress is broken?

Any help understanding/fixing this would be appreciated. Thanks!


--
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com