SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > jetpack > > modules >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/jetpack//modules/

NameTypeSizeLast ModifiedActions
carousel Directory - -
comment-likes Directory - -
comments Directory - -
custom-post-types Directory - -
external-media Directory - -
google-fonts Directory - -
gravatar Directory - -
infinite-scroll Directory - -
likes Directory - -
markdown Directory - -
memberships Directory - -
photon-cdn Directory - -
plugin-search Directory - -
post-by-email Directory - -
related-posts Directory - -
scan Directory - -
seo-tools Directory - -
sharedaddy Directory - -
shortcodes Directory - -
simple-payments Directory - -
site-icon Directory - -
sitemaps Directory - -
stats Directory - -
subscriptions Directory - -
theme-tools Directory - -
tiled-gallery Directory - -
verification-tools Directory - -
videopress Directory - -
widget-visibility Directory - -
widgets Directory - -
woocommerce-analytics Directory - -
wordads Directory - -
wpcom-tos Directory - -
account-protection.php File 369 bytes June 30 2025 22:28:24.
blaze.php File 1006 bytes June 30 2025 22:28:24.
blocks.php File 1817 bytes June 30 2025 22:28:24.
carousel.php File 565 bytes June 30 2025 22:28:24.
comment-likes.php File 8076 bytes June 30 2025 22:28:24.
comments.php File 1095 bytes June 30 2025 22:28:24.
contact-form.php File 798 bytes June 30 2025 22:28:24.
copy-post.php File 13401 bytes June 30 2025 22:28:24.
custom-content-types.php File 4050 bytes September 16 2024 19:58:12.
google-fonts.php File 507 bytes June 30 2025 22:28:24.
gravatar-hovercards.php File 12140 bytes June 30 2025 22:28:24.
infinite-scroll.php File 8396 bytes June 30 2025 22:28:24.
json-api.php File 503 bytes June 30 2025 22:28:24.
latex.php File 4723 bytes June 30 2025 22:28:24.
likes.php File 20381 bytes June 30 2025 22:28:24.
markdown.php File 1018 bytes June 30 2025 22:28:24.
module-extras.php File 2724 bytes April 28 2025 19:38:34.
module-headings.php File 43871 bytes July 01 2025 19:41:26.
module-info.php File 27353 bytes March 31 2025 22:37:54.
monitor.php File 3557 bytes July 01 2025 19:41:26.
notes.php File 7870 bytes June 30 2025 22:28:24.
photon-cdn.php File 12479 bytes June 30 2025 22:28:24.
photon.php File 651 bytes June 30 2025 22:28:24.
plugin-search.php File 22129 bytes March 31 2025 22:37:54.
post-by-email.php File 629 bytes June 30 2025 22:28:24.
post-list.php File 523 bytes June 30 2025 22:28:24.
protect.php File 609 bytes June 30 2025 22:28:24.
publicize.php File 3762 bytes June 30 2025 22:28:24.
related-posts.php File 2151 bytes June 30 2025 22:28:24.
search.php File 1161 bytes June 30 2025 22:28:24.
seo-tools.php File 1590 bytes June 30 2025 22:28:24.
sharedaddy.php File 1601 bytes June 30 2025 22:28:24.
shortcodes.php File 6413 bytes June 30 2025 22:28:24.
shortlinks.php File 4510 bytes June 30 2025 22:28:24.
sitemaps.php File 1336 bytes June 30 2025 22:28:24.
sso.php File 696 bytes June 30 2025 22:28:24.
stats.php File 44124 bytes June 30 2025 22:28:24.
subscriptions.php File 33757 bytes June 30 2025 22:28:24.
theme-tools.php File 2482 bytes February 17 2025 20:27:48.
tiled-gallery.php File 1095 bytes June 30 2025 22:28:24.
vaultpress.php File 1796 bytes June 30 2025 22:28:24.
verification-tools.php File 852 bytes June 30 2025 22:28:24.
videopress.php File 942 bytes June 30 2025 22:28:24.
waf.php File 309 bytes June 30 2025 22:28:24.
widget-visibility.php File 511 bytes June 30 2025 22:28:24.
widgets.php File 2820 bytes June 30 2025 22:28:24.
woocommerce-analytics.php File 881 bytes June 30 2025 22:28:24.
wordads.php File 585 bytes June 30 2025 22:28:24.
wpgroho.js File 1977 bytes October 29 2024 16:55:40.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/jetpack//modules//latex.php

<?php
/**
 * Module Name: Beautiful Math
 * Module Description: Add beautifully formatted math equations to your posts and pages using LaTeX.
 * Sort Order: 12
 * First Introduced: 1.1
 * Requires Connection: No
 * Auto Activate: No
 * Module Tags: Writing
 * Feature: Writing
 * Additional Search Queries: latex, math, equation, equations, formula, code
 *
 * @package automattic/jetpack
 */

/**
 * LaTeX support.
 *
 * Backward compatibility requires support for both "[latex][/latex]", and
 * "$latex $" shortcodes.
 *
 * $latex e^{\i \pi} + 1 = 0$  ->  [latex]e^{\i \pi} + 1 = 0[/latex]
 * $latex [a, b]$              ->  [latex][a, b][/latex]
 */

/**
 * Markup LaTeX content.
 *
 * @param string $content Post or comment contents to markup.
 */
function latex_markup( $content ) {
	$textarr = wp_html_split( $content );

	$regex = '%
		\$latex(?:=\s*|\s+)
		((?:
			[^$]+ # Not a dollar
		|
			(?<=(?<!\\\\)\\\\)\$ # Dollar preceded by exactly one slash
		)+)
		(?<!\\\\)\$ # Dollar preceded by zero slashes
	%ix';

	foreach ( $textarr as &$element ) {
		if ( '' === $element || '<' === $element[0] ) {
			continue;
		}

		if ( false === stripos( $element, '$latex' ) ) {
			continue;
		}

		$element = preg_replace_callback( $regex, 'latex_src', $element );
	}

	return implode( '', $textarr );
}

/**
 * Process LaTeX string to rendered image.
 *
 * @param array $matches Matched regex results.
 */
function latex_src( $matches ) {
	$latex = $matches[1];

	$bg = latex_get_default_color( 'bg' );
	$fg = latex_get_default_color( 'text', '000' );
	$s  = 0;

	$latex = latex_entity_decode( $latex );
	if ( preg_match( '/.+(&fg=[0-9a-f]{6}).*/i', $latex, $fg_matches ) ) {
		$fg    = substr( $fg_matches[1], 4 );
		$latex = str_replace( $fg_matches[1], '', $latex );
	}
	if ( preg_match( '/.+(&bg=[0-9a-f]{6}).*/i', $latex, $bg_matches ) ) {
		$bg    = substr( $bg_matches[1], 4 );
		$latex = str_replace( $bg_matches[1], '', $latex );
	}
	if ( preg_match( '/.+(&s=[0-9-]{1,2}).*/i', $latex, $s_matches ) ) {
		$s     = (int) substr( $s_matches[1], 3 );
		$latex = str_replace( $s_matches[1], '', $latex );
	}

	return latex_render( $latex, $fg, $bg, $s );
}

/**
 * Get the default color for an attribute.
 *
 * @param string $color Attribute to color (e.g. bg).
 * @param string $default_color Default fallback color to use.
 */
function latex_get_default_color( $color, $default_color = 'ffffff' ) {
	global $themecolors;
	return isset( $themecolors[ $color ] ) ? $themecolors[ $color ] : $default_color;
}

/**
 * Decode special characters in a LaTeX string.
 *
 * @param string $latex Character encoded content.
 */
function latex_entity_decode( $latex ) {
	return str_replace( array( '&lt;', '&gt;', '&quot;', '&#039;', '&#038;', '&amp;', "\n", "\r" ), array( '<', '>', '"', "'", '&', '&', ' ', ' ' ), $latex );
}

/**
 * Returns the URL for the server-side rendered image of LaTeX.
 *
 * @param string $latex LaTeX string.
 * @param string $fg Foreground color.
 * @param string $bg Background color.
 * @param int    $s Matches.
 *
 * @return string Image URL for the rendered LaTeX.
 */
function latex_render( $latex, $fg, $bg, $s = 0 ) {
	$url = add_query_arg(
		urlencode_deep(
			array(
				'latex' => $latex,
				'bg'    => $bg,
				'fg'    => $fg,
				's'     => $s,
				'c'     => '20201002', // cache buster. Added 2020-10-02 after server migration caused faulty rendering.
			)
		),
		( is_ssl() ? 'https://' : 'http://' ) . 's0.wp.com/latex.php'
	);

	$alt = str_replace( '\\', '&#92;', esc_attr( $latex ) );

	return sprintf(
		'<img src="%1$s" alt="%2$s" class="latex" />',
		esc_url( $url ),
		$alt
	);
}

/**
 * The shortcode way. The attributes are the same as the old ones - 'fg' and 'bg', instead of foreground
 * and background, and 's' is for the font size.
 *
 * Example: [latex s=4 bg=00f fg=ff0]\LaTeX[/latex]
 *
 * @param array  $atts Shortcode attributes.
 * @param string $content Content to format.
 */
function latex_shortcode( $atts, $content = '' ) {
	$attr = shortcode_atts(
		array(
			's'  => 0,
			'bg' => latex_get_default_color( 'bg' ),
			'fg' => latex_get_default_color( 'text', '000' ),
		),
		$atts,
		'latex'
	);

	return latex_render( latex_entity_decode( $content ), $attr['fg'], $attr['bg'], $attr['s'] );
}

/**
 * LaTeX needs to be untexturized.
 *
 * @param array $shortcodes Array of shortcodes not to texturize.
 */
function latex_no_texturize( $shortcodes ) {
	$shortcodes[] = 'latex';
	return $shortcodes;
}
add_filter( 'no_texturize_shortcodes', 'latex_no_texturize' );

add_filter( 'the_content', 'latex_markup', 9 ); // Before wptexturize.
add_filter( 'comment_text', 'latex_markup', 9 ); // Before wptexturize.
add_shortcode( 'latex', 'latex_shortcode' );

SILENT KILLER Tool