Table of Contents generated with DocToc
This file contains hidden or 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 | |
namespace Site\Logging; | |
use Monolog\Logger; | |
use Inpsyde\Wonolog\PhpErrorController as Base_Controller; | |
use Inpsyde\Wonolog\Data\Log; | |
use Inpsyde\Wonolog\Channels; |
This file contains hidden or 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
FROM wordpressdevelop/phpunit:${LOCAL_PHPUNIT:-latest} | |
# install xdebug | |
RUN pecl install -f xdebug \ | |
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini; |
This file contains hidden or 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 | |
// phpcs:ignoreFile PSR1.Files.SideEffects | |
namespace CoreFunctionality\BlockEditor; | |
/** | |
* Fixes Bug #51612 in WordPress Core | |
* where block filters (pre_render_block and render_block_data) | |
* only get called for top level blocks (not for innerBlocks/nested) | |
* |
This file contains hidden or 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 | |
/** | |
* Allows setting UpdraftPlus settings via wp-config.php constants | |
* | |
* Usefull for setting AWS S3 Access/Secret Keys in a constant instead of saving it in the database | |
* Set the constant UPDRAFT_S3_SETTINGS with configuration like this: | |
* ```php | |
* define('UPDRAFT_S3_SETTINGS', [ | |
* 'accesskey' => 'accesskey', |
This file contains hidden or 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 | |
/** | |
* Allows setting BackWPup settings via wp-config.php constants | |
* | |
* Usefull for setting AWS S3 Access/Secret Keys in a constant instead of saving it in the database | |
* Set the constant BACKWPUP_SETTINGS with configuration per jobid(!) like this: | |
* ```php | |
* define('BACKWPUP_SETTINGS', [ | |
* '1' => [ // jobid |
This file contains hidden or 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
// when duplicating a elementor template elementor save_post hook get's fired before all the post meta is duplicated | |
// and elementor sets the template type to the default page --> popups cannot be dupliated | |
// so the elementor key is removed from duplicating and duplicatd manually later on | |
add_filter('duplicate_post_meta_keys_filter', function ($keys) { | |
if ($k = array_search('_elementor_template_type', $keys)) { | |
array_splice($keys, $k, 1); | |
} | |
return $keys; | |
}); |
Table of Contents generated with DocToc
This file contains hidden or 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
import { Fragment } from "@wordpress/element"; | |
import { InnerBlocks } from "@wordpress/editor"; | |
/** | |
* Changes the edit function of an ACF-block to allow InnerBlocks | |
* Should be called like this on `editor.BlockEdit` hook: | |
* ` addFilter("editor.BlockEdit", "namespace/block", editWithInnerBlocks("acf/block-name"));` | |
* | |
* @param {string} blockName the name of the block to wrap | |
* @param {object} innerBlockParams params to be passed to the InnerBlocks component (like allowedChildren) |
This file contains hidden or 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
/** | |
* Sets the post id from an acf ajax request | |
* This is needed for the post_type location rule to work on block field groups | |
*/ | |
add_filter('acf/location/screen', function ($screen) { | |
$postID = get_the_ID(); | |
if (!$postID) { | |
$postID = $_REQUEST['post_id'] ?? false; | |
} |