51
.gitignore
vendored
51
.gitignore
vendored
@@ -1,49 +1,2 @@
|
||||
# ---> WordPress
|
||||
# Wordpress - ignore core, configuration, examples, uploads and logs.
|
||||
# https://github.com/github/gitignore/blob/main/WordPress.gitignore
|
||||
|
||||
# Core
|
||||
#
|
||||
# Note: if you want to stage/commit WP core files
|
||||
# you can delete this whole section/until Configuration.
|
||||
/wp-admin/
|
||||
/wp-content/index.php
|
||||
/wp-content/languages
|
||||
/wp-content/plugins/index.php
|
||||
/wp-content/themes/index.php
|
||||
/wp-includes/
|
||||
/index.php
|
||||
/license.txt
|
||||
/readme.html
|
||||
/wp-*.php
|
||||
/xmlrpc.php
|
||||
|
||||
# Configuration
|
||||
wp-config.php
|
||||
|
||||
# Example themes
|
||||
/wp-content/themes/twenty*/
|
||||
|
||||
# Example plugin
|
||||
/wp-content/plugins/hello.php
|
||||
|
||||
# Uploads
|
||||
/wp-content/uploads/
|
||||
|
||||
# Log files
|
||||
*.log
|
||||
|
||||
# htaccess
|
||||
/.htaccess
|
||||
|
||||
# All plugins
|
||||
#
|
||||
# Note: If you wish to whitelist plugins,
|
||||
# uncomment the next line
|
||||
#/wp-content/plugins
|
||||
|
||||
# All themes
|
||||
#
|
||||
# Note: If you wish to whitelist themes,
|
||||
# uncomment the next line
|
||||
#/wp-content/themes
|
||||
composer.phar
|
||||
/vendor/
|
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
7
.idea/dictionaries/project.xml
generated
Normal file
7
.idea/dictionaries/project.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="project">
|
||||
<words>
|
||||
<w>prettysunflower</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PhpCSValidationInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/wp-plugin-base.iml" filepath="$PROJECT_DIR$/.idea/wp-plugin-base.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
50
.idea/php.xml
generated
Normal file
50
.idea/php.xml
generated
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetector">
|
||||
<phpmd_settings>
|
||||
<phpmd_by_interpreter asDefaultInterpreter="true" interpreter_id="b6c4540e-d363-46a2-b336-1a327b9ed7b0" timeout="30000" />
|
||||
</phpmd_settings>
|
||||
</component>
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpCodeSniffer">
|
||||
<phpcs_settings>
|
||||
<phpcs_by_interpreter asDefaultInterpreter="true" interpreter_id="b6c4540e-d363-46a2-b336-1a327b9ed7b0" tool_path="/Users/remilia/PHP_CodeSniffer/bin/phpcs" timeout="30000" />
|
||||
<PhpCSConfiguration beautifier_path="$USER_HOME$/PHP_CodeSniffer/bin/phpcbf" standards="MySource;PEAR;PSR1;PSR12;PSR2;Squiz;Zend" tool_path="$USER_HOME$/PHP_CodeSniffer/bin/phpcs" />
|
||||
</phpcs_settings>
|
||||
</component>
|
||||
<component name="PhpExternalFormatter">
|
||||
<option name="externalFormatter" value="PHP_CBF" />
|
||||
</component>
|
||||
<component name="PhpIncludePathManager">
|
||||
<include_path>
|
||||
<path value="$USER_HOME$/Downloads/wordpress 2" />
|
||||
<path value="$PROJECT_DIR$/vendor/composer" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.1" />
|
||||
<component name="PhpStan">
|
||||
<PhpStan_settings>
|
||||
<phpstan_by_interpreter asDefaultInterpreter="true" interpreter_id="b6c4540e-d363-46a2-b336-1a327b9ed7b0" timeout="60000" />
|
||||
</PhpStan_settings>
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="Psalm">
|
||||
<Psalm_settings>
|
||||
<psalm_fixer_by_interpreter asDefaultInterpreter="true" interpreter_id="b6c4540e-d363-46a2-b336-1a327b9ed7b0" timeout="60000" />
|
||||
</Psalm_settings>
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
11
.idea/wp-plugin-base.iml
generated
Normal file
11
.idea/wp-plugin-base.iml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/." isTestSource="false" packagePrefix="wp_plugin_base\" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
5
composer.json
Normal file
5
composer.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"autoload": {
|
||||
"psr-4": {"wp_plugin_base\\": "."}
|
||||
}
|
||||
}
|
18
composer.lock
generated
Normal file
18
composer.lock
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d751713988987e9331980363e24189ce",
|
||||
"packages": [],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
44
wp-plugin-base.php
Normal file
44
wp-plugin-base.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Plugin Name: wp-plugin-base
|
||||
* Plugin URI: https://git.prettysunflower.moe/prettysunflower/wp-plugin-base
|
||||
* Description: Template for new WordPress plugins.
|
||||
* Version: 1
|
||||
* Requires PHP: 8.1
|
||||
* Author: prettysunflower
|
||||
* Author URI: https://prettysunflower.moe/
|
||||
* License: Public Domain
|
||||
*/
|
||||
|
||||
namespace wp_plugin_base;
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
function on_activation(): void
|
||||
{
|
||||
}
|
||||
|
||||
register_activation_hook(__FILE__, __NAMESPACE__ . '\on_activation');
|
||||
|
||||
function on_deactivation(): void
|
||||
{
|
||||
}
|
||||
|
||||
register_deactivation_hook(__FILE__, __NAMESPACE__ . '\on_deactivation');
|
||||
|
||||
function on_uninstall(): void
|
||||
{
|
||||
}
|
||||
|
||||
register_uninstall_hook(__FILE__, __NAMESPACE__ . '\on_uninstall');
|
||||
|
||||
function on_init(): void
|
||||
{
|
||||
}
|
||||
|
||||
add_action('init', __NAMESPACE__ . '\on_init');
|
Reference in New Issue
Block a user