true, 'id' => true, 'name' => true, 'value' => true, 'class' => true, 'onclick' => true, ); $allowed_tags['a']['onclick'] = true; ### Variables Variables Variables $base_name = plugin_basename('wp-polls/polls-templates.php'); $base_page = 'admin.php?page='.$base_name; $id = ( isset($_GET['id'] ) ? (int) sanitize_key( $_GET['id'] ) : 0 ); ### If Form Is Submitted if( isset($_POST['Submit']) && $_POST['Submit'] ) { check_admin_referer('wp-polls_templates'); $poll_template_voteheader = wp_kses_post( trim( $_POST['poll_template_voteheader'] ) ); $poll_template_votebody = wp_kses( $_POST['poll_template_votebody'], $allowed_tags ); $poll_template_votefooter = wp_kses( $_POST['poll_template_votefooter'], $allowed_tags ); $poll_template_resultheader = wp_kses_post( trim($_POST['poll_template_resultheader'] ) ); $poll_template_resultbody = wp_kses_post( trim($_POST['poll_template_resultbody'] ) ); $poll_template_resultbody2 = wp_kses_post( trim($_POST['poll_template_resultbody2'] ) ); $poll_template_resultfooter = wp_kses( trim($_POST['poll_template_resultfooter'] ), $allowed_tags ); $poll_template_resultfooter2 = wp_kses( trim($_POST['poll_template_resultfooter2'] ), $allowed_tags ); $poll_template_pollarchivelink = wp_kses_post( trim($_POST['poll_template_pollarchivelink'] ) ); $poll_template_pollarchiveheader = wp_kses_post( trim($_POST['poll_template_pollarchiveheader'] ) ); $poll_template_pollarchivefooter = wp_kses_post( trim($_POST['poll_template_pollarchivefooter'] ) ); $poll_template_pollarchivepagingheader = wp_kses_post( trim($_POST['poll_template_pollarchivepagingheader'] ) ); $poll_template_pollarchivepagingfooter = wp_kses_post( trim($_POST['poll_template_pollarchivepagingfooter'] ) ); $poll_template_disable = wp_kses_post( trim($_POST['poll_template_disable'] ) ); $poll_template_error = wp_kses_post( trim($_POST['poll_template_error'] ) ); $update_poll_queries = array(); $update_poll_text = array(); $update_poll_queries[] = update_option('poll_template_voteheader', $poll_template_voteheader); $update_poll_queries[] = update_option('poll_template_votebody', $poll_template_votebody); $update_poll_queries[] = update_option('poll_template_votefooter', $poll_template_votefooter); $update_poll_queries[] = update_option('poll_template_resultheader', $poll_template_resultheader); $update_poll_queries[] = update_option('poll_template_resultbody', $poll_template_resultbody); $update_poll_queries[] = update_option('poll_template_resultbody2', $poll_template_resultbody2); $update_poll_queries[] = update_option('poll_template_resultfooter', $poll_template_resultfooter); $update_poll_queries[] = update_option('poll_template_resultfooter2', $poll_template_resultfooter2); $update_poll_queries[] = update_option('poll_template_pollarchivelink', $poll_template_pollarchivelink); $update_poll_queries[] = update_option('poll_template_pollarchiveheader', $poll_template_pollarchiveheader); $update_poll_queries[] = update_option('poll_template_pollarchivefooter', $poll_template_pollarchivefooter); $update_poll_queries[] = update_option('poll_template_pollarchivepagingheader', $poll_template_pollarchivepagingheader); $update_poll_queries[] = update_option('poll_template_pollarchivepagingfooter', $poll_template_pollarchivepagingfooter); $update_poll_queries[] = update_option('poll_template_disable', $poll_template_disable); $update_poll_queries[] = update_option('poll_template_error', $poll_template_error); $update_poll_text[] = __('Voting Form Header Template', 'wp-polls'); $update_poll_text[] = __('Voting Form Body Template', 'wp-polls'); $update_poll_text[] = __('Voting Form Footer Template', 'wp-polls'); $update_poll_text[] = __('Result Header Template', 'wp-polls'); $update_poll_text[] = __('Result Body Template', 'wp-polls'); $update_poll_text[] = __('Result Body2 Template', 'wp-polls'); $update_poll_text[] = __('Result Footer Template', 'wp-polls'); $update_poll_text[] = __('Result Footer2 Template', 'wp-polls'); $update_poll_text[] = __('Poll Archive Link Template', 'wp-polls'); $update_poll_text[] = __('Poll Archive Poll Header Template', 'wp-polls'); $update_poll_text[] = __('Poll Archive Poll Footer Template', 'wp-polls'); $update_poll_text[] = __('Poll Archive Paging Header Template', 'wp-polls'); $update_poll_text[] = __('Poll Archive Paging Footer Template', 'wp-polls'); $update_poll_text[] = __('Poll Disabled Template', 'wp-polls'); $update_poll_text[] = __('Poll Error Template', 'wp-polls'); $i=0; $text = ''; foreach($update_poll_queries as $update_poll_query) { if($update_poll_query) { $text .= '

'.$update_poll_text[$i].' '.__('Updated', 'wp-polls').'

'; } $i++; } if(empty($text)) { $text = '

'.__('No Poll Option Updated', 'wp-polls').'

'; } wp_clear_scheduled_hook('polls_cron'); if (!wp_next_scheduled('polls_cron')) { wp_schedule_event(time(), 'daily', 'polls_cron'); } } ?>

'.$text.'

'; } ?>

%POLL_ID%
%POLL_ANSWER_ID%
%POLL_QUESTION%
%POLL_ANSWER%
%POLL_TOTALVOTES%
%POLL_ANSWER_TEXT%
%POLL_RESULT_URL%
%POLL_ANSWER_VOTES%
%POLL_MOST_ANSWER%
%POLL_ANSWER_PERCENTAGE%
%POLL_MOST_VOTES%
%POLL_ANSWER_IMAGEWIDTH%
%POLL_MOST_PERCENTAGE%
%POLL_LEAST_ANSWER%
%POLL_START_DATE%
%POLL_LEAST_VOTES%
%POLL_END_DATE%
%POLL_LEAST_PERCENTAGE%
%POLL_MULTIPLE_ANS_MAX%
%POLL_CHECKBOX_RADIO%
%POLL_TOTALVOTERS%
%POLL_ARCHIVE_URL%
%POLL_TOTALVOTES% and %POLL_TOTALVOTERS% will be different if your poll supports multiple answers. If your poll allows only single answer, both value will be the same.', 'wp-polls'); ?>





- %POLL_ID%

- %POLL_QUESTION%

- %POLL_START_DATE%

- %POLL_END_DATE%

- %POLL_TOTALVOTES%

- %POLL_TOTALVOTERS%

- %POLL_MULTIPLE_ANS_MAX%






- %POLL_ID%

- %POLL_ANSWER_ID%

- %POLL_ANSWER%

- %POLL_ANSWER_VOTES%

- %POLL_CHECKBOX_RADIO%






- %POLL_ID%

- %POLL_RESULT_URL%

- %POLL_MULTIPLE_ANS_MAX%






- %POLL_ID%

- %POLL_QUESTION%

- %POLL_START_DATE%

- %POLL_END_DATE%

- %POLL_TOTALVOTES%

- %POLL_TOTALVOTERS%

- %POLL_MULTIPLE_ANS_MAX%






- %POLL_ID%

- %POLL_ANSWER_ID%

- %POLL_ANSWER%

- %POLL_ANSWER_TEXT%

- %POLL_ANSWER_VOTES%

- %POLL_ANSWER_PERCENTAGE%

- %POLL_ANSWER_IMAGEWIDTH%






- %POLL_ID%

- %POLL_ANSWER_ID%

- %POLL_ANSWER%

- %POLL_ANSWER_TEXT%

- %POLL_ANSWER_VOTES%

- %POLL_ANSWER_PERCENTAGE%

- %POLL_ANSWER_IMAGEWIDTH%






- %POLL_ID%

- %POLL_START_DATE%

- %POLL_END_DATE%

- %POLL_TOTALVOTES%

- %POLL_TOTALVOTERS%

- %POLL_MOST_ANSWER%

- %POLL_MOST_VOTES%

- %POLL_MOST_PERCENTAGE%

- %POLL_LEAST_ANSWER%

- %POLL_LEAST_VOTES%

- %POLL_LEAST_PERCENTAGE%

- %POLL_MULTIPLE_ANS_MAX%






- %POLL_ID%

- %POLL_START_DATE%

- %POLL_END_DATE%

- %POLL_TOTALVOTES%

- %POLL_TOTALVOTERS%

- %POLL_MOST_ANSWER%

- %POLL_MOST_VOTES%

- %POLL_MOST_PERCENTAGE%

- %POLL_LEAST_ANSWER%

- %POLL_LEAST_VOTES%

- %POLL_LEAST_PERCENTAGE%

- %POLL_MULTIPLE_ANS_MAX%






- %POLL_ARCHIVE_URL%






-






- %POLL_START_DATE%

- %POLL_END_DATE%

- %POLL_TOTALVOTES%

- %POLL_TOTALVOTERS%

- %POLL_MOST_ANSWER%

- %POLL_MOST_VOTES%

- %POLL_MOST_PERCENTAGE%

- %POLL_LEAST_ANSWER%

- %POLL_LEAST_VOTES%

- %POLL_LEAST_PERCENTAGE%

- %POLL_MULTIPLE_ANS_MAX%






-






-






-






-