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
jQuery(function ($){ | |
// alert('helo rentalist') | |
}) |
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 | |
/* | |
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 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 | |
if ( isset( $_REQUEST['rentalist_setting_save'] ) | |
&& isset( $_REQUEST['rentalist_setting'] ) | |
&& $_REQUEST['rentalist_setting'] != '' ) { | |
do_action( 'rentalist_save_settings', $_POST ); | |
} | |
echo '<div class="wrap">'; | |
if ( isset( $_SESSION['vap_cfg_msg_status'] ) && $_SESSION['vap_cfg_msg_status'] ) { |
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 | |
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'] != '' ) { |
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 | |
/* | |
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 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
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 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
wp_localize_script('wptail', 'wpenginerData', array( | |
'root_url' => get_site_url(), | |
'nonce' => wp_create_nonce('wp_rest') | |
)); |
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
#video-ads-insert { | |
width: 100%; | |
height: 100%; | |
position: absolute; | |
z-index: 1000; | |
color: #FFF; | |
background: #FFF; | |
text-align: center | |
} |
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
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(); |