Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
open-source
Base WordPress Project
Commits
dd7837c9
Commit
dd7837c9
authored
1 year ago
by
Leonardo Piccioni de Almeida
Browse files
Options
Download
Email Patches
Plain Diff
Remove external hacklab-blocks as a plugin submodule
parent
59e9fd24
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
65 deletions
+0
-65
.gitmodules
.gitmodules
+0
-3
compose/local/watcher/Dockerfile-node14
compose/local/watcher/Dockerfile-node14
+0
-13
dev-scripts/compila-plugin.sh
dev-scripts/compila-plugin.sh
+0
-8
docker-compose.yml
docker-compose.yml
+0
-8
plugins/hacklab-blocks
plugins/hacklab-blocks
+0
-1
themes/hacklab-theme/functions.php
themes/hacklab-theme/functions.php
+0
-1
themes/hacklab-theme/library/hacklab-blocks/index.php
themes/hacklab-theme/library/hacklab-blocks/index.php
+0
-31
No files found.
.gitmodules
View file @
dd7837c9
[submodule "plugins/hacklab-dev-utils"]
path = plugins/hacklab-dev-utils
url = git@gitlab.hacklab.com.br:open-source/hacklab-dev-utils.git
[submodule "plugins/hacklab-blocks"]
path = plugins/hacklab-blocks
url = git@gitlab.hacklab.com.br:open-source/hacklab-blocks.git
This diff is collapsed.
Click to expand it.
compose/local/watcher/Dockerfile-node14
deleted
100644 → 0
View file @
59e9fd24
FROM node:14
LABEL mantainer "hacklab/ <contato@hacklab.com.br>"
COPY compose/local/watcher/entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN mkdir /app
WORKDIR /app
This diff is collapsed.
Click to expand it.
dev-scripts/compila-plugin.sh
deleted
100644 → 0
View file @
59e9fd24
#!/bin/bash
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
cd
$DIR
/../plugins/hacklab-blocks
docker run
-it
-v
`
pwd
`
:/compilar node:14 bash
-c
"cd compilar && npm install && npm run production"
ls
pwd
cd
$DIR
/../plugins/
zip
-r
../zips/hacklab-blocks.zip hacklab-blocks
-x
"hacklab-blocks/node_modules/*"
This diff is collapsed.
Click to expand it.
docker-compose.yml
View file @
dd7837c9
...
...
@@ -20,7 +20,6 @@ services:
-
./wp-root:/var/www/html/
-
./themes/hacklab-theme:/var/www/html/wp-content/themes/hacklab-theme
-
./plugins/hacklab-dev-utils:/var/www/html/wp-content/plugins/hacklab-dev-utils
-
./plugins/hacklab-blocks:/var/www/html/wp-content/plugins/hacklab-blocks
-
./compose/local/wordpress/htaccess:/var/www/html/.htaccess
-
./compose/local/wordpress/php/extra.ini:/usr/local/etc/php/conf.d/extra.ini
...
...
@@ -31,13 +30,6 @@ services:
volumes
:
-
./themes/hacklab-theme:/app
watcher-plugin
:
build
:
context
:
.
dockerfile
:
./compose/local/watcher/Dockerfile-node14
# Workaround until we update the blocks plugin
volumes
:
-
./plugins/hacklab-blocks:/app
mariadb
:
image
:
mariadb:10.4
volumes
:
...
...
This diff is collapsed.
Click to expand it.
hacklab-blocks
@
8857e9f1
Compare
8857e9f1
...
8857e9f1
Subproject commit 8857e9f1386d9ed0f39b9c66d8df617d73c18664
This diff is collapsed.
Click to expand it.
themes/hacklab-theme/functions.php
View file @
dd7837c9
...
...
@@ -13,7 +13,6 @@ require __DIR__ . '/library/sanitizers/index.php';
require
__DIR__
.
'/library/template-tags/index.php'
;
require
__DIR__
.
'/library/utils.php'
;
require
__DIR__
.
'/library/blocks/index.php'
;
require
__DIR__
.
'/library/hacklab-blocks/index.php'
;
//Hide menu item if logged
function
hide_menu_item_if_logged_in_ethos
(
$items
,
$menu
,
$args
)
{
...
...
This diff is collapsed.
Click to expand it.
themes/hacklab-theme/library/hacklab-blocks/index.php
deleted
100644 → 0
View file @
59e9fd24
<?php
namespace
hacklabr
;
/**
* Exemplo para filtrar blocos do plugin Hacklab Blocks
*
* Descomente a linha abaixo e filtre os blocos na função `active_hacklab_blocks`
*/
//add_filter( 'hacklab_blocos_ativos', 'hacklabr\\active_hacklab_blocks' );
function
active_hacklab_blocks
(
$active_blocks
){
// unset( $active_blocks['sample-block'] );
return
$active_blocks
;
}
/**
* Exemplo de como adicionar elementos nos filtros do bloco Posts via API
*
* Descomente a linha abaixo para adicionar, por exemplo, para adicionar os atributos (image_credits e meta_authors) à resposta da API **no projeto de onde vem os posts**.
*/
// add_filter('hacklab-fetch-posts-api-before-excerpt-embed_post','hacklabr\\add_image_credits',10,3);
function
add_image_credits
(
$content
,
$attributes
,
$post
)
{
if
(
$attributes
[
'showImageCredit'
]
==
true
)
{
$content
.
=
'<p class="post-image-credit">Foto: '
.
$post
[
'image_credit'
]
.
'</p>'
;
}
$content
.
=
'<p class="post-authors">'
.
$post
[
'meta_authors'
]
.
'</p>'
;
return
$content
;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment