This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function __construct() | |
{ | |
add_filter('render_block', array($this, 'render_custom_image'), 10, 2); | |
} | |
public function render_custom_image($block_content, $block) | |
{ | |
if ($block['blockName'] === 'core/image') { | |
$image_id = $block['attrs']['id'] ?? null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------- functions.php ----------------------------------- | |
/** | |
* Add Attachment Credit | |
*/ | |
function CustomAttachmentFields( $form_fields, $post ) { | |
$form_fields['custom_credit'] = array( | |
'label' => __('Image credit', BOOTSTRAPTHEME_TEXTDOMAIN), | |
'input' => 'text', | |
'value' => get_post_meta( $post->ID, 'custom_credit', true ), | |
'helps' => __('If provided, photo credit will be displayed', BOOTSTRAPTHEME_TEXTDOMAIN), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[rules] => Array ( | |
[category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2] | |
[category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2] | |
[category/(.+?)/page/?([0-9]{1,})/?$] => index.php?category_name=$matches[1]&paged=$matches[2] | |
[category/(.+?)/?$] => index.php?category_name=$matches[1] | |
[tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2] | |
[tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2] | |
[tag/([^/]+)/page/?([0-9]{1,})/?$] => index.php?tag=$matches[1]&paged=$matches[2] | |
[tag/([^/]+)/?$] => index.php?tag=$matches[1] | |
[type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php bin/console mautic:update:find | |
php bin/console mautic:update:apply | |
php bin/console mautic:update:apply --finish | |
php bin/console doctrine:migration:status | |
php bin/console doctrine:schema:update | |
php bin/console doctrine:schema:update --force | |
php bin/console cache:clear | |
rm -rf var/cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuração do plugin JMS Post Views | |
- Precisa ter acesso para criação de Vistas de Propriedade | |
- Clique em Administrador e navegue até a conta e a propriedade às quais você quer adicionar a vista. | |
- Na coluna VISTA DA PROPRIEDADE, clique no menu e em Criar vista da propriedade. | |
- Selecione Site ou App para dispositivos móveis. Qual é a diferença? | |
- Insira um Nome. | |
- Use um nome específico e descritivo. Assim, é possível saber quais dados estão nessa vista ao ver o nome em uma lista. | |
- Selecione o Fuso horário dos relatórios. | |
- Marque o checkbox Filtragem de bots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE jp_blogs SET domain='blog.jovempan.uol.com.br'; | |
UPDATE jp_site SET domain='blog.jovempan.uol.com.br'; | |
UPDATE jp_options SET option_value='http://blog.jovempan.uol.com.br' WHERE option_name='siteurl'; | |
UPDATE jp_options SET option_value='http://blog.jovempan.uol.com.br' WHERE option_name='home'; | |
UPDATE jp_1_options SET option_value=replace(option_value, 'http://blog.jovempan.uol.com.br', 'http://blog.jovempan.uol.com.br') WHERE option_name='siteurl'; | |
UPDATE jp_1_options SET option_value=replace(option_value, 'https://blog.jovempan.uol.com.br', 'http://blog.jovempan.uol.com.br') WHERE option_name='siteurl'; | |
UPDATE jp_1_options SET option_value=replace(option_value, 'http://blog.jovempan.uol.com.br', 'http://blog.jovempan.uol.com.br') WHERE option_name='home'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Wordpress postmeta find&replace code | |
* | |
* This file should be run on your source database to echo out update statements to run on your migrated database. | |
* It is to address the issue of when doing a find/replace on an sql file during a wordpress migration, that breaks | |
* any content changed within wordpress serialized meta values, particularly if you have custom post types etc. | |
* | |
* Do your normal find/replace over the exported sql, import it into your new database, then run this code and copy the resulting | |
* update SQL into your new database to fix it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Set our Old and New URLS */ | |
SET @oldurl := "http://www.oldsite.com"; | |
SET @newurl := "http://www.newsite.com"; | |
/* Replaces URL in WordPress Home and Site URL in wp_options */ | |
UPDATE wp_options SET option_value = replace(option_value, @oldurl, @newurl) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
/* Replaces URL in GUID of all posts/cpt/etc */ | |
/* https://deliciousbrains.com/wordpress-post-guids-sometimes-update/ */ | |
UPDATE wp_posts SET guid = replace(guid, @oldurl, @newurl); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Internacionalizando seu tema | |
Para tornar seu tema traduzível é necessário adicionar os seguintes comentários no arquivo style.css: | |
/** | |
* Theme Name: Apenas um exemplo | |
* Author: Autor do tema | |
* Text Domain: apenas-um-exemplo | |
* Domain Path: /languages | |
*/ |
NewerOlder