/** *Perform operations while publishing post */ function rps_publish_post() { $slider_content = get_option('rps_slider_content'); if ($slider_content == 1 || $slider_content == 3) { global $post; rps_post_img_thumb((int) $post->ID); } else { return; } }
$excerpt_words = $_POST['rps_excerpt_words']; update_option('rps_excerpt_words', $excerpt_words); $keep_excerpt_tags = $_POST['rps_keep_excerpt_tags']; update_option('rps_keep_excerpt_tags', $keep_excerpt_tags); $link_text = $_POST['rps_link_text']; update_option('rps_link_text', $link_text); $show_post_date = $_POST['rps_show_post_date']; update_option('rps_show_post_date', $show_post_date); $post_date_text = $_POST['rps_post_date_text']; update_option('rps_post_date_text', $post_date_text); $post_date_format = $_POST['rps_post_date_format']; update_option('rps_post_date_format', $post_date_format); $custom_css = $_POST['rps_custom_css']; update_option('rps_custom_css', $custom_css); if ($slider_content == 1 || $slider_content == 3) { rps_post_img_thumb(); } ?> <?php if (empty($error)) { ?> <div class="updated"><p><strong><?php _e('Settings saved.', 'rps'); ?> </strong></p></div> <?php } else { ?> <div class="error"><p><strong><?php foreach ($error as $key => $val) { _e($val, 'rps');