<?php | |
/* | |
Plugin Name: Contoh Plugin WPLOKAL | |
Plugin URI: https://www.wplokal.com/blog/membuat-plugin-wordpress-sederhana/ | |
Description: Tutorial membuat plugin sederhana | |
Version: 1.0.0 | |
Author: Dodi Hidayatullah | |
Author URI: <a href="https://www.wplokal.com">https://www.langitstudio.com/</a> | |
License: GPL2 | |
License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
Text Domain: wplokal | |
Domain Path: /languages | |
*/ | |
/** | |
* hook filter the_content() | |
*/ | |
function wplokal_the_content_filter($content) { | |
//ganti https://www.wplokal.com/demo/my-image.jpg dengan link image kalian | |
$image = '<br><img src="https://www.wplokal.com/demo/my-image.jpg">'; | |
return $content.$image; | |
} | |
add_filter( 'the_content', 'wplokal_the_content_filter' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment