0 down vote favorite
i'm working on plugin for wordpress, which can automatically generate a qr code with google chart within each posts in the wordpress backend and download the qr code, because i need further functionality.
The issue is to get the link for the post as you see it on the frontend: eksample.com/animals-in-zoo/ instead of the link to the backend: eksample.com/wp-admin/post.php?post=100&action=edit for generating qr code with google chart.
I'm a totally beginner and i have searched through google to find information how to do this and i got so far. I created the setup and php file for the plugin and added a custom meta box for the post page, where the qr code should be generated and with a option to download it.
I need to know how to do following:
Generate qr code with google chart so it gets the fronend link and not the backend from wordpress
Option to download it afterwards
So far the plugin looks like this:
<?php
function qcqr_add_meta_box() {
add_meta_box(
'qcqr_download', // The id for the metabox
'Download QR Kode', // The titel for the metabox
'qcqr_display_quickcode_download_metabox', // The function for rendering the markup
'post', // Where it will be displayed
'side', // Positioning of the metabox in edit/new posts
'high' // Priority of where the metabox will be displayed
}
add_action( 'add_meta_boxes', 'qcqr_add_meta_box' );
function qcqr_display_quickcode_download_metabox() {
}
Hope you can help me out, it would be very kind of you.
Thank you very much
Best regards Fred the man