Beispiel #1
0
 public function action_admin_enqueue_scripts($type)
 {
     global $post_type;
     if ($type == 'edit.php' && $post_type == FEEDBACK) {
         wp_enqueue_script('un-feedback-list', usernoise_url('/js/feedback-list.js'));
     }
 }
Beispiel #2
0
 public function action_enqueue_scripts()
 {
     if (!current_user_can('edit_others_un_feedback_items')) {
         return;
     }
     wp_enqueue_style('un-admin', usernoise_url('/css/admin.css'));
     wp_enqueue_style('un-admin', usernoise_url('/vendor/font-awesome/css/font-awesome.min.css'));
 }
Beispiel #3
0
 public function _init()
 {
     if (is_user_logged_in()) {
         wp_enqueue_style('usernoise-adminbar', usernoise_url('/css/admin-bar.css'), null, UN_VERSION);
     }
     if (!un_get_option(UN_ENABLED)) {
         return;
     }
     wp_enqueue_script('usernoise', usernoise_url('/js/usernoise.js'), array('jquery'), UN_VERSION);
     wp_enqueue_script('usernoise-button', usernoise_url('/js/button.js'), array('jquery', 'usernoise'), UN_VERSION);
     wp_enqueue_style('usernoise-button', usernoise_url('/css/button.css'), null, UN_VERSION);
     wp_enqueue_style('usernoise-form', usernoise_url('/css/form.css'), null, UN_VERSION);
     if (!un_get_option(UN_DISABLE_ICONS)) {
         wp_enqueue_style('font-awesome', usernoise_url('/vendor/font-awesome/css/font-awesome.css'), null, UN_VERSION);
     }
     wp_localize_script('usernoise', 'usernoiseButton', un_get_localization_array());
     add_action('wp_footer', array($this, '_wp_footer'));
 }
Beispiel #4
0
 public function _print_styles()
 {
     wp_enqueue_style('un-admin', usernoise_url('/css/admin.css'));
     wp_enqueue_style('un-chosen', usernoise_url('/vendor/chosen/chosen.css'));
     wp_enqueue_style('un-font-awesome', usernoise_url('/vendor/font-awesome/css/font-awesome.css'));
 }
Beispiel #5
0
<div id="un-thankyou" style="display: none;">
	<h2><?php 
echo un_get_option(UN_THANKYOU_TITLE, __('Thank you', 'usernoise'));
?>
</h2>
	<p>
		<?php 
echo un_get_option(UN_THANKYOU_TEXT, __('Your feedback has been received.', 'usernoise'));
?>
	</p>
	<a href="#" id="un-feedback-close"><img src="<?php 
echo usernoise_url('/images/ok.png');
?>
" id="thankyou-image" alt="Close"></a>
</div>
Beispiel #6
0
 public function _pro_options_stub($options)
 {
     $images_url = usernoise_url('/images');
     $options[] = array('type' => 'tab', 'title' => __('Go Pro'), 'href' => $this->pro_url);
     return $options;
 }
Beispiel #7
0
" type="text/css">
	<script src="<?php 
bloginfo('wpurl');
?>
/wp-includes/js/jquery/jquery.js"></script>
	<script src="<?php 
echo esc_attr(usernoise_url('/vendor/jquery.resize.js'));
?>
"></script>
	<script>var usernoise = {};</script>
	<script src="<?php 
echo esc_attr(usernoise_url('/js/usernoise.js?v=' . UN_VERSION));
?>
"></script>
	<script src="<?php 
echo esc_attr(usernoise_url('/js/window.js?v=' . UN_VERSION));
?>
"></script>
	<?php 
do_action('un_head');
?>
</head>
<body class="<?php 
echo $body_class;
?>
">
	<div id="window" <?php 
un_window_class();
?>
>
		<a id="window-close" href="#" title="<?php 
Beispiel #8
0
<div id="replywrapper">
	<?php 
$un_h->textarea('message', '', array('rows' => 7, 'id' => 'replybody'));
?>
</div>
<label><?php 
_e('Subject', 'usernoise');
?>
</label>
<?php 
$un_h->text_field('subject', __('Feedback', 'usernoise', 'admin') . ': ' . $post->post_title);
?>

<div class="hide-if-no-js">
	<input type="button" class="button-primary" id="un-reply-submit" value="<?php 
_e('Send', 'usernoise');
?>
">
	&nbsp;<img src="<?php 
echo usernoise_url('/images/loader.gif');
?>
" id="un-reply-loader" style="display: none;">
</div>
Beispiel #9
0
    function feedback_form($action)
    {
        global $un_h;
        ?>
		<form action="<?php 
        echo esc_attr(un_ajax_url('feedback_form_submit'));
        ?>
" method="post" class="un-feedback-form">
			<?php 
        if (un_get_option(UN_FEEDBACK_FORM_SHOW_TYPE)) {
            ?>
				<div class="un-types-wrapper">
					<?php 
            $tags = get_terms(FEEDBACK_TYPE, array('un_orderby_meta' => 'position', 'hide_empty' => false));
            ?>
					<?php 
            foreach ($tags as $tag) {
                ?>
						<a href="#" class="un-feedback-type" data-type="<?php 
                echo $tag->slug;
                ?>
"><?php 
                if (!un_get_option(UN_DISABLE_ICONS)) {
                    ?>
<i class="<?php 
                    echo un_get_term_meta($tag->term_id, 'icon');
                    ?>
"></i><?php 
                }
                echo esc_html(__($tag->name, 'usernoise'));
                ?>
</a>
					<?php 
            }
            ?>
					<?php 
            if (isset($tags[0])) {
                ?>
						<?php 
                $slug = $tags[0];
                ?>
						<?php 
                $slug = $slug->slug;
                ?>
					<?php 
            } else {
                ?>
						<?php 
                $slug = null;
                ?>
					<?php 
            }
            ?>
					<?php 
            $un_h->hidden_field('type', $slug);
            ?>
				</div>
			<?php 
        }
        ?>
			<?php 
        $un_h->textarea('description', un_get_option(UN_FEEDBACK_TEXTAREA_PLACEHOLDER), array('id' => 'un-description', 'class' => 'text text-empty'));
        ?>
			<?php 
        if (un_get_option(UN_FEEDBACK_FORM_SHOW_SUMMARY)) {
            ?>
				<?php 
            $un_h->text_field('title', un_get_option(UN_FEEDBACK_SUMMARY_PLACEHOLDER), array('id' => 'un-title', 'class' => 'text text-empty'));
            ?>
			<?php 
        }
        ?>
			<?php 
        if (un_get_option(UN_FEEDBACK_FORM_SHOW_EMAIL)) {
            ?>
				<?php 
            $un_h->text_field('email', un_get_option(UN_FEEDBACK_EMAIL_PLACEHOLDER), array('id' => 'un-email', 'class' => 'text text-empty'));
            ?>
			<?php 
        }
        ?>
			<?php 
        if (un_get_option(UN_FEEDBACK_FORM_SHOW_NAME)) {
            ?>
				<?php 
            $un_h->text_field('name', un_get_option(UN_FEEDBACK_NAME_PLACEHOLDER), array('id' => 'un-name', 'class' => 'text text-empty'));
            ?>
			<?php 
        }
        ?>
			<?php 
        do_action('un_feedback_form_body');
        ?>
			<input type="submit" class="un-submit" value="<?php 
        echo esc_attr(un_submit_feedback_button_text());
        ?>
" id="un-feedback-submit">
			&nbsp;<img src="<?php 
        echo usernoise_url('/images/loader.gif');
        ?>
" id="un-feedback-loader" class="loader" style="display: none;">
			<div class="un-feedback-errors-wrapper" style="display: none;">
				<div class="un-errors"></div>
			</div>
		</form>
		<?php 
    }