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
// By default, videos continue to run even when not visible. This is using unnecessary CPU ressources. | |
jQuery.fn.isInViewport = function () { | |
var elementTop = jQuery(this).offset().top; | |
var elementBottom = elementTop + jQuery(this).outerHeight(); | |
var viewportTop = jQuery(window).scrollTop(); | |
var viewportBottom = viewportTop + jQuery(window).height(); | |
return elementBottom > viewportTop && elementTop < viewportBottom; |
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 | |
namespace Instagram\Auth; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Cookie\CookieJar; | |
use GuzzleHttp\Exception\ClientException; | |
use Instagram\Exception\InstagramAuthException; | |
use Instagram\Exception\InstagramException; | |
use Instagram\Transport\TransportFeed; |
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 | |
add_action('admin_bar_menu', function ($admin_bar) { | |
if (!is_admin() && WP_DEBUG) $admin_bar->add_menu([ | |
'id' => 'my-item', | |
'title' => 'Breakpoint: ' . | |
'<strong class="d-sm-none">XS</strong>' . | |
'<strong class="d-none d-sm-inline d-md-none">SM</strong>' . | |
'<strong class="d-none d-md-inline d-lg-none">MD</strong>' . | |
'<strong class="d-none d-lg-inline d-xl-none">LG</strong>' . | |
'<strong class="d-none d-xl-inline">XL</strong>' |
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 | |
function underscoreToCamelCase($string) | |
{ | |
$str = str_replace(' ', '', ucwords(str_replace('_', ' ', $string))); | |
$str = lcfirst($str); | |
return $str; | |
} |
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 | |
namespace In2code\Powermailextended\Domain\Service; | |
use In2code\Powermail\Domain\Service\Mail\SendMailService as SendMailServicePowermail; | |
class SendMailService { | |
public function manipulateMail($message, &$email, SendMailServicePowermail $sendMailService) { | |
if ($email['template'] == 'Mail/OptinMail' && $email['subject'] == 'subject line') { | |
// Never send such Optin mails ... |
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 | |
use TYPO3\CMS\Core\Utility\GeneralUtility; | |
/** | |
* Class FrontendUriBuilder for creating a frontend link in the backend | |
* @package PDVSysteme\Pdvsupportbase\Util | |
* @see https://stackoverflow.com/questions/33751570/typo3-with-extbase-uribuilder-or-something-similar-in-backend-hook | |
* @license Public Domain | |
*/ |
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
server: | |
mem_limit: 301m | |
image: webgriffe/docker-php-apache-base:latest | |
links: | |
- wordpress_db | |
ports: | |
- "80:80" | |
volumes: | |
- .:/var/www/html | |
environment: |
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 | |
namespace In2code\Powermailextended\Domain\Service; | |
use In2code\Powermail\Domain\Model\Mail; | |
use TYPO3\CMS\Core\Mail\MailMessage; | |
use TYPO3\CMS\Core\Utility\GeneralUtility; | |
use In2code\Powermail\Domain\Service\SendMailService as SendMailServicePowermail; | |
/** | |
* SendMailService |
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 | |
/** | |
* The template for displaying all pages. | |
* | |
* This is the template that displays all pages by default. | |
* Please note that this is the WordPress construct of pages | |
* and that other 'pages' on your WordPress site will use a | |
* different template. | |
* | |
* @package Preferential |
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 | |
/** | |
* Verwendung: Im Email-Template können nun auch POST-Daten versendet werden, die nicht über einen WPCF7-Shortcode, sondern über HTML im Formular eingefügt wurden. | |
* <input type="date" name="special" /> | |
* [post_special] | |
*/ | |
add_filter('wpcf7_special_mail_tags', 'yt_wpcf7_mail_tags', 10, 3); | |
function yt_wpcf7_mail_tags($output, $tagname, $is_html) { |
NewerOlder