Skip to content

Commit 6fc227b

Browse files
committed
Generate docs pages from installed Git repos
1 parent ce26e87 commit 6fc227b

70 files changed

Lines changed: 1792 additions & 56 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ composer.lock
55
package-lock.json
66
yarn.lock
77
bun.lockb
8+
bun.lock
89

910
/artifacts
1011

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Admin
3+
---
4+
<!--
5+
Do not edit this file - Generated from https://github.com/tangibleinc/framework
6+
-->
7+
# Admin
8+
9+
This is a collection of admin features commonly needed by plugins.
10+
11+
- Admin notice
12+
- Admin menu
13+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Ajax
3+
---
4+
<!--
5+
Do not edit this file - Generated from https://github.com/tangibleinc/framework
6+
-->
7+
# AJAX
8+
9+
Server side (PHP):
10+
11+
```php
12+
use tangible\ajax;
13+
14+
ajax\enqueue();
15+
```
16+
17+
Browser side (JS):
18+
19+
```js
20+
const { ajax } = window.Tangible
21+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Api
3+
---
4+
<!--
5+
Do not edit this file - Generated from https://github.com/tangibleinc/framework
6+
-->
7+
# API
8+
9+
The API module replaces the AJAX module in the plugin framework with a new
10+
interface using browser-native `fetch()` instead of `jQuery.ajax()`.
11+
12+
Designed to work in various contexts:
13+
14+
- Admin settings form
15+
- Form module on frontend
16+
- React app via WordPress REST API
17+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Async Action
3+
---
4+
<!--
5+
Do not edit this file - Generated from https://github.com/tangibleinc/framework
6+
-->
7+
# Async Action
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Background Queue
3+
---
4+
<!--
5+
Do not edit this file - Generated from https://github.com/tangibleinc/framework
6+
-->
7+
# Background Queue
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Content
3+
---
4+
<!--
5+
Do not edit this file - Generated from https://github.com/tangibleinc/framework
6+
-->
7+
# Content
8+
9+
Create and manage site content structure
10+
11+
- Database tables
12+
- Custom post types
13+
- Items - Programmatically create posts, etc.
14+
- Fields
15+
- Taxonomies
16+
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Date
3+
---
4+
<!--
5+
Do not edit this file - Generated from https://github.com/tangibleinc/framework
6+
-->
7+
# Date
8+
9+
Examples
10+
11+
```php
12+
// Get interface
13+
14+
$tdate = tangible\date();
15+
16+
// Set language
17+
18+
$tdate->setLocale('fr');
19+
20+
$date = $tdate('3 days ago');
21+
22+
echo $date->ago(); // => il y a 3 jours
23+
echo $date->format('l j F Y'); // => mardi 7 avril 2020
24+
25+
// Create from date and time
26+
27+
$date = $tdate('2000-01-31');
28+
$date = $tdate->create(2000, 1, 31);
29+
$date = $tdate->create(2000, 1, 31, 12, 0, 0);
30+
31+
// Add/subtract
32+
33+
$yesterday = $tdate->now()->sub('1 day');
34+
$tomorrow = $tdate->now()->add('1 day');
35+
36+
// Duration
37+
38+
echo $tdate->now()->timespan(
39+
$tdate('+1000 days')
40+
);
41+
// 2 years, 8 months, 3 weeks, 5 days
42+
43+
// Get/set date attributes
44+
45+
$date->year = 2013;
46+
$date->month = 1;
47+
$date->day = 31;
48+
49+
$date->hour = 12;
50+
$date->minute = 0;
51+
$date->second = 0;
52+
```
53+
54+
55+
## Updating the Carbon library
56+
57+
Steps to update:
58+
59+
- Download latest version of Carbon from: https://github.com/briannesbitt/Carbon/releases
60+
- Run: `composer install --no-dev`
61+
62+
Workaround to maintain compatibility with PHP 7.4 - The dependency `symfony/translation` version 6 requires PHP 8.1, so we must manually install v5 which is still compatible with both PHP 7 and 8.
63+
64+
```
65+
rm composer.lock
66+
composer require symfony/translation:5 symfony/translation-contracts:2 --ignore-platform-reqs
67+
composer install --ignore-platform-reqs --no-dev
68+
```
69+
70+
- Copy and replace folders src, vendor, lazy to ./Carbon
71+
- Run script to convert namespace, from this folder: ./namespace
72+
- Edit Carbon/vendor/composer/autoload_static.php, replace:
73+
74+
```php
75+
'C' =>
76+
array (
77+
'Tangible\\Carbon\\' => 7,
78+
),
79+
```
80+
81+
..with..
82+
83+
```php
84+
'T' =>
85+
array (
86+
'Tangible\\Carbon\\' => 16,
87+
),
88+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Design
3+
---
4+
<!--
5+
Do not edit this file - Generated from https://github.com/tangibleinc/framework
6+
-->
7+
# Integrate Design library with WordPress
8+
9+
In the Framework, it would be convenient to bundle the library `@tangible/design`, made of Sass and JavaScript, into independently loadable modules under a shared global namespace.
10+
11+
- `design-core.min.css`
12+
- `design-core.min.js`
13+
- `design-component.*.min.css`
14+
- `design-component.*.min.js`
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Empty Block Theme
3+
---
4+
<!--
5+
Do not edit this file - Generated from https://github.com/tangibleinc/framework
6+
-->
7+
# Empty Block Theme
8+
9+
An empty block theme for testing, or as starting point for further development.
10+
11+
#### Source code
12+
13+
This is a module developed within the [Template System](https://github.com/TangibleInc/template-system/tree/main/framework/empty-block-theme). It is also published as [its own repository](https://github.com/TangibleInc/empty-block-theme) to support installing as plugin dependency or standalone.
14+
15+
## Upstream
16+
17+
This repository was forked from https://github.com/WordPress/gutenberg/tree/trunk/test/emptytheme.

0 commit comments

Comments
 (0)