magic_input_tip_js() static public method

* FeedWordPressSettingsUI::fix_toggles_js ()
static public magic_input_tip_js ( $id )
    function syndicated_sources_box($page, $box = NULL)
    {
        global $fwp_path;
        $links = FeedWordPress::syndicated_links(array("hide_invisible" => false));
        $sources = $this->sources('*');
        $visibility = $this->visibility_toggle();
        $showInactive = $this->show_inactive();
        $hrefPrefix = $this->form_action();
        ?>
		<div><?php 
        FeedWordPressCompatibility::stamp_nonce('feedwordpress_feeds');
        ?>
</div>
		<div class="tablenav">

		<div id="add-multiple-uri" class="hide-if-js">
		<form action="<?php 
        print $hrefPrefix;
        ?>
&amp;visibility=<?php 
        print $visibility;
        ?>
" method="post">
		  <div><?php 
        FeedWordPressCompatibility::stamp_nonce('feedwordpress_feeds');
        ?>
</div>
		  <h4>Add Multiple Sources</h4>
		  <div>Enter one feed or website URL per line. If a URL links to a website which provides multiple feeds, FeedWordPress will use the first one listed.</div>
		  <div><textarea name="multilookup" rows="8" cols="60"
		  style="vertical-align: top"></textarea></div>
		  <div style="border-top: 1px dotted black; padding-top: 10px">
		  <div class="alignright"><input type="submit" class="button-primary" name="multiadd" value="<?php 
        print FWP_SYNDICATE_NEW;
        ?>
" /></div>
		  <div class="alignleft"><input type="button" class="button-secondary" name="action" value="<?php 
        print FWP_CANCEL_BUTTON;
        ?>
" id="turn-off-multiple-sources" /></div>
		  </div>
		</form>
		</div> <!-- id="add-multiple-uri" -->

		<div id="upload-opml" style="float: right" class="hide-if-js">
		<h4>Import source list</h4>
		<p>You can import a list of sources in OPML format, either by providing
		a URL for the OPML document, or by uploading a copy from your
		computer.</p>
		
		<form enctype="multipart/form-data" action="<?php 
        print $hrefPrefix;
        ?>
&amp;visibility=<?php 
        print $visibility;
        ?>
" method="post">
		  <div><?php 
        FeedWordPressCompatibility::stamp_nonce('feedwordpress_feeds');
        ?>
<input type="hidden" name="MAX_FILE_SIZE" value="100000" /></div>
		<div style="clear: both"><label for="opml-lookup" style="float: left; width: 8.0em; margin-top: 5px;">From URL:</label> <input type="text" id="opml-lookup" name="opml_lookup" value="OPML document" /></div>
		<div style="clear: both"><label for="opml-upload" style="float: left; width: 8.0em; margin-top: 5px;">From file:</label> <input type="file" id="opml-upload" name="opml_upload" /></div>
		
		<div style="border-top: 1px dotted black; padding-top: 10px">
		<div class="alignright"><input type="submit" class="button-primary" name="action" value="<?php 
        print FWP_SYNDICATE_NEW;
        ?>
" /></div>
		<div class="alignleft"><input type="button" class="button-secondary" name="action" value="<?php 
        print FWP_CANCEL_BUTTON;
        ?>
" id="turn-off-opml-upload" /></div>
		</div>
		</form>
		</div> <!-- id="upload-opml" -->
	
		<div id="add-single-uri" class="alignright">
		  <form id="syndicated-links" action="<?php 
        print $hrefPrefix;
        ?>
&amp;visibility=<?php 
        print $visibility;
        ?>
" method="post">
		  <div><?php 
        FeedWordPressCompatibility::stamp_nonce('feedwordpress_feeds');
        ?>
</div>
		  <ul class="subsubsub">
		  <li><label for="add-uri">New source:</label>
		  <input type="text" name="lookup" id="add-uri" value="Website or feed URI" />
		
		  <?php 
        FeedWordPressSettingsUI::magic_input_tip_js('add-uri');
        FeedWordPressSettingsUI::magic_input_tip_js('opml-lookup');
        ?>
		
		  <input type="hidden" name="action" value="feedfinder" />
		  <input type="submit" class="button-secondary" name="action" value="<?php 
        print FWP_SYNDICATE_NEW;
        ?>
" />
		  <div style="text-align: right; margin-right: 2.0em"><a id="turn-on-multiple-sources" href="#add-multiple-uri"><img style="vertical-align: middle" src="<?php 
        print plugins_url('/' . $fwp_path . '/down.png');
        ?>
" alt="" /> add multiple</a>
		  <span class="screen-reader-text"> or </span>
		  <a id="turn-on-opml-upload" href="#upload-opml"><img src="<?php 
        print plugins_url('/' . $fwp_path . '/plus.png');
        ?>
" alt="" style="vertical-align: middle" /> import source list</a></div>
		  </li>
		  </ul>
		  </form>
		</div> <!-- class="alignright" -->

		<div class="alignleft">
		<?php 
        if (count($sources[$visibility]) > 0) {
            $this->manage_page_links_subsubsub($sources, $showInactive);
        }
        ?>
		</div> <!-- class="alignleft" -->

		</div> <!-- class="tablenav" -->
		
		<form id="syndicated-links" action="<?php 
        print $hrefPrefix;
        ?>
&amp;visibility=<?php 
        print $visibility;
        ?>
" method="post">
		<div><?php 
        FeedWordPressCompatibility::stamp_nonce('feedwordpress_feeds');
        ?>
</div>
		
		<?php 
        if ($showInactive) {
            ?>
		<div style="clear: right" class="alignright">
		<p style="font-size: smaller; font-style: italic">FeedWordPress used to syndicate
		posts from these sources, but you have unsubscribed from them.</p>
		</div>
		<?php 
        }
        ?>

		<?php 
        if (count($sources[$visibility]) > 0) {
            $this->display_button_bar($showInactive);
        } else {
            $this->manage_page_links_subsubsub($sources, $showInactive);
        }
        fwp_syndication_manage_page_links_table_rows($sources[$visibility], $this, $visibility);
        $this->display_button_bar($showInactive);
        ?>
		</form>
		<?php 
    }
    function display_alt_feed_box($lookup, $params = false)
    {
        global $fwp_post;
        if (is_bool($params)) {
            $params = array("alt" => $params);
        }
        $params = wp_parse_args($params, array("alt" => false, "err" => NULL, "auth" => NULL, "password" => NULL, "username" => NULL));
        $alt = $params['alt'];
        ?>
		<form action="admin.php?page=<?php 
        print $GLOBALS['fwp_path'];
        ?>
/<?php 
        echo basename(__FILE__);
        ?>
" method="post">
		<div class="inside"><?php 
        FeedWordPressCompatibility::stamp_nonce($this->dispatch);
        ?>
		<fieldset class="alt"
		<?php 
        if (!$alt) {
            ?>
style="margin: 1.0em 3.0em; font-size: smaller;"<?php 
        }
        ?>
>
		<legend><?php 
        if ($alt) {
            ?>
Alternative feeds<?php 
        } else {
            ?>
Find feeds<?php 
        }
        ?>
</legend>
		<?php 
        if ($alt) {
            ?>
<h3>Use a different feed</h3><?php 
        }
        ?>
		<?php 
        if (is_wp_error($params['err'])) {
            ?>
		<p><em><strong>401 Not Authorized.</strong> This URL may require
		a username and password to access it.</em> You may want to add login
		credentials below and check it again.</p>
		<?php 
        }
        ?>
		<div><label>Address:
		<input type="text" name="lookup" id="use-another-feed"
		placeholder="URL"
 		<?php 
        if (is_null($lookup)) {
            ?>
			value="URL"
		<?php 
        } else {
            ?>
			value="<?php 
            print esc_html($lookup);
            ?>
"
		<?php 
        }
        ?>
		size="64" style="max-width: 80%" /></label>
		<?php 
        if (is_null($lookup)) {
            ?>
		<?php 
            FeedWordPressSettingsUI::magic_input_tip_js('use-another-feed');
            ?>
		<?php 
        }
        ?>

		<?php 
        $this->stamp_link_id('link_id');
        ?>
		<input type="hidden" name="action" value="feedfinder" />
		<input type="submit" class="button<?php 
        if ($alt) {
            ?>
-primary<?php 
        }
        ?>
" value="Check &raquo;" /></div>

		<?php 
        $this->display_authentication_credentials_box(array('username' => $params['username'], 'password' => $params['password'], 'method' => $params['auth']));
        ?>

		<p>This can be the address of a feed, or of a website. FeedWordPress
		will try to automatically detect any feeds associated with a
		website.</p>
		</div> <!-- class="inside" -->
		</fieldset></form>
		
		<?php 
    }
    function display_alt_feed_box($lookup, $alt = false)
    {
        global $fwp_post;
        ?>
		<form action="admin.php?page=<?php 
        echo FWP_FEEDS_PAGE_SLUG;
        ?>
" method="post">
		<div class="inside"><?php 
        FeedWordPressCompatibility::stamp_nonce(get_class($this));
        ?>
		<fieldset class="alt"
		<?php 
        if (!$alt) {
            ?>
style="margin: 1.0em 3.0em; font-size: smaller;"<?php 
        }
        ?>
>
		<legend><?php 
        if ($alt) {
            ?>
Alternative feeds<?php 
        } else {
            ?>
Find feeds<?php 
        }
        ?>
</legend>
		<?php 
        if ($alt) {
            ?>
<h3>Use a different feed</h3><?php 
        }
        ?>
		<div><label>Address:
		<input type="text" name="lookup" id="use-another-feed"
		placeholder="URL"
 		<?php 
        if (is_null($lookup)) {
            ?>
			value="URL"
		<?php 
        } else {
            ?>
			value="<?php 
            print esc_html($lookup);
            ?>
"
		<?php 
        }
        ?>
		size="64" style="max-width: 80%" /></label>
		<?php 
        if (is_null($lookup)) {
            ?>
		<?php 
            FeedWordPressSettingsUI::magic_input_tip_js('use-another-feed');
            ?>
		<?php 
        }
        ?>
		<?php 
        $this->stamp_link_id('link_id');
        ?>
		<input type="hidden" name="action" value="feedfinder" />
		<input type="submit" class="button<?php 
        if ($alt) {
            ?>
-primary<?php 
        }
        ?>
" value="Check &raquo;" /></div>
		<p>This can be the address of a feed, or of a website. FeedWordPress
		will try to automatically detect any feeds associated with a
		website.</p>
		</div> <!-- class="inside" -->
		</fieldset></form>
		
		<?php 
    }
 function form_input_tip($page, $limit)
 {
     FeedWordPressSettingsUI::magic_input_tip_js('.form-input-tip');
 }
function fwp_syndication_manage_page_links_box($object = NULL, $box = NULL)
{
    $links = FeedWordPress::syndicated_links(array("hide_invisible" => false));
    $sources = $object->sources('*');
    $visibility = $object->visibility_toggle();
    $showInactive = $object->show_inactive();
    $hrefPrefix = 'admin.php?page=' . FWP_SYNDICATION_PAGE_SLUG;
    ?>
	<form id="syndicated-links" action="<?php 
    print $hrefPrefix;
    ?>
&amp;visibility=<?php 
    print $visibility;
    ?>
" method="post">
	<div><?php 
    FeedWordPressCompatibility::stamp_nonce('feedwordpress_feeds');
    ?>
</div>
	<?php 
    if (count($sources[$visibility]) > 0) {
        fwp_syndication_manage_page_links_subsubsub($sources, $showInactive);
    }
    if ($showInactive) {
        ?>
	<p style="clear: both; font-size: smaller; font-style: italic">FeedWordPress used to syndicate
	posts from these sources, but you have unsubscribed from them.</p>
	<?php 
    }
    ?>
	
	<div class="tablenav">
	<div class="alignright">
	<label for="add-uri">New source:</label>
	<input type="text" name="lookup" id="add-uri" value="Website or feed URI" />
	<?php 
    FeedWordPressSettingsUI::magic_input_tip_js('add-uri');
    ?>

	<input type="hidden" name="action" value="feedfinder" />
	<input type="submit" class="button-secondary" name="action" value="<?php 
    print FWP_SYNDICATE_NEW;
    ?>
" /></div>

<?php 
    if (count($sources[$visibility]) > 0) {
        ?>
	<div class="alignleft">
	<?php 
        if ($showInactive) {
            ?>
	<input class="button-secondary" type="submit" name="action" value="<?php 
            print FWP_RESUB_CHECKED;
            ?>
" />
	<input class="button-secondary" type="submit" name="action" value="<?php 
            print FWP_DELETE_CHECKED;
            ?>
" />
	<?php 
        } else {
            ?>
	<input class="button-secondary" type="submit" name="action" value="<?php 
            print FWP_UPDATE_CHECKED;
            ?>
" />
	<input class="button-secondary delete" type="submit" name="action" value="<?php 
            print FWP_UNSUB_CHECKED;
            ?>
" />
	<?php 
        }
        ?>
	</div>

<?php 
    } else {
        ?>
	<?php 
        fwp_syndication_manage_page_links_subsubsub($sources, $showInactive);
    }
    ?>

	<br class="clear" />
	</div>
	<br class="clear" />

	<?php 
    fwp_syndication_manage_page_links_table_rows($sources[$visibility], $visibility);
    ?>
	</form>
<?php 
}