Skip to content

Instantly share code, notes, and snippets.

@djrmom
Last active June 27, 2017 14:39
Show Gist options
  • Save djrmom/9958631f175f679facdb378de6f7643b to your computer and use it in GitHub Desktop.
Save djrmom/9958631f175f679facdb378de6f7643b to your computer and use it in GitHub Desktop.
amazon lister customizations
<?php
/**
* Example code for adding custom shortcodes for WP-Lister Pro for Amazon
*/
/**
* Returns value to output in wpla shortcode
*
* @param $post_id
* @param $product
* @param $item
* @param $profile
* @return string
*/
function prefix_custom_shortcode( $post_id, $product, $item, $profile ) {
/** create a value to output in amazon listing **/
return $value;
}
/**
* register shortcodes for use with wpla
*
* @since 1.0.0
* @return void
*/
function prefix_register_wpla_shortcodes() {
wpla_register_profile_shortcode( 'prefix_shortcode_name', 'Shortcode Name', 'prefix_custom_shortcode' );
}
add_action( 'plugins_loaded', 'prefix_register_wpla_shortcodes' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment