Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( "the_content", "cp_module_pcontent_post_content" );
- function cp_module_pcontent_post_content($content){
- global $post;
- global $cp_module_pcontent_hide;
- if(!in_array($post->ID,(array)$cp_module_pcontent_hide)){
- return $content;
- }
- $c = '<p>' . get_option('cp_module_pcontent_text_pay') . '</p>';
- $c .= apply_filters('cp_module_pcontent_post_content_'.$post->ID, '');
- $c .= '<form method="post">';
- $c .= '<input type="hidden" name="cp_module_pcontent_pay" value="'.$post->ID.'" />';
- $c .= '<p><input type="submit" value="'.get_option('cp_module_pcontent_text_button').'" /></p>';
- $c .= '</form>';
- if(!is_user_logged_in()){
- $c = get_option('cp_module_pcontent_text_logout');
- }
- $c = str_replace('%points%',cp_formatPoints(get_post_meta($post->ID,'cp_pcontent_points', 1)),$c);
- return $c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement