- This topic has 1 reply, 2 voices, and was last updated 12 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP PDF Stamper › Correctly accessing the stamp_api from functions.php
Tagged: api, integration
Hi there,
I’ve integrated the pdf stamper into my theme and I just wanted to double check that I’m accessing the api and the secret key in the best way possible.
This theme is currently just for my site. But I’m also genericising it and in a few weeks I will be adding it to a theme marketplace. I will leave in the support for pdf-stamper and if buyers of my theme want to also buy your plugin then they can.
Anyway – let me know if you want to see the whole of my stamper code. In reality you probably only need to see how I’m getting the values.
// Post URL (Get this value from the Integration Help menu of this plugin)
$postURL = get_option(‘WP_PDF_STAMP_URL’) . ‘/api/stamp_api.php’;
// The Secret key (Get this value from the settings menu of this plugin)
$secretKey = get_option(‘wp_pdf_stamp_secret_key’);
Of course, I’ll only attempt to use the pdf-stamper if the theme admin user has specifically set my theme option ‘use-pdf-stamper’ to true, otherwise i revert to using php copy()
Thanks,
S
Yes, your code looks fine.