function tdomf_widget_tags_options($form_id) { $options = tdomf_get_option_widget('tdomf_tags_widget', $form_id); if ($options == false) { $options = array(); $options['title'] = ""; $options['required'] = false; $options['default'] = ''; $options['user'] = true; } return $options; }
function tdomf_widget_notify_get_message($form_id, $type, $process = false, $post_id = false) { $options = tdomf_get_option_widget('notifyme', $form_id); $message = ""; if ($options == false) { switch ($type) { case 'approved': $message = sprintf(__("This is just a quick email to notify you that your post has been approved and published online. You can see it at %s.\n\n", "tdomf"), TDOMF_MACRO_SUBMISSIONURL); $message .= __("Best Regards", "tdomf") . "\n"; $message .= "<?php echo get_bloginfo(\"title\"); ?>"; break; case 'rejected': $message = sprintf(__("We are sorry to inform you that your post \"%s\" has been rejected.\n\n", "tdomf"), TDOMF_MACRO_SUBMISSIONTITLE); $message .= __("Best Regards", "tdomf") . "\n"; $message .= "<?php echo get_bloginfo(\"title\"); ?>"; break; case 'approved_subject': $message = sprintf(__("[%s] Your entry \"%s\" has been approved!", "tdomf"), "<?php echo get_bloginfo('title'); ?>", TDOMF_MACRO_SUBMISSIONTITLE); break; case 'rejected_subject': $message = sprintf(__("[%s] Your entry \"%s\" has been rejected! :(", "tdomf"), "<?php echo get_bloginfo('title'); ?>", TDOMF_MACRO_SUBMISSIONTITLE); break; } } else { $message = $options[$type]; } if ($process) { $message = tdomf_prepare_string($message, $form_id, "", $post_id); $message = str_replace("\n", "\r\n", $message); } return $message; }
/** * Returns the options for this widget * * @return Array * @access public */ function getOptions($form_id, $postfix = '') { $defaults = array($this->widgetTitleKey => $this->displayName, 'tdomf-hack' => $this->hack, 'tdomf-preview-hack' => $this->previewHack); $options = tdomf_get_option_widget($this->optionKey . $postfix, $form_id); # A bug in a previous version used the unmodified 'internalName' as the option key if ($options == false) { $options = tdomf_get_option_widget('tdomf_widget_' . $this->internalName, $form_id); } if ($options == false) { $options = array(); } $options = wp_parse_args($options, $defaults); return $options; }
function tdomf_widget_comments_get_options($form_id) { $options = tdomf_get_option_widget('tdomf_comment_widget', $form_id); if ($options == false) { $options = array(); $options['title'] = ""; $options['overwrite'] = false; $options['comments'] = get_option('default_comment_status'); $options['pings'] = get_option('default_ping_status'); $options['user-comments'] = false; $options['user-pings'] = false; } return $options; }
function tdomf_widget_categories_get_options($number = 1, $form_id = 1) { $postfix = ""; if ($number != 1) { $postfix = "_{$number}"; } $options = tdomf_get_option_widget('tdomf_categories_widget' . $postfix, $form_id); if ($options == false) { $options = array(); $options['title'] = ''; $options['overwrite'] = false; $options['display'] = "dropdown"; $options['multi'] = false; $options['hierarchical'] = true; $options['include'] = ""; $options['exclude'] = ""; $options['order'] = 'asc'; $options['orderby'] = 'ID'; } if (!isset($options['order'])) { $options['order'] = 'asc'; } if (!isset($options['orderby'])) { $options['order'] = 'ID'; } return $options; }
function tdomf_widget_subscribe_to_comments_get_options($form_id) { $options = tdomf_get_option_widget('tdomf_subscribe_to_comments_widget', $form_id); if ($options == false) { $options = array(); $options['title'] = ""; $options['show_email_field'] = false; $options['always_subscribe'] = false; } return $options; }