1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2025-04-19 13:45:35 +03:00

Add shortcode support.

This commit is contained in:
Gytis Repečka 2020-07-17 16:58:32 +03:00
parent a8291082b5
commit a57e6e7460
Signed by: gytisrepecka
GPG key ID: BE7648906D706003
3 changed files with 42 additions and 0 deletions

View file

@ -100,4 +100,18 @@ class Plugin_Name_Public {
}
/**
* Shortcode processing function.
* Shortcode can take arguments like [plugin-name-shortcode argm='123']
*/
public function plugin_name_shortcode_func($atts) {
$a = shortcode_atts( array(
'argm' => '0',
), $atts
);
return (
$a['argm']
);
}
}