Last active
April 2, 2023 16:22
-
-
Save wplokal/f5b4c7e5cf07da7e8e1216cda73d64a8 to your computer and use it in GitHub Desktop.
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: 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