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 | |
$app_name = $_SERVER['HTTP_HOST']; | |
$seo_title = $app_name; | |
$seo_description = 'This website is currently out of service!'; | |
$body_message = $seo_description; | |
header('HTTP/1.1 503 Service Temporarily Unavailable'); | |
header('Status: 503 Service Temporarily Unavailable'); | |
header('Retry-After: 86400'); // 86400 seconds = 1 day |
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
add_filter('get_post_metadata', 'my_default_thumbnail_id', 100, 4); | |
function my_default_thumbnail_id($check, $post_id, $key, $single) | |
{ | |
if($key == '_thumbnail_id') { | |
remove_filter('get_post_metadata', 'my_default_thumbnail_id', 100); | |
if(!has_post_thumbnail($post_id) && function_exists('get_field')) { | |
$check = get_field('placeholder_image', 'option'); | |
} | |
add_filter('get_post_metadata', 'my_default_thumbnail_id', 100, 4); | |
if(!empty($check)) { |
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
(function ($) { | |
$(document).on('pumBeforeOpen', function (e) { | |
console.log('pumBeforeOpen', e); | |
$(e.target).find('.ultv-video__play').parent().each(function () { | |
if ($(this).data('default-html')) { | |
$(this).html($(this).data('default-html')); | |
} else { | |
$(this).data('default-html', $(this).html()); | |
} |
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
@media (max-width: 1199px) { | |
html[lang][class], | |
html[lang][class] body { | |
height: calc(100vh - 32px) !important; | |
margin: 0 !important; | |
padding: 0 !important; | |
} | |
html[lang][class] body * { | |
display: none !important; |
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
// Detailed source: https://css-tricks.com/capturing-all-events/ | |
var oldAddEventListener = EventTarget.prototype.addEventListener; | |
var disabled = ['mousemove', 'mouseover']; | |
EventTarget.prototype.addEventListener = function(eventName, eventHandler) | |
{ | |
if(disabled.indexOf(eventName) === -1) { | |
console.log(eventName, eventHandler.toString()); | |
} |
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
{ | |
"+90": "Turkey", | |
"+93": "Afghanistan", | |
"+355": "Albania", | |
"+213": "Algeria", | |
"+1": "US Virgin Islands", | |
"+376": "Andorra", | |
"+244": "Angola", | |
"+54": "Argentina", | |
"+374": "Armenia", |
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 | |
$array1 = $array2 = array ( | |
0 => | |
array ( | |
'id' => '', | |
'name' => '', | |
'description' => null, | |
'categories' => false, | |
'posts' => '', |
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 | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=unix \ | |
--domains domain.com \ |
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
$.ajax( | |
'https://api.github.com/search/repositories?q=' + encodeURIComponent(search), | |
{ | |
// 'xhr' option overrides jQuery's default | |
// factory for the XMLHttpRequest object. | |
// Use either in global settings or individual call as shown here. | |
xhr: function() { | |
// Get new xhr object using default factory | |
var xhr = $.ajaxSettings.xhr(); | |
// Copy the browser's native setRequestHeader method |
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 { | |
listen 80; | |
listen [::]:80; | |
server_name parkinson.irm.com.tr; | |
root /var/www/html/parkinson/public; | |
index index.php index.html index.htm; | |
location / { |