Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.4",
"league/html-to-markdown": "^5.1"
"league/html-to-markdown": "^5.1",
"yahnis-elsts/plugin-update-checker": "^5.6"
},
"autoload": {
"psr-4": {
Expand Down
54 changes: 52 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use MarkdownAlternate\Discovery\AlternateLinkHandler;
use MarkdownAlternate\Router\RewriteHandler;
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;

/**
* Main plugin class implementing singleton pattern.
Expand Down Expand Up @@ -57,6 +58,12 @@ private function __construct() {

$this->discovery = new AlternateLinkHandler();
$this->discovery->register();

PucFactory::buildUpdateChecker(
'https://github.com/ProgressPlanner/markdown-alternate/',
MARKDOWN_ALTERNATE_FILE,
'markdown-alternate'
);
}

/**
Expand Down
1 change: 1 addition & 0 deletions vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@
'MarkdownAlternate\\Output\\ContentRenderer' => $baseDir . '/src/Output/ContentRenderer.php',
'MarkdownAlternate\\Plugin' => $baseDir . '/src/Plugin.php',
'MarkdownAlternate\\Router\\RewriteHandler' => $baseDir . '/src/Router/RewriteHandler.php',
'MarkdownAlternate\\Router\\UrlConverter' => $baseDir . '/src/Router/UrlConverter.php',
);
10 changes: 10 additions & 0 deletions vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

// autoload_files.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
'f6d4f6bcee7247df6b777884c3e22f98' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v5p6.php',
);
12 changes: 12 additions & 0 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ public static function getLoader()

$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInit30105965ef2b463e5c24db4489fbe8a0::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}

return $loader;
}
}
13 changes: 9 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,27 @@

class ComposerStaticInit30105965ef2b463e5c24db4489fbe8a0
{
public static $files = array (
'f6d4f6bcee7247df6b777884c3e22f98' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v5p6.php',
);

public static $prefixLengthsPsr4 = array (
'M' =>
'M' =>
array (
'MarkdownAlternate\\' => 18,
),
'L' =>
'L' =>
array (
'League\\HTMLToMarkdown\\' => 22,
),
);

public static $prefixDirsPsr4 = array (
'MarkdownAlternate\\' =>
'MarkdownAlternate\\' =>
array (
0 => __DIR__ . '/../..' . '/src',
),
'League\\HTMLToMarkdown\\' =>
'League\\HTMLToMarkdown\\' =>
array (
0 => __DIR__ . '/..' . '/league/html-to-markdown/src',
),
Expand Down Expand Up @@ -62,6 +66,7 @@ class ComposerStaticInit30105965ef2b463e5c24db4489fbe8a0
'MarkdownAlternate\\Output\\ContentRenderer' => __DIR__ . '/../..' . '/src/Output/ContentRenderer.php',
'MarkdownAlternate\\Plugin' => __DIR__ . '/../..' . '/src/Plugin.php',
'MarkdownAlternate\\Router\\RewriteHandler' => __DIR__ . '/../..' . '/src/Router/RewriteHandler.php',
'MarkdownAlternate\\Router\\UrlConverter' => __DIR__ . '/../..' . '/src/Router/UrlConverter.php',
);

public static function getInitializer(ClassLoader $loader)
Expand Down
53 changes: 53 additions & 0 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,59 @@
}
],
"install-path": "../league/html-to-markdown"
},
{
"name": "yahnis-elsts/plugin-update-checker",
"version": "v5.6",
"version_normalized": "5.6.0.0",
"source": {
"type": "git",
"url": "https://github.com/YahnisElsts/plugin-update-checker.git",
"reference": "a2db6871deec989a74e1f90fafc6d58ae526a879"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/a2db6871deec989a74e1f90fafc6d58ae526a879",
"reference": "a2db6871deec989a74e1f90fafc6d58ae526a879",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": ">=5.6.20"
},
"time": "2025-05-20T12:29:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"load-v5p6.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Yahnis Elsts",
"email": "whiteshadow@w-shadow.com",
"homepage": "https://w-shadow.com/",
"role": "Developer"
}
],
"description": "A custom update checker for WordPress plugins and themes. Useful if you can't host your plugin in the official WP repository but still want it to support automatic updates.",
"homepage": "https://github.com/YahnisElsts/plugin-update-checker/",
"keywords": [
"automatic updates",
"plugin updates",
"theme updates",
"wordpress"
],
"support": {
"issues": "https://github.com/YahnisElsts/plugin-update-checker/issues",
"source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v5.6"
},
"install-path": "../yahnis-elsts/plugin-update-checker"
}
],
"dev": true,
Expand Down
13 changes: 11 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'joost/markdown-alternate',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '127f5adea2f9f33a649cd6dfe24ef2a84136cee5',
'reference' => 'c71c82c2e7f217f38f2a25ff39c35707cc0d9704',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'joost/markdown-alternate' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '127f5adea2f9f33a649cd6dfe24ef2a84136cee5',
'reference' => 'c71c82c2e7f217f38f2a25ff39c35707cc0d9704',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -28,5 +28,14 @@
'aliases' => array(),
'dev_requirement' => false,
),
'yahnis-elsts/plugin-update-checker' => array(
'pretty_version' => 'v5.6',
'version' => '5.6.0.0',
'reference' => 'a2db6871deec989a74e1f90fafc6d58ae526a879',
'type' => 'library',
'install_path' => __DIR__ . '/../yahnis-elsts/plugin-update-checker',
'aliases' => array(),
'dev_requirement' => false,
),
),
);
5 changes: 2 additions & 3 deletions vendor/composer/platform_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
throw new \RuntimeException(
'Composer detected issues in your platform: ' . implode(' ', $issues)
);
}
10 changes: 10 additions & 0 deletions vendor/yahnis-elsts/plugin-update-checker/Puc/v5/PucFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace YahnisElsts\PluginUpdateChecker\v5;

if ( !class_exists(PucFactory::class, false) ):

class PucFactory extends \YahnisElsts\PluginUpdateChecker\v5p6\PucFactory {
}

endif;
86 changes: 86 additions & 0 deletions vendor/yahnis-elsts/plugin-update-checker/Puc/v5p6/Autoloader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?php

namespace YahnisElsts\PluginUpdateChecker\v5p6;

if ( !class_exists(Autoloader::class, false) ):

class Autoloader {
const DEFAULT_NS_PREFIX = 'YahnisElsts\\PluginUpdateChecker\\';

private $prefix;
private $rootDir;
private $libraryDir;

private $staticMap;

public function __construct() {
$this->rootDir = dirname(__FILE__) . '/';

$namespaceWithSlash = __NAMESPACE__ . '\\';
$this->prefix = $namespaceWithSlash;

$this->libraryDir = $this->rootDir . '../..';
if ( !self::isPhar() ) {
$this->libraryDir = realpath($this->libraryDir);
}
$this->libraryDir = $this->libraryDir . '/';

//Usually, dependencies like Parsedown are in the global namespace,
//but if someone adds a custom namespace to the entire library, they
//will be in the same namespace as this class.
$isCustomNamespace = (
substr($namespaceWithSlash, 0, strlen(self::DEFAULT_NS_PREFIX)) !== self::DEFAULT_NS_PREFIX
);
$libraryPrefix = $isCustomNamespace ? $namespaceWithSlash : '';

$this->staticMap = array(
$libraryPrefix . 'PucReadmeParser' => 'vendor/PucReadmeParser.php',
$libraryPrefix . 'Parsedown' => 'vendor/Parsedown.php',
);

//Add the generic, major-version-only factory class to the static map.
$versionSeparatorPos = strrpos(__NAMESPACE__, '\\v');
if ( $versionSeparatorPos !== false ) {
$versionSegment = substr(__NAMESPACE__, $versionSeparatorPos + 1);
$pointPos = strpos($versionSegment, 'p');
if ( ($pointPos !== false) && ($pointPos > 1) ) {
$majorVersionSegment = substr($versionSegment, 0, $pointPos);
$majorVersionNs = __NAMESPACE__ . '\\' . $majorVersionSegment;
$this->staticMap[$majorVersionNs . '\\PucFactory'] =
'Puc/' . $majorVersionSegment . '/Factory.php';
}
}

spl_autoload_register(array($this, 'autoload'));
}

/**
* Determine if this file is running as part of a Phar archive.
*
* @return bool
*/
private static function isPhar() {
//Check if the current file path starts with "phar://".
static $pharProtocol = 'phar://';
return (substr(__FILE__, 0, strlen($pharProtocol)) === $pharProtocol);
}

public function autoload($className) {
if ( isset($this->staticMap[$className]) && file_exists($this->libraryDir . $this->staticMap[$className]) ) {
include($this->libraryDir . $this->staticMap[$className]);
return;
}

if ( strpos($className, $this->prefix) === 0 ) {
$path = substr($className, strlen($this->prefix));
$path = str_replace(array('_', '\\'), '/', $path);
$path = $this->rootDir . $path . '.php';

if ( file_exists($path) ) {
include $path;
}
}
}
}

endif;
Loading