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
# | |
# Sources: | |
# http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites | |
# http://codex.wordpress.org/Output_Compression | |
# http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086 | |
# http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/ | |
# http://gtmetrix.com/configure-entity-tags-etags.html | |
# http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014 | |
# http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress | |
# |
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
INITIALISATION | |
============== | |
load wp-config.php | |
set up default constants | |
load wp-content/advanced-cache.php if it exists | |
load wp-content/db.php if it exists | |
connect to mysql, select db | |
load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
load wp-content/sunrise.php if it exists (multisite only) |
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
<!-- custom ad video--> | |
<div id="video-ads-insert" class="position-absolute bg-primary" > | |
<div style="display: none" id="ad-will-end" class="position-absolute">This ad will end in <span id="counter-duration">24</span>s</div> | |
<div style="display: none" id="skip-ad" class="position-absolute p-2 border rounded" > | |
Skip ad in <span id="counter-limit">5</span>s</div> | |
<div id="play-ad" class="position-absolute p-2 " > | |
<i class="fa fa-play" aria-hidden="true"></i> | |
</div> | |
<video id="wayang-ad" controls class="w-100 h-100" style="width: inherit; height: inherit"> |
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
jQuery(document).ready(function () { | |
jQuery('#play-ad').click( | |
function () { | |
jQuery('#play-ad').remove(); | |
jQuery('#ad-will-end, #skip-ad').show(); | |
let adLimit = 5; | |
let adDuration = 24; | |
document.getElementById('wayang-ad').play(); |
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
#video-ads-insert { | |
width: 100%; | |
height: 100%; | |
position: absolute; | |
z-index: 1000; | |
color: #FFF; | |
background: #FFF; | |
text-align: center | |
} |
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
wp_localize_script('wptail', 'wpenginerData', array( | |
'root_url' => get_site_url(), | |
'nonce' => wp_create_nonce('wp_rest') | |
)); |
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 wpenginer_custom_rest(){ | |
register_rest_field('post', 'authorName', array( | |
'get_callback' => function() {return get_the_author();} | |
)); | |
} | |
add_action('rest_api_init', 'wpenginer_custom_rest'); |
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 | |
/* | |
Plugin Name: Rentalist | |
Description: Create a plugin with sub menu and script.js jquery included with ajax admin | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} |
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 | |
class RT_Settings { | |
function __construct() { | |
add_action( "rentalist_save_settings", array( $this, "rentalist_save_settings_func" ), 10, 1 ); | |
} | |
function rentalist_save_settings_func( $params = array() ) { | |
if ( isset( $params['rentalist_setting'] ) && $params['rentalist_setting'] != '' ) { |
OlderNewer