Created
February 9, 2023 12:08
-
-
Save Alimir/d0f45b86ce0ab74a3f9323366764f882 to your computer and use it in GitHub Desktop.
wp ulike shortcode to get stats values
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 | |
function wp_ulike_custom_stats_shortcode( $atts, $content = null ){ | |
// Default Args | |
$args = shortcode_atts( array( | |
"period" => 'all' // you can use all, today, yesterday values | |
), $atts ); | |
return wp_ulike_count_all_logs( $args['period'] ); | |
} | |
add_shortcode( 'wp_ulike_custom_stats', 'wp_ulike_custom_stats_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment