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 | |
// Activate WordPress Maintenance Mode | |
add_action('get_header', function () { | |
if (!current_user_can('edit_themes') || !is_user_logged_in()) { | |
wp_die('<h1>Website Under Maintenance</h1><br />We have got some exciting updates lined up for you. We will be back online! Thank you. 🙏', 'Website Under Maintenance'); | |
} | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Protect Youtube</title> | |
<link rel="stylesheet" href="https://cdn.plyr.io/3.6.12/plyr.css" /> | |
<style> | |
/** |
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
<!doctype html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Simple Transactional Email</title> | |
<style> | |
/* ------------------------------------- | |
GLOBAL RESETS |
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: Custom WP Email Template | |
* Plugin URI: https://www.dhimaskirana.com/cara-memasang-template-email-html-di-wordpress/ | |
* Description: Plugin sederhana untuk menggunakan custom html pada fungsi wp_mail() | |
* Version: 1.0 | |
* Requires at least: 5.2 | |
* Requires PHP: 7.2 | |
* Author: Dhimas Kirana |
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: Belajar Plugin | |
* Plugin URI: https://www.dhimaskirana.com/ | |
* Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pharetra vehicula quam. Sed blandit lobortis sem sit amet egestas. Suspendisse posuere cursus vehicula. | |
* Version: 1.0 | |
* Requires at least: 5.2 | |
* Requires PHP: 7.2 | |
* Author: Dhimas Kirana | |
* Author URI: https://www.dhimaskirana.com/ |
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: WP Testing Admin AJAX | |
Plugin URI: https://www.dhimaskirana.com/ | |
Description: Testing AJAX pada wp-admin dashboard | |
Author: Dhimas Kirana | |
Version: 1.0 | |
Author URI: https://www.dhimaskirana.com/ | |
*/ |
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 | |
add_filter('nav_menu_css_class', 'tambah_class_pada_li', 1, 3); | |
function tambah_class_pada_li($classes, $item, $args) { | |
// Kondisional jika class li tag berbeda pada lokasi menu yang berbeda | |
if ($args->theme_location == 'menu-footer') { | |
$classes[] = 'list-inline-item'; | |
} else { | |
$classes[] = 'nav-item'; |
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: Custom Email Template wp_mail() | |
* Plugin URI: https://pakaiwp.com/ | |
* Description: Plugin sederhana untuk menggunakan custom html pada fungsi wp_mail() | |
* Version: 1.0 | |
* Requires at least: 5.2 | |
* Requires PHP: 7.2 | |
* Author: Dhimas Kirana |
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 | |
function nws_email_template($message, $subject) { | |
// Email Template | |
$template_file = get_stylesheet_directory() . '/emails/default.php'; | |
// Render Template | |
ob_start(); | |
include_once( $template_file ); | |
$nws_template = ob_get_contents(); | |
ob_end_clean(); |