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 | |
declare(strict_types=1); | |
namespace Fluency\Engines\DeepL; | |
use \InvalidArgumentException; | |
use Fluency\App\{ FluencyErrors, FluencyLocalization }; | |
use Fluency\DataTransferObjects\{ | |
EngineApiUsageData, |
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 | |
declare(strict_types=1); | |
namespace ProcessWire; | |
require_once __DIR__ . './HookUtils/SwitchUser'; | |
wire()->addHookAfter('Pages::saveReady(template=important_template)', function(HookEvent $e) { | |
$page = $e->arguments('page'); |
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 | |
declare(strict_types=1); | |
namespace ProcessWire; | |
use InvalidArgumentException; | |
use RuntimeException; | |
use function ProcessWire\wire; |
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 | |
declare(strict_types=1); | |
namespace ProcessWire; | |
/** | |
* Show a message, warning, or error when the page tree is viewed | |
*/ |
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 | |
/** | |
* Create an interactive action button on admin page edit page very fast and easy | |
*/ | |
// Optionally make rendering conditional if that's useful | |
$shouldShowTheButton = true; | |
?> | |
<?php if ($shouldShowTheButton): ?> |
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 | |
declare(strict_types=1); | |
namespace ProcessWire; | |
use Exception; | |
/** | |
* Executes a custom action if a get parameter is present in the admin |
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 | |
declare(strict_types=1); | |
namespace ProcessWire; | |
use stdClass; | |
/** | |
* Automatically converts array or object log values to JSON |
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 ProcessWire; | |
/** | |
* Renders a Google Map | |
* Map is loaded via intersect when scrolling reaches threshold slightly above the rendered container element. | |
*/ | |
$mapField = $page->your_fieldtype_marker_field_here; | |
$apiKey = $modules->get('FieldtypeMapMarker')->googleApiKey; | |
$address = null; | |
$mapMarker = 1; | |
$title = null; |
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 | |
declare(strict_types=1); | |
namespace ProcessWire; | |
/** | |
* Sets the map address from the address subfields | |
* | |
* This uses a ProFields Custom Field called address with subfields to store the address |
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 | |
declare(strict_types=1); | |
namespace ProcessWire; | |
require_once __DIR__ . '/../HookUtils/TranslateField.php'; | |
/** | |
* Automatically translates content for multilanguage fields when a page is saved |
NewerOlder