Skip to content

Commit 132ef9c

Browse files
committed
Added project files
1 parent 84443fb commit 132ef9c

16 files changed

+1912
-0
lines changed

.github/workflows/plugin.yaml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Plugin
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Validate composer.json and composer.lock
21+
run: composer validate --strict
22+
23+
- name: Cache Composer packages
24+
id: composer-cache
25+
uses: actions/cache@v3
26+
with:
27+
path: vendor
28+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-php-
31+
32+
- name: Install dependencies
33+
run: composer install --prefer-dist --no-progress
34+
35+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
36+
# Docs: https://getcomposer.org/doc/articles/scripts.md
37+
38+
# - name: Run test suite
39+
# run: composer run-script test
40+
41+
- name: Package build
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: no-keek-setup
45+
path: |
46+
.
47+
!.git
48+
!.github
49+
!build
50+
!dist
51+
!.gitignore
52+
!composer.json
53+
!composer.lock
54+
!README.md
55+
56+
- name: Retrieve packaged build
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: no-keek-setup
60+
path: |
61+
dist
62+
63+
# TODO: dist

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/vendor/
2+
3+
# Configuration
4+
/.env
5+
6+
# Build
7+
/build/
8+
/dist/
9+
10+
# Uploads
11+
/uploads/
12+
13+
# Log files
14+
/logs/

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Nat Okpe
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

composer.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "natokpe/no-keek-setup",
3+
"description": "Setup for NO Keek WordPress theme.",
4+
"type": "project",
5+
"license": "MIT",
6+
"autoload": {
7+
"psr-4": {
8+
"NatOkpe\\Wp\\Plugin\\KeekSetup\\": "src/"
9+
},
10+
11+
"files": [
12+
"vendor/cmb2/cmb2/init.php"
13+
]
14+
},
15+
"authors": [
16+
{
17+
"name": "Nat Okpe",
18+
"email": "me@nat.com.ng"
19+
}
20+
],
21+
"minimum-stability": "stable",
22+
"require": {
23+
"cmb2/cmb2": "^2.10"
24+
}
25+
}

composer.lock

+78
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/engine.php

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
declare(strict_types = 1);
3+
4+
use NatOkpe\Wp\Plugin\KeekSetup\Engine;
5+
6+
/* Config: Engine */
7+
return [
8+
'show_admin_bar' => false,
9+
10+
'admin_footer_text' => sprintf(
11+
'Need help? &mdash; '
12+
. '<a %4$s href="mailto:%1$s">Email</a> | '
13+
. '<a %4$s href="tel:%2$s">Call</a> | '
14+
. '<a %4$s href="https://api.whatsapp.com/send?phone=%3$s">WhatsApp</a>',
15+
esc_attr('support@nat.com.ng'),
16+
esc_attr('+234-703-929-0234'),
17+
esc_attr('2347039290234'),
18+
'target="_blank" rel="noopener noreferrer"'
19+
),
20+
21+
'update_footer' => sprintf(
22+
'<a %s href="%s">Create a website</a>',
23+
'target="_blank" rel="noopener noreferrer"',
24+
esc_attr('https://nat.com.ng')
25+
),
26+
27+
'image_sizes' => [
28+
// 'image-32' => [
29+
// 'width' => 32,
30+
// 'height' => 32,
31+
// 'crop' => true,
32+
// ],
33+
],
34+
35+
'upload_mimes' => function ($mimes) {
36+
return array_merge($mimes, [
37+
// Images
38+
'svg' => 'image/svg+xml',
39+
'svgz' => 'image/svg+xml',
40+
'ico' => 'image/x-icon',
41+
'gif' => 'image/gif',
42+
'webp' => 'image/webp',
43+
44+
// Docs
45+
'pdf' => 'application/pdf',
46+
]);
47+
},
48+
49+
'query_vars' => [
50+
'action',
51+
'nnc', // nonce
52+
],
53+
];

config/meta.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
declare(strict_types = 1);
3+
4+
use NatOkpe\Wp\Plugin\KeekSetup\Engine;
5+
6+
$meta_dir = __DIR__ . DIRECTORY_SEPARATOR . 'meta' . DIRECTORY_SEPARATOR;
7+
$meta = [];
8+
9+
// $meta[] = require($meta_dir . 'meta-job-application.php');
10+
// $meta[] = require($meta_dir . 'meta-job-position.php');
11+
12+
// $meta = array_merge(...$meta);
13+
14+
return $meta;

config/options.php

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
declare(strict_types = 1);
3+
4+
use NatOkpe\Wp\Plugin\KeekSetup\Engine;
5+
6+
// $pgs = get_pages([
7+
// 'sort_order' => 'ASC',
8+
// 'sort_column' => 'post_title', // post_title | ID
9+
// 'post_status' => ['publish'],
10+
// ]);
11+
12+
// $pgs = ! is_array( $pgs ) ? [] : $pgs;
13+
// $opgs = [];
14+
15+
// foreach ($pgs as $__) {
16+
// $opgs[ $__->ID ] = ( string ) $__->ID . ' :: ' . $__->post_title;
17+
// }
18+
19+
/* Config: Options */
20+
$options = [
21+
'no_so' => [
22+
'title' => esc_html__('Sign-on Settings', 'natokpe'),
23+
'option_key' => 'no_so',
24+
'parent_slug' => 'no_',
25+
'capability' => 'manage_options',
26+
'tab_group' => 'no_impact',
27+
'tab_title' => 'Sign-on',
28+
29+
// 'position' => 20, // Menu position. Only applicable if 'parent_slug' is left empty.
30+
// 'admin_menu_hook' => 'network_admin_menu', // 'network_admin_menu' to add network-level options page.
31+
// 'display_cb' => false, // Override the options-page form output (CMB2_Hookup::options_page_output()).
32+
'save_button' => esc_html__('Save', 'natokpe' ), // The text for the options-page save button. Defaults to 'Save'.
33+
// 'disable_settings_errors' => true, // On settings pages (not options-general.php sub-pages), allows disabling.
34+
// 'message_cb' => 'yourprefix_options_page_message_callback',
35+
36+
'page-sections' => [
37+
'no_so_t' => [
38+
// 'name' => 'Intro',
39+
// 'desc' => '',
40+
41+
'fields' => [
42+
],
43+
],
44+
],
45+
],
46+
];
47+
48+
// var_dump($options); exit;
49+
50+
return $options;

0 commit comments

Comments
 (0)