golden hour
/home/doctorbruno/public_html/dravidian-herald.com/wp-content/themes/news-pro/lib
⬆️ Go Up
Upload
File/Folder
Size
Actions
customize.php
2.12 KB
Del
OK
error_log
2.03 KB
Del
OK
helper-functions.php
2.1 KB
Del
OK
output.php
2.44 KB
Del
OK
theme-defaults.php
3.62 KB
Del
OK
woocommerce
-
Del
OK
Edit: helper-functions.php
<?php /** * News Pro. * * This defines the helper functions for use in the News Pro Theme. * * @package News * @author StudioPress * @license GPL-2.0+ * @link http://my.studiopress.com/themes/news/ */ /** * Get default link color for Customizer. * Abstracted here since at least two functions use it. * * @since 3.2.0 * * @return string Hex color code for link color. */ function news_customizer_get_default_link_color() { return '#ff0000'; } /** * Get default accent color for Customizer. * Abstracted here since at least two functions use it. * * @since 3.2.0 * * @return string Hex color code for accent color. */ function news_customizer_get_default_accent_color() { return '#ff0000'; } /** * Calculate color contrast. * * @since 3.2.0 */ function news_color_contrast( $color ) { $hexcolor = str_replace( '#', '', $color ); $red = hexdec( substr( $hexcolor, 0, 2 ) ); $green = hexdec( substr( $hexcolor, 2, 2 ) ); $blue = hexdec( substr( $hexcolor, 4, 2 ) ); $luminosity = ( ( $red * 0.2126 ) + ( $green * 0.7152 ) + ( $blue * 0.0722 ) ); return ( $luminosity > 128 ) ? '#000000' : '#ffffff'; } /** * Calculate color brightness. * * @since 3.2.0 */ function news_color_brightness( $color, $change ) { $hexcolor = str_replace( '#', '', $color ); $red = hexdec( substr( $hexcolor, 0, 2 ) ); $green = hexdec( substr( $hexcolor, 2, 2 ) ); $blue = hexdec( substr( $hexcolor, 4, 2 ) ); $red = max( 0, min( 255, $red + $change ) ); $green = max( 0, min( 255, $green + $change ) ); $blue = max( 0, min( 255, $blue + $change ) ); return '#'.dechex( $red ).dechex( $green ).dechex( $blue ); } /** * Change color brightness. * * @since 3.2.0 */ function news_change_brightness( $color ) { $hexcolor = str_replace( '#', '', $color ); $red = hexdec( substr( $hexcolor, 0, 2 ) ); $green = hexdec( substr( $hexcolor, 2, 2 ) ); $blue = hexdec( substr( $hexcolor, 4, 2 ) ); $luminosity = ( ( $red * 0.2126 ) + ( $green * 0.7152 ) + ( $blue * 0.0722 ) ); return ( $luminosity > 128 ) ? news_color_brightness( '#000000', 20 ) : news_color_brightness( '#ffffff', -50 ); }
Save