. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.216.87   [ Reverse IP ]
Web Server : Apache
System : Linux webm002.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : eticmes ( 123698)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/eticmes/www/wp-content/themes/goya/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/eticmes/www/wp-content/themes/goya/inc/gutenberg.php
<?php

/* Enqueue WordPress theme styles within Gutenberg. */

function goya_readable_color($color, $default){
	$r = hexdec(substr($color,0,2));
	$g = hexdec(substr($color,2,2));
	$b = hexdec(substr($color,4,2));

	$squared_contrast = (
		$r * $r * .299 +
		$g * $g * .587 +
		$b * $b * .114
	);

	if($squared_contrast > pow(130, 2)){
		return $default;
	}else{
		return $color;
	}
}

function goya_gutenberg_styles() {

	$body_font_color = str_replace('#', '', get_theme_mod('main_font_color', '#585858') );
	$body_readable_color = '#' . goya_readable_color($body_font_color, $default = '585858');

	// Load the theme styles within Gutenberg.
		ob_start(); ?>
	
		.edit-post-visual-editor.editor-styles-wrapper {
		 color:<?php echo esc_attr( $body_readable_color ); ?>;
		}

	<?php 
	$title_font_color = str_replace('#', '', get_theme_mod('heading_color', '#282828') );
	$title_readable_color = '#' . goya_readable_color($title_font_color, $default = '282828');
	?>
		.block-editor .editor-styles-wrapper h1,
		.block-editor .editor-styles-wrapper h2,
		.block-editor .editor-styles-wrapper h3,
		.block-editor .editor-styles-wrapper h4,
		.block-editor .editor-styles-wrapper h5,
		.block-editor .editor-styles-wrapper h6,
		.editor-post-title__block .editor-post-title__input,
		.wp-block-quote  {
			color:<?php echo esc_attr( $title_readable_color ); ?>;
		}
		.wp-block-freeform.block-library-rich-text__tinymce a {
			color:<?php echo esc_attr( $title_readable_color ); ?>;
			cursor: pointer;
		}
		.wp-block-freeform.block-library-rich-text__tinymce a:hover {
			color: <?php echo esc_attr( get_theme_mod('accent_color', '#b9a16b') ); ?>;
		}
	 
	 <?php

	 $styles = ob_get_contents();
	 if (ob_get_contents()) ob_end_clean();

	 $styles = goya_clean_custom_css($styles);

	 return $styles;
}
add_action( 'enqueue_block_editor_assets', 'goya_gutenberg_styles' );

Anon7 - 2022
AnonSec Team