Skip to content

Commit

Permalink
Update mechanism and vendor folder. Update LICENSE.
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rgiosan committed Dec 7, 2024
1 parent 2edda5a commit 86b25e6
Show file tree
Hide file tree
Showing 135 changed files with 13,060 additions and 303 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#---------------------------
# Project
#---------------------------
vendor/
node_modules/
.node_history
package-lock.json
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

All notable changes to this project will be documented in this file, per [the Keep a Changelog standard](http://keepachangelog.com/).

## [Unreleased]
## [0.7.0] - 2024-12-07

### Added

- Update mechanism and vendor folder.

### Changed

- Block supports.
- License.

## [0.6.0] - 2024-08-04

Expand Down
899 changes: 617 additions & 282 deletions LICENSE

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pixelalbatross/date-block",
"type": "wordpress-plugin",
"license": "GPL-2.0-or-later",
"license": "GPL-3.0-or-later",
"authors": [
{
"name": "Pixel Albatross",
Expand All @@ -15,7 +15,8 @@
"autoload": {},
"require": {
"php": "^7.4|^8.0",
"composer-plugin-api": "^2.3"
"composer-plugin-api": "^2.3",
"yahnis-elsts/plugin-update-checker": "^5.5"
},
"require-dev": {
"phpcompatibility/php-compatibility": "dev-develop as 9.99.99",
Expand Down
55 changes: 53 additions & 2 deletions composer.lock

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

38 changes: 27 additions & 11 deletions date-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,40 @@
* Plugin URI: https://pixelalbatross.pt/?utm_source=wp-plugins&utm_medium=date-block&utm_campaign=plugin-uri
* Requires at least: 6.1
* Requires PHP: 7.4
* Version: 0.6.0
* Version: 0.7.0
* Author: Pixel Albatross
* Author URI: https://pixelalbatross.pt/?utm_source=wp-plugins&utm_medium=date-block&utm_campaign=author-uri
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* License: GPL-3.0-or-later
* License URI: https://spdx.org/licenses/GPL-3.0-or-later.html
* Update URI: https://pixelalbatross.pt/
* GitHub Plugin URI: https://github.com/pixelalbatross/date-block
* Text Domain: date-block
*
* @package pixelalbatross/date-block
*/

namespace PixelAlbatross\WP\DateBlock;

use YahnisElsts\PluginUpdateChecker\v5\PucFactory;

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}

define( 'PIXELALBATROSS_DATE_BLOCK_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'PIXALB_DATE_BLOCK_PATH', plugin_dir_path( __FILE__ ) );

if ( file_exists( PIXALB_DATE_BLOCK_PATH . 'vendor/autoload.php' ) ) {
require_once PIXALB_DATE_BLOCK_PATH . 'vendor/autoload.php';
}

$updater = PucFactory::buildUpdateChecker(
'https://github.com/pixelalbatross/date-block/',
__FILE__,
'date-block'
);

$updater->setBranch( 'main' );

/**
* Registers the block using the metadata loaded from the `block.json` file.
Expand All @@ -31,9 +47,9 @@
*
* @see https://developer.wordpress.org/reference/functions/register_block_type/
*/
function pixelalbatross_date_block_init() {
function date_block_init() {

$block_json_files = glob( PIXELALBATROSS_DATE_BLOCK_PLUGIN_PATH . 'build/block.json' );
$block_json_files = glob( PIXALB_DATE_BLOCK_PATH . 'build/block.json' );

foreach ( $block_json_files as $filename ) {

Expand All @@ -45,20 +61,20 @@ function pixelalbatross_date_block_init() {
wp_set_script_translations(
$handle,
'date-block',
PIXELALBATROSS_DATE_BLOCK_PLUGIN_PATH . 'languages'
PIXALB_DATE_BLOCK_PATH . 'languages'
);
}
}
}
}
add_action( 'init', 'pixelalbatross_date_block_init' );
add_action( 'init', __NAMESPACE__ . '\date_block_init' );

/**
* Registers the block textdomain.
*
* @return void
*/
function pixelalbatross_date_block_i18n() {
load_plugin_textdomain( 'date-block', false, plugin_basename( PIXELALBATROSS_DATE_BLOCK_PLUGIN_PATH ) . '/languages' );
function date_block_i18n() {
load_plugin_textdomain( 'date-block', false, plugin_basename( PIXALB_DATE_BLOCK_PATH ) . '/languages' );
}
add_action( 'plugins_loaded', 'pixelalbatross_date_block_i18n' );
add_action( 'plugins_loaded', __NAMESPACE__ . '\date_block_i18n' );
6 changes: 3 additions & 3 deletions languages/date-block.pot
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Copyright (C) 2024 Pixel Albatross
# This file is distributed under the GPL-2.0-or-later.
# This file is distributed under the GPL-3.0-or-later.
msgid ""
msgstr ""
"Project-Id-Version: Date Block 0.6.0\n"
"Project-Id-Version: Date Block 0.7.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/date-block\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-08-04T14:35:29+00:00\n"
"POT-Creation-Date: 2024-12-07T22:38:16+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.10.0\n"
"X-Domain: date-block\n"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"type": "git",
"url": "https://github.com/pixelalbatross/date-block"
},
"license": "GPL-2.0-or-later",
"license": "GPL-3.0-or-later",
"main": "build/index.js",
"scripts": {
"build": "wp-scripts build",
Expand Down
25 changes: 25 additions & 0 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitb93238a7b198727daba2eb1ca0ca3276::getLoader();
Loading

0 comments on commit 86b25e6

Please sign in to comment.