Skip to content

Instantly share code, notes, and snippets.

@robertuniqid
Created October 31, 2018 21:56
Show Gist options
  • Save robertuniqid/e61d26ca1f0976109c885880ffc725a1 to your computer and use it in GitHub Desktop.
Save robertuniqid/e61d26ca1f0976109c885880ffc725a1 to your computer and use it in GitHub Desktop.
WPEP_Content_Library_Integration
<?php
class WPEPContentLibraryIntegrationExample extends WPEP_Content_Library_Integration {
public $service_name = 'Integration Name';
public $meta_box_active = true; // If you want to integrate with the Content Library without the Metabox, simply set this to false.
public $meta_box_title = 'Integration Name';
public $default_purchase_cta = 'Upgrade Membership Plan';
public $redirect_meta_field_suffix = '_upgrade_link';
public $prefix = 'wpep_%'; // Replace % with your plugin shorthand name
public $slug = 'wpep-%'; // Replace % with your plugin shorthand name
public $options_prefix = 'wpep_%'; // Replace % with your plugin shorthand name
public function __construct() {
$this->init();
}
public function has_access( $post_id ) {
return true; // or False, for the currently logged in user.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment