construct the info menu
978473
function Menu(element) {
        this.element = element;
        _trigger(this.element, "showgoto", 1, true);
        window.setTimeout(window.remoteShowGoto);
        this.remove = this.remove.bind(this);
    }
275357
def build_info():
    '''
    
    '''
    ret = {'info': []}
    out = __salt__['cmd.run']('{0} -V'.format(__detect_os()))

    for i in out.splitlines():
        if i.startswith('configure argument'):
            ret['build arguments'] = re.findall(r"(?:[^\s]*'.*')|(?:[^\s]+)", i)[2:]
            continue

        ret['info'].append(i)

    return ret
62163
public void displayMenu() {
        while (true) {
            ConsoleMenu.println("");
            ConsoleMenu.println("Menu Options");

            final int size = menu.size();

            displayMenu(size);

            int opt;

            do {
                opt = ConsoleMenu.getInt("Enter your choice:", -1);
            } while ((opt <= 0 || opt > methods.size()) && opt != EXIT_CODE);

            if (opt == EXIT_CODE) {
                callTearDownIfRequired();
                return;
            }

            callMenuOption(opt);
        }
    }
1262655
def menu text, &block
      m = Menu.new text, &block 
      m.color = @color
      m.bgcolor = @bgcolor
      add m
      return m
    end
1248593
protected function _construct()
    {
        parent::_construct();
        $this->setId('job_tabs');
        $this->setDestElementId('edit_form');
        $this->setTitle($this->__('Job'));
    }
211309
function install_plugin_information() {
            global $tab;

            if ( empty( $_REQUEST['plugin'] ) ) {
                return;
            }

            $args = array(
                'slug'   => wp_unslash( $_REQUEST['plugin'] ),
                'is_ssl' => is_ssl(),
                'fields' => array(
                    'banners'         => true,
                    'reviews'         => true,
                    'downloaded'      => false,
                    'active_installs' => true
                )
            );

            if ( is_array( $args ) ) {
                $args = (object) $args;
            }

            if ( ! isset( $args->per_page ) ) {
                $args->per_page = 24;
            }

            if ( ! isset( $args->locale ) ) {
                $args->locale = get_locale();
            }

            $api = apply_filters( 'fs_plugins_api', false, 'plugin_information', $args );

            if ( is_wp_error( $api ) ) {
                wp_die( $api );
            }

            $plugins_allowedtags = array(
                'a'       => array(
                    'href'   => array(),
                    'title'  => array(),
                    'target' => array(),
                    // Add image style for screenshots.
                    'class'  => array()
                ),
                'style'   => array(),
                'abbr'    => array( 'title' => array() ),
                'acronym' => array( 'title' => array() ),
                'code'    => array(),
                'pre'     => array(),
                'em'      => array(),
                'strong'  => array(),
                'div'     => array( 'class' => array() ),
                'span'    => array( 'class' => array() ),
                'p'       => array(),
                'ul'      => array(),
                'ol'      => array(),
                'li'      => array( 'class' => array() ),
                'i'       => array( 'class' => array() ),
                'h1'      => array(),
                'h2'      => array(),
                'h3'      => array(),
                'h4'      => array(),
                'h5'      => array(),
                'h6'      => array(),
                'img'     => array( 'src' => array(), 'class' => array(), 'alt' => array() ),
//			'table' => array(),
//			'td' => array(),
//			'tr' => array(),
//			'th' => array(),
//			'thead' => array(),
//			'tbody' => array(),
            );

            $plugins_section_titles = array(
                'description'  => fs_text_x_inline( 'Description', 'Plugin installer section title', 'description', $api->slug ),
                'installation' => fs_text_x_inline( 'Installation', 'Plugin installer section title', 'installation', $api->slug ),
                'faq'          => fs_text_x_inline( 'FAQ', 'Plugin installer section title', 'faq', $api->slug ),
                'screenshots'  => fs_text_inline( 'Screenshots', 'screenshots', $api->slug ),
                'changelog'    => fs_text_x_inline( 'Changelog', 'Plugin installer section title', 'changelog', $api->slug ),
                'reviews'      => fs_text_x_inline( 'Reviews', 'Plugin installer section title', 'reviews', $api->slug ),
                'other_notes'  => fs_text_x_inline( 'Other Notes', 'Plugin installer section title', 'other-notes', $api->slug ),
            );

            // Sanitize HTML
//		foreach ( (array) $api->sections as $section_name => $content ) {
//			$api->sections[$section_name] = wp_kses( $content, $plugins_allowedtags );
//		}

            foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) {
                if ( isset( $api->$key ) ) {
                    $api->$key = wp_kses( $api->$key, $plugins_allowedtags );
                }
            }

            // Add after $api->slug is ready.
            $plugins_section_titles['features'] = fs_text_x_inline( 'Features & Pricing', 'Plugin installer section title', 'features-and-pricing', $api->slug );

            $_tab = esc_attr( $tab );

            $section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; // Default to the Description tab, Do not translate, API returns English.
            if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) {
                $section_titles = array_keys( (array) $api->sections );
                $section        = array_shift( $section_titles );
            }

            iframe_header( fs_text_inline( 'Plugin Install', 'plugin-install', $api->slug ) );

            $_with_banner = '';

//	var_dump($api->banners);
            if ( ! empty( $api->banners ) && ( ! empty( $api->banners['low'] ) || ! empty( $api->banners['high'] ) ) ) {
                $_with_banner = 'with-banner';
                $low          = empty( $api->banners['low'] ) ? $api->banners['high'] : $api->banners['low'];
                $high         = empty( $api->banners['high'] ) ? $api->banners['low'] : $api->banners['high'];
                ?>
                <style type="text/css">
                    #plugin-information-title.with-banner
                    {
                        background-image: url( <?php echo esc_url( $low ); ?> );
                    }

                    @media only screen and ( -webkit-min-device-pixel-ratio: 1.5 )
                    {
                        #plugin-information-title.with-banner
                        {
                            background-image: url( <?php echo esc_url( $high ); ?> );
                        }
                    }
                </style>
                <?php
            }

            echo '<div id="plugin-information-scrollable">';
            echo "<div id='{$_tab}-title' class='{$_with_banner}'><div class='vignette'></div><h2>{$api->name}</h2></div>";
            echo "<div id='{$_tab}-tabs' class='{$_with_banner}'>\n";

            foreach ( (array) $api->sections as $section_name => $content ) {
                if ( 'reviews' === $section_name && ( empty( $api->ratings ) || 0 === array_sum( (array) $api->ratings ) ) ) {
                    continue;
                }

                if ( isset( $plugins_section_titles[ $section_name ] ) ) {
                    $title = $plugins_section_titles[ $section_name ];
                } else {
                    $title = ucwords( str_replace( '_', ' ', $section_name ) );
                }

                $class       = ( $section_name === $section ) ? ' class="current"' : '';
                $href        = add_query_arg( array( 'tab' => $tab, 'section' => $section_name ) );
                $href        = esc_url( $href );
                $san_section = esc_attr( $section_name );
                echo "\t<a name='$san_section' href='$href' $class>$title</a>\n";
            }

            echo "</div>\n";

            ?>
        <div id="<?php echo $_tab; ?>-content" class='<?php echo $_with_banner; ?>'>
            <div class="fyi">
                <?php if ( $api->is_paid ) : ?>
                    <?php if ( isset( $api->plans ) ) : ?>
                        <div class="plugin-information-pricing">
                        <?php foreach ( $api->plans as $plan ) : ?>
                            <?php
                            if ( empty( $plan->pricing ) ) {
                                continue;
                            }

                            /**
                             * @var FS_Plugin_Plan $plan
                             */
                            ?>
                            <?php $first_pricing = $plan->pricing[0] ?>
                            <?php $is_multi_cycle = $first_pricing->is_multi_cycle() ?>
                            <div class="fs-plan<?php if ( ! $is_multi_cycle ) {
                                echo ' fs-single-cycle';
                            } ?>" data-plan-id="<?php echo $plan->id ?>">
                                <h3 data-plan="<?php echo $plan->id ?>"><?php echo esc_html( sprintf( fs_text_x_inline( '%s Plan', 'e.g. Professional Plan', 'x-plan', $api->slug ), $plan->title ) ) ?></h3>
                                <?php $has_annual = $first_pricing->has_annual() ?>
                                <?php $has_monthly = $first_pricing->has_monthly() ?>
                                <div class="nav-tab-wrapper">
                                    <?php $billing_cycles = array( 'monthly', 'annual', 'lifetime' ) ?>
                                    <?php $i = 0;
                                        foreach ( $billing_cycles as $cycle ) : ?>
                                            <?php $prop = "{$cycle}_price";
                                            if ( isset( $first_pricing->{$prop} ) ) : ?>
                                                <?php $is_featured = ( 'annual' === $cycle && $is_multi_cycle ) ?>
                                                <?php
                                                $prices = array();
                                                foreach ( $plan->pricing as $pricing ) {
                                                    if ( isset( $pricing->{$prop} ) ) {
                                                        $prices[] = array(
                                                            'id'       => $pricing->id,
                                                            'licenses' => $pricing->licenses,
                                                            'price'    => $pricing->{$prop}
                                                        );
                                                    }
                                                }
                                                ?>
                                                <a class="nav-tab" data-billing-cycle="<?php echo $cycle ?>"
                                                   data-pricing="<?php echo esc_attr( json_encode( $prices ) ) ?>">
                                                    <?php if ( $is_featured ) : ?>
                                                        <label>
                                                            &#9733; <?php fs_esc_html_echo_x_inline( 'Best', 'e.g. the best product', 'best', $api->slug ) ?>
                                                            &#9733;</label>
                                                    <?php endif ?>
                                                    <?php
                                                        switch ( $cycle ) {
                                                            case 'monthly':
                                                                fs_esc_html_echo_x_inline( 'Monthly', 'as every month', 'monthly', $api->slug );
                                                                break;
                                                            case 'annual':
                                                                fs_esc_html_echo_x_inline( 'Annual', 'as once a year', 'annual', $api->slug );
                                                                break;
                                                            case 'lifetime':
                                                                fs_esc_html_echo_inline( 'Lifetime', 'lifetime', $api->slug );
                                                                break;
                                                        }
                                                    ?>
                                                </a>
                                            <?php endif ?>
                                            <?php $i ++; endforeach ?>
                                    <?php wp_enqueue_script( 'jquery' ) ?>
                                    <script type="text/javascript">
                                        (function ($, undef) {
                                            var
                                                _formatBillingFrequency = function (cycle) {
                                                    switch (cycle) {
                                                        case 'monthly':
                                                            return '<?php printf( fs_text_x_inline( 'Billed %s', 'e.g. billed monthly', 'billed-x', $api->slug ), fs_text_x_inline( 'Monthly', 'as every month', 'monthly', $api->slug ) ) ?>';
                                                        case 'annual':
                                                            return '<?php printf( fs_text_x_inline( 'Billed %s', 'e.g. billed monthly', 'billed-x', $api->slug ), fs_text_x_inline( 'Annually', 'as once a year', 'annually', $api->slug ) ) ?>';
                                                        case 'lifetime':
                                                            return '<?php printf( fs_text_x_inline( 'Billed %s', 'e.g. billed monthly', 'billed-x', $api->slug ), fs_text_x_inline( 'Once', 'as once a year', 'once', $api->slug ) ) ?>';
                                                    }
                                                },
                                                _formatLicensesTitle    = function (pricing) {
                                                    switch (pricing.licenses) {
                                                        case 1:
                                                            return '<?php fs_esc_attr_echo_inline( 'Single Site License', 'license-single-site', $api->slug ) ?>';
                                                        case null:
                                                            return '<?php fs_esc_attr_echo_inline( 'Unlimited Licenses', 'license-unlimited', $api->slug ) ?>';
                                                        default:
                                                            return '<?php fs_esc_attr_echo_inline( 'Up to %s Sites', 'license-x-sites', $api->slug ) ?>'.replace('%s', pricing.licenses);
                                                    }
                                                },
                                                _formatPrice            = function (pricing, cycle, multipleLicenses) {
                                                    if (undef === multipleLicenses)
                                                        multipleLicenses = true;

                                                    var priceCycle;
                                                    switch (cycle) {
                                                        case 'monthly':
                                                            priceCycle = ' / <?php fs_echo_x_inline( 'mo', 'as monthly period', 'mo', $api->slug ) ?>';
                                                            break;
                                                        case 'lifetime':
                                                            priceCycle = '';
                                                            break;
                                                        case 'annual':
                                                        default:
                                                            priceCycle = ' / <?php fs_echo_x_inline( 'year', 'as annual period', 'year', $api->slug ) ?>';
                                                            break;
                                                    }

                                                    if (!multipleLicenses && 1 == pricing.licenses) {
                                                        return '$' + pricing.price + priceCycle;
                                                    }

                                                    return _formatLicensesTitle(pricing) + ' - <var class="fs-price">$' + pricing.price + priceCycle + '</var>';
                                                },
                                                _checkoutUrl            = function (plan, pricing, cycle) {
                                                    return '<?php echo esc_url_raw( remove_query_arg( 'billing_cycle', add_query_arg( array( 'plugin_id' => $plan->plugin_id ), $api->checkout_link ) ) ) ?>' +
                                                        '&plan_id=' + plan +
                                                        '&pricing_id=' + pricing +
                                                        '&billing_cycle=' + cycle<?php if ( $plan->has_trial() ) {
                                                        echo " + '&trial=true'";
                                                    }?>;
                                                },
                                                _updateCtaUrl           = function (plan, pricing, cycle) {
                                                    $('.plugin-information-pricing .button, #plugin-information-footer .button.fs-checkout-button').attr('href', _checkoutUrl(plan, pricing, cycle));
                                                };

                                            $(document).ready(function () {
                                                var $plan = $('.plugin-information-pricing .fs-plan[data-plan-id=<?php echo $plan->id ?>]');
                                                $plan.find('input[type=radio]').live('click', function () {
                                                    _updateCtaUrl(
                                                        $plan.attr('data-plan-id'),
                                                        $(this).val(),
                                                        $plan.find('.nav-tab-active').attr('data-billing-cycle')
                                                    );

                                                    $plan.find('.fs-trial-terms .fs-price').html(
                                                        $(this).parents('label').find('.fs-price').html()
                                                    );
                                                });

                                                $plan.find('.nav-tab').click(function () {
                                                    if ($(this).hasClass('nav-tab-active'))
                                                        return;

                                                    var $this        = $(this),
                                                        billingCycle = $this.attr('data-billing-cycle'),
                                                        pricing      = JSON.parse($this.attr('data-pricing')),
                                                        $pricesList  = $this.parents('.fs-plan').find('.fs-pricing-body .fs-licenses'),
                                                        html         = '';

                                                    // Un-select previously selected tab.
                                                    $plan.find('.nav-tab').removeClass('nav-tab-active');

                                                    // Select current tab.
                                                    $this.addClass('nav-tab-active');

                                                    // Render licenses prices.
                                                    if (1 == pricing.length) {
                                                        html = '<li><label><?php echo fs_esc_attr_x_inline( 'Price', 'noun', 'price', $api->slug ) ?>: ' + _formatPrice(pricing[0], billingCycle, false) + '</label></li>';
                                                    } else {
                                                        for (var i = 0; i < pricing.length; i++) {
                                                            html += '<li><label><input name="pricing-<?php echo $plan->id ?>" type="radio" value="' + pricing[i].id + '">' + _formatPrice(pricing[i], billingCycle) + '</label></li>';
                                                        }
                                                    }
                                                    $pricesList.html(html);

                                                    if (1 < pricing.length) {
                                                        // Select first license option.
                                                        $pricesList.find('li:first input').click();
                                                    }
                                                    else {
                                                        _updateCtaUrl(
                                                            $plan.attr('data-plan-id'),
                                                            pricing[0].id,
                                                            billingCycle
                                                        );
                                                    }

                                                    // Update billing frequency.
                                                    $plan.find('.fs-billing-frequency').html(_formatBillingFrequency(billingCycle));

                                                    if ('annual' === billingCycle) {
                                                        $plan.find('.fs-annual-discount').show();
                                                    } else {
                                                        $plan.find('.fs-annual-discount').hide();
                                                    }
                                                });

                                                <?php if ( $has_annual ) : ?>
                                                // Select annual by default.
                                                $plan.find('.nav-tab[data-billing-cycle=annual]').click();
                                                <?php else : ?>
                                                // Select first tab.
                                                $plan.find('.nav-tab:first').click();
                                                <?php endif ?>
                                            });
                                        }(jQuery));
                                    </script>
                                </div>
                                <div class="fs-pricing-body">
                                    <span class="fs-billing-frequency"></span>
                                    <?php $annual_discount = ( $has_annual && $has_monthly ) ? $plan->pricing[0]->annual_discount_percentage() : 0 ?>
                                    <?php if ( $annual_discount > 0 ) : ?>
                                        <span
                                            class="fs-annual-discount"><?php printf(
                                            /* translators: %s: Discount (e.g. discount of $5 or 10%) */
                                                fs_esc_html_inline( 'Save %s', 'save-x', $api->slug ), $annual_discount . '%' ) ?></span>
                                    <?php endif ?>
                                    <ul class="fs-licenses">
                                    </ul>
                                    <?php echo $this->get_checkout_cta( $api, $plan, false ) ?>
                                    <div style="clear:both"></div>
                                    <?php if ( $plan->has_trial() ) : ?>
                                        <?php $trial_period = $this->get_trial_period( $plan ) ?>
                                        <ul class="fs-trial-terms">
                                            <li>
                                                <i class="dashicons dashicons-yes"></i><?php echo esc_html( sprintf( fs_text_inline( 'No commitment for %s - cancel anytime', 'no-commitment-x', $api->slug ), $trial_period ) ) ?>
                                            </li>
                                            <li>
                                                <i class="dashicons dashicons-yes"></i><?php printf( esc_html( fs_text_inline( 'After your free %s, pay as little as %s', 'after-x-pay-as-little-y', $api->slug ) ), $trial_period, '<var class="fs-price">' . $this->get_price_tag( $plan, $plan->pricing[0] ) . '</var>' ) ?>
                                            </li>
                                        </ul>
                                    <?php endif ?>
                                </div>
                            </div>
                            </div>
                        <?php endforeach ?>
                    <?php endif ?>
                <?php endif ?>
                <div>
                    <h3><?php fs_echo_inline( 'Details', 'details', $api->slug ) ?></h3>
                    <ul>
                        <?php if ( ! empty( $api->version ) ) { ?>
                            <li>
                                <strong><?php fs_esc_html_echo_x_inline( 'Version', 'product version', 'version', $api->slug ); ?>
                                    :</strong> <?php echo $api->version; ?></li>
                            <?php
                        }
                            if ( ! empty( $api->author ) ) {
                                ?>
                                <li>
                                    <strong><?php fs_echo_x_inline( 'Author', 'as the plugin author', 'author', $api->slug ); ?>
                                        :</strong> <?php echo links_add_target( $api->author, '_blank' ); ?>
                                </li>
                                <?php
                            }
                            if ( ! empty( $api->last_updated ) ) {
                                ?>
                                <li><strong><?php fs_echo_inline( 'Last Updated', 'last-updated', $api->slug ); ?>
                                        :</strong> <span
                                        title="<?php echo $api->last_updated; ?>">
				<?php echo esc_html( sprintf(
                /* translators: %s: time period (e.g. "2 hours" ago) */
                    fs_text_x_inline( '%s ago', 'x-ago', $api->slug ),
                    human_time_diff( strtotime( $api->last_updated ) )
                ) ) ?>
			</span></li>
                                <?php
                            }
                            if ( ! empty( $api->requires ) ) {
                                ?>
                                <li>
                                    <strong><?php fs_esc_html_echo_inline( 'Requires WordPress Version', 'requires-wordpress-version', $api->slug ) ?>
                                        :</strong> <?php echo esc_html( sprintf( fs_text_inline( '%s or higher', 'x-or-higher', $api->slug ), $api->requires ) ) ?>
                                </li>
                                <?php
                            }
                            if ( ! empty( $api->tested ) ) {
                                ?>
                                <li>
                                    <strong><?php fs_esc_html_echo_inline( 'Compatible up to', 'compatible-up-to', $api->slug ); ?>
                                        :</strong> <?php echo $api->tested; ?>
                                </li>
                                <?php
                            }
                            if ( ! empty( $api->downloaded ) ) {
                                ?>
                                <li>
                                    <strong><?php fs_esc_html_echo_inline( 'Downloaded', 'downloaded', $api->slug ) ?>
                                        :</strong> <?php echo esc_html( sprintf(
                                        ( ( 1 == $api->downloaded ) ?
                                            /* translators: %s: 1 or One (Number of times downloaded) */
                                            fs_text_inline( '%s time', 'x-time', $api->slug ) :
                                            /* translators: %s: Number of times downloaded */
                                            fs_text_inline( '%s times', 'x-times', $api->slug )
                                        ),
                                        number_format_i18n( $api->downloaded )
                                    ) ); ?>
                                </li>
                                <?php
                            }
                            if ( ! empty( $api->slug ) && true == $api->is_wp_org_compliant ) {
                                ?>
                                <li><a target="_blank"
                                       href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php fs_esc_html_echo_inline( 'WordPress.org Plugin Page', 'wp-org-plugin-page', $api->slug ) ?>
                                        &#187;</a>
                                </li>
                                <?php
                            }
                            if ( ! empty( $api->homepage ) ) {
                                ?>
                                <li><a target="_blank"
                                       href="<?php echo esc_url( $api->homepage ); ?>"><?php fs_esc_html_echo_inline( 'Plugin Homepage', 'plugin-homepage', $api->slug ) ?>
                                        &#187;</a>
                                </li>
                                <?php
                            }
                            if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) {
                                ?>
                                <li><a target="_blank"
                                       href="<?php echo esc_url( $api->donate_link ); ?>"><?php fs_esc_html_echo_inline( 'Donate to this plugin', 'donate-to-plugin', $api->slug ) ?>
                                        &#187;</a>
                                </li>
                            <?php } ?>
                    </ul>
                </div>
                <?php if ( ! empty( $api->rating ) ) { ?>
                    <h3><?php fs_echo_inline( 'Average Rating', 'average-rating', $api->slug ); ?></h3>
                    <?php wp_star_rating( array(
                        'rating' => $api->rating,
                        'type'   => 'percent',
                        'number' => $api->num_ratings
                    ) ); ?>
                    <small>(<?php echo esc_html( sprintf(
                            fs_text_inline( 'based on %s', 'based-on-x', $api->slug ),
                            sprintf(
                                ( ( 1 == $api->num_ratings ) ?
                                    /* translators: %s: 1 or One */
                                    fs_text_inline( '%s rating', 'x-rating', $api->slug ) :
                                    /* translators: %s: Number larger than 1 */
                                    fs_text_inline( '%s ratings', 'x-ratings', $api->slug )
                                ),
                                number_format_i18n( $api->num_ratings )
                            ) ) ) ?>)
                    </small>
                    <?php
                }

                    if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
                        foreach ( $api->ratings as $key => $ratecount ) {
                            // Avoid div-by-zero.
                            $_rating     = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0;
                            $stars_label = sprintf(
                                ( ( 1 == $key ) ?
                                    /* translators: %s: 1 or One */
                                    fs_text_inline( '%s star', 'x-star', $api->slug ) :
                                    /* translators: %s: Number larger than 1 */
                                    fs_text_inline( '%s stars', 'x-stars', $api->slug )
                                ),
                                number_format_i18n( $key )
                            );
                            ?>
                            <div class="counter-container">
					<span class="counter-label"><a
                            href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
                            target="_blank"
                            title="<?php echo esc_attr( sprintf(
                            /* translators: %s: # of stars (e.g. 5 stars) */
                                fs_text_inline( 'Click to see reviews that provided a rating of %s', 'click-to-reviews', $api->slug ),
                                $stars_label
                            ) ) ?>"><?php echo $stars_label ?></a></span>
                                <span class="counter-back">
						<span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
					</span>
                                <span class="counter-count"><?php echo number_format_i18n( $ratecount ); ?></span>
                            </div>
                            <?php
                        }
                    }
                    if ( ! empty( $api->contributors ) ) {
                        ?>
                        <h3><?php fs_echo_inline( 'Contributors', 'contributors', $api->slug ); ?></h3>
                        <ul class="contributors">
                            <?php
                                foreach ( (array) $api->contributors as $contrib_username => $contrib_profile ) {
                                    if ( empty( $contrib_username ) && empty( $contrib_profile ) ) {
                                        continue;
                                    }
                                    if ( empty( $contrib_username ) ) {
                                        $contrib_username = preg_replace( '/^.+\/(.+)\/?$/', '\1', $contrib_profile );
                                    }
                                    $contrib_username = sanitize_user( $contrib_username );
                                    if ( empty( $contrib_profile ) ) {
                                        echo "<li><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&amp;s=36' width='18' height='18' />{$contrib_username}</li>";
                                    } else {
                                        echo "<li><a href='{$contrib_profile}' target='_blank'><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&amp;s=36' width='18' height='18' />{$contrib_username}</a></li>";
                                    }
                                }
                            ?>
                        </ul>
                        <?php if ( ! empty( $api->donate_link ) ) { ?>
                            <a target="_blank"
                               href="<?php echo esc_url( $api->donate_link ); ?>"><?php fs_echo_inline( 'Donate to this plugin', 'donate-to-plugin', $api->slug ) ?>
                                &#187;</a>
                        <?php } ?>
                    <?php } ?>
            </div>
            <div id="section-holder" class="wrap">
            <?php
            if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
                echo '<div class="notice notice-warning"><p>' . '<strong>' . fs_text_inline( 'Warning', 'warning', $api->slug ) . ':</strong> ' . fs_text_inline( 'This plugin has not been tested with your current version of WordPress.', 'not-tested-warning', $api->slug ) . '</p></div>';
            } else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
                echo '<div class="notice notice-warning"><p>' . '<strong>' . fs_text_inline( 'Warning', 'warning', $api->slug ) . ':</strong> ' . fs_text_inline( 'This plugin has not been marked as compatible with your version of WordPress.', 'not-compatible-warning', $api->slug ) . '</p></div>';
            }

            foreach ( (array) $api->sections as $section_name => $content ) {
                $content = links_add_base_url( $content, 'https://wordpress.org/plugins/' . $api->slug . '/' );
                $content = links_add_target( $content, '_blank' );

                $san_section = esc_attr( $section_name );

                $display = ( $section_name === $section ) ? 'block' : 'none';

                if ( 'description' === $section_name &&
                     ( ( $api->is_wp_org_compliant && $api->wp_org_missing ) ||
                       ( ! $api->is_wp_org_compliant && $api->fs_missing ) )
                ) {
                    $missing_notice = array(
                        'type'    => 'error',
                        'id'      => md5( microtime() ),
                        'message' => $api->is_paid ?
                            fs_text_inline( 'Paid add-on must be deployed to Freemius.', 'paid-addon-not-deployed', $api->slug ) :
                            fs_text_inline( 'Add-on must be deployed to WordPress.org or Freemius.', 'free-addon-not-deployed', $api->slug ),
                    );
                    fs_require_template( 'admin-notice.php', $missing_notice );
                }
                echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
                echo $content;
                echo "\t</div>\n";
            }
            echo "</div>\n";
            echo "</div>\n";
            echo "</div>\n"; // #plugin-information-scrollable
            echo "<div id='$tab-footer'>\n";

            if ( $api->has_paid_plan && ! empty( $api->checkout_link ) ) {
                echo $this->get_checkout_cta( $api );
            }

            if ( ! empty( $api->download_link ) ) {
                echo $this->get_download_cta( $api, empty( $api->checkout_link ) );
            }

            echo "</div>\n";

            iframe_footer();
            exit;
        }
736733
function Menu (opts) {
    Menu.superclass.constructor.call(this, opts)

    var items = opts.items

    if (Director.sharedDirector.isTouchScreen) {
        this.isTouchEnabled = true
    } else {
        this.isMouseEnabled = true
    }

    var s = Director.sharedDirector.winSize

    this.isRelativeAnchorPoint = false
    this.anchorPoint = ccp(0.5, 0.5)
    this.contentSize = s

    this.position = ccp(s.width / 2, s.height / 2)


    if (items) {
        var z = 0
        items.forEach(function (item) {
            this.addChild({child: item, z: z++})
        }.bind(this))
    }
}
584856
public void installMenu() {

        // initialize the menu groups
        m_groupContainer.clear();

        // creates the context help menu
        CmsAdminMenuGroup helpMenu = new CmsAdminMenuGroup(
            "help",
            Messages.get().getBundle(getLocale()).key(Messages.GUI_ADMIN_MENU_HELP_GROUP_0));
        helpMenu.addMenuItem(new CmsAdminContextHelpMenuItem());
        addGroup(helpMenu);

        Iterator<CmsTool> itElems = getToolManager().getToolsForPath(
            this,
            getToolManager().getBaseToolPath(this),
            false).iterator();
        while (itElems.hasNext()) {
            CmsTool tool = itElems.next();
            // check visibility
            String link = tool.getHandler().getLink();
            if (link.indexOf("?") > 0) {
                link = link.substring(0, link.indexOf("?"));
            }
            if (!getCms().existsResource(link) || !tool.getHandler().isVisible(this)) {
                continue;
            }

            // cut out the base
            String path = tool.getHandler().getPath().substring(getToolManager().getBaseToolPath(this).length());
            // special case of the base tool
            if (CmsStringUtil.isEmpty(path)) {
                continue;
            }
            // skip initial '/'
            int pos = tool.getHandler().getPath().indexOf(CmsToolManager.TOOLPATH_SEPARATOR);
            // only install if at first level
            if (path.indexOf(CmsToolManager.TOOLPATH_SEPARATOR, pos + 1) < 0) {

                addItem(
                    tool.getHandler().getGroup(),
                    tool.getHandler().getShortName(),
                    tool.getHandler().getSmallIconPath(),
                    CmsToolManager.linkForToolPath(getJsp(), tool.getHandler().getPath()),
                    tool.getHandler().isEnabled(this)
                    ? tool.getHandler().getHelpText()
                    : tool.getHandler().getDisabledHelpText(),
                    tool.getHandler().isEnabled(this),
                    tool.getHandler().getPosition(),
                    CmsAdminMenu.DEFAULT_TARGET);
            }
        }
    }
812965
def init_menu():
    """"""
    # Register breadcrumb root
    item = current_menu.submenu('breadcrumbs.settings')
    item.register('', _('Account'))
    item = current_menu.submenu('breadcrumbs.{0}'.format(
        current_app.config['SECURITY_BLUEPRINT_NAME']))

    if current_app.config.get('SECURITY_CHANGEABLE', True):
        item.register('', _('Change password'))

        # Register settings menu
        item = current_menu.submenu('settings.change_password')
        item.register(
            "{0}.change_password".format(
                current_app.config['SECURITY_BLUEPRINT_NAME']),
            # NOTE: Menu item text (icon replaced by a user icon).
            _('%(icon)s Change password',
                icon='<i class="fa fa-key fa-fw"></i>'),
            order=1)

        # Register breadcrumb
        item = current_menu.submenu('breadcrumbs.{0}.change_password'.format(
            current_app.config['SECURITY_BLUEPRINT_NAME']))
        item.register(
            "{0}.change_password".format(
                current_app.config['SECURITY_BLUEPRINT_NAME']),
            _("Change password"),
            order=0,
        )
1094858
def setup_menus():
    ''''''
    menu = MPMenuTop([])
    menu.add(MPMenuSubMenu('MAVExplorer',
                           items=[MPMenuItem('Settings', 'Settings', 'menuSettings'),
                                  MPMenuItem('Map', 'Map', '# map'),
                                  MPMenuItem('Save Graph', 'Save', '# save'),
                                  MPMenuItem('Reload Graphs', 'Reload', '# reload')]))
    menu.add(graph_menus())
    menu.add(MPMenuSubMenu('FlightMode', items=flightmode_menu()))

    mestate.console.set_menu(menu, menu_callback)
385575
function _createMenu () {
  // Set up the application menu1
  const template = [
    {
      label: 'File',
      submenu: [
        {
          label: 'New',
          submenu: [
            {
              label: 'Article',
              accelerator: 'CommandOrControl+N',
              click () {
                _openNew('article')
              }
            },
            {
              label: 'Figure Package',
              click () {
                _openNew('figure-package')
              }
            }
          ]
        },
        {
          label: 'Open',
          accelerator: 'CommandOrControl+O',
          click () {
            _promptOpen()
          }
        },
        {
          label: 'Save',
          accelerator: 'CommandOrControl+S',
          click () {
            _save()
          }
        },
        {
          label: 'Save As...',
          accelerator: 'CommandOrControl+Shift+S',
          click () {
            _saveAs()
          }
        }
      ]
    },
    {
      label: 'Edit',
      submenu: [
        { role: 'undo' },
        { role: 'redo' },
        { type: 'separator' },
        { role: 'cut' },
        { role: 'copy' },
        { role: 'paste' },
        { role: 'pasteandmatchstyle' },
        { role: 'delete' },
        { role: 'selectall' }
      ]
    },
    {
      label: 'View',
      submenu: [
        { role: 'toggledevtools' },
        { type: 'separator' },
        { role: 'resetzoom' },
        { role: 'zoomin' },
        { role: 'zoomout' },
        { type: 'separator' },
        { role: 'togglefullscreen' }
      ]
    },
    {
      role: 'window',
      submenu: [
        { role: 'minimize' },
        { role: 'close' }
      ]
    },
    {
      role: 'help',
      submenu: [
        {
          label: 'Learn More',
          click () {
            // TODO: why not use the globally required electron?
            shell.openExternal('http://substance.io/texture')
          }
        }
      ]
    }
  ]

  if (process.platform === 'darwin') {
    template.unshift({
      label: app.getName(),
      submenu: [
        { role: 'about' },
        { type: 'separator' },
        { role: 'services', submenu: [] },
        { type: 'separator' },
        { role: 'hide' },
        { role: 'hideothers' },
        { role: 'unhide' },
        { type: 'separator' },
        { role: 'quit' }
      ]
    })
  }

  const menu = Menu.buildFromTemplate(template)
  Menu.setApplicationMenu(menu)
}
145633
function menu( items, nextStep ) {
    const rl = RL.createInterface( {
        input: process.stdin,
        output: process.stdout
    } );
    console.log();
    items.forEach( function ( item, idx ) {
        var out = idx < 10 ? ' ' : '';
        out += ( "" + ( 1 + idx ) + ") " ).yellow;
        out += item;
        console.log( out );
    } );
    console.log();
    rl.question( "Your choice: ", ( ans ) => {
        rl.close();
        var choice = parseInt( ans );
        if ( isNaN( ans ) || ans < 1 || ans > items.length ) {
            menu( items, nextStep );
        } else {
            console.log();
            nextStep( choice );
        }
    } );
}
65084
function (menu, cmenu) {
            var className = cmenu.className;
            $.each(cmenu.theme.split(","), function (i, n) {
                className += ' ' + cmenu.themePrefix + n;
            });
//			var $t = $('<div style="background-color:#ffff00; xwidth:200px; height:200px"><table style="" cellspacing=0 cellpadding=0></table></div>').click(function(){cmenu.hide(); return false;}); // We wrap a table around it so width can be flexible
            var $t = $('<table style="" cellspacing="0" cellpadding="0"></table>').click(function () {
                cmenu.hide();
                return false;
            }); // We wrap a table around it so width can be flexible
            var $tr = $('<tr></tr>');
            var $td = $('<td></td>');
            var $div = cmenu._div = $('<div class="' + className + '"></div>');

            cmenu._div.hover(
                function () {
                    if (cmenu.closeTimer) {
                        clearTimeout(cmenu.closeTimer);
                        cmenu.closeTimer = null;
                    }
                },
                function () {
                    var myClass = cmenu;

                    function timerRelay() {
                        myClass.hide();
                    }

                    myClass.closeTimer = setTimeout(timerRelay, 500);
                }
            );

            // Each menu item is specified as either:
            //     title:function
            // or  title: { property:value ... }
            /*
             for (var i=0; i<menu.length; i++) {
             var m = menu[i];
             if (m==$.contextMenu.separator) {
             $div.append(cmenu.createSeparator());
             }
             else {
             for (var opt in menu[i]) {
             $div.append(cmenu.createMenuItem(opt,menu[i][opt])); // Extracted to method for extensibility
             }
             }
             }
             */
            for (var i = 0; i < menu.length; i++) {
                var m = menu[i];
                if (m === $.contextMenu.separator) {
                    $div.append(cmenu.createSeparator());
                }
                else {
                    $div.append(cmenu.createMenuItem(m)); // Extracted to method for extensibility
                }
            }
            if (cmenu.useIframe) {
                $td.append(cmenu.createIframe());
            }
            $t.append($tr.append($td.append($div)));
            return $t;
        }
993457
def _build_menu(self, context_menu: QMenu):
        """"""
        logger.debug("Show tray icon enabled in settings: {}".format(cm.ConfigManager.SETTINGS[cm.SHOW_TRAY_ICON]))
        # Items selected for display are shown on top
        self._fill_context_menu_with_model_item_actions(context_menu)
        # The static actions are added at the bottom
        context_menu.addAction(self.action_view_script_error)
        context_menu.addAction(self.action_enable_monitoring)
        context_menu.addAction(self.action_hide_icon)
        context_menu.addAction(self.action_show_config_window)
        context_menu.addAction(self.action_quit)
877470
def CreateMenuBar(self):
        """"""
        menubar = wx.MenuBar()
        menu = wx.Menu()
        menu.Append(ID_OPEN, _('&Open Profile'), _('Open a cProfile file'))
        menu.Append(ID_OPEN_MEMORY, _('Open &Memory'), _('Open a Meliae memory-dump file'))
        menu.AppendSeparator()
        menu.Append(ID_EXIT, _('&Close'), _('Close this RunSnakeRun window'))
        menubar.Append(menu, _('&File'))
        menu = wx.Menu()
#        self.packageMenuItem = menu.AppendCheckItem(
#            ID_PACKAGE_VIEW, _('&File View'),
#            _('View time spent by package/module')
#        )
        self.percentageMenuItem = menu.AppendCheckItem(
            ID_PERCENTAGE_VIEW, _('&Percentage View'),
            _('View time spent as percent of overall time')
        )
        self.rootViewItem = menu.Append(
            ID_ROOT_VIEW, _('&Root View (Home)'),
            _('View the root of the tree')
        )
        self.backViewItem = menu.Append(
            ID_BACK_VIEW, _('&Back'), _('Go back in your viewing history')
        )
        self.upViewItem = menu.Append(
            ID_UP_VIEW, _('&Up'),
            _('Go "up" to the parent of this node with the largest cumulative total')
        )
        self.moreSquareViewItem = menu.AppendCheckItem(
            ID_MORE_SQUARE, _('&Hierarchic Squares'),
            _('Toggle hierarchic squares in the square-map view')
        )

        # This stuff isn't really all that useful for profiling,
        # it's more about how to generate graphics to describe profiling...
        self.deeperViewItem = menu.Append(
            ID_DEEPER_VIEW, _('&Deeper'), _('View deeper squaremap views')
        )
        self.shallowerViewItem = menu.Append(
            ID_SHALLOWER_VIEW, _('&Shallower'), _('View shallower squaremap views')
        )
#        wx.ToolTip.Enable(True)
        menubar.Append(menu, _('&View'))
        
        self.viewTypeMenu =wx.Menu( )
        menubar.Append(self.viewTypeMenu, _('View &Type'))
        
        self.SetMenuBar(menubar)

        wx.EVT_MENU(self, ID_EXIT, lambda evt: self.Close(True))
        wx.EVT_MENU(self, ID_OPEN, self.OnOpenFile)
        wx.EVT_MENU(self, ID_OPEN_MEMORY, self.OnOpenMemory)
        
        wx.EVT_MENU(self, ID_PERCENTAGE_VIEW, self.OnPercentageView)
        wx.EVT_MENU(self, ID_UP_VIEW, self.OnUpView)
        wx.EVT_MENU(self, ID_DEEPER_VIEW, self.OnDeeperView)
        wx.EVT_MENU(self, ID_SHALLOWER_VIEW, self.OnShallowerView)
        wx.EVT_MENU(self, ID_ROOT_VIEW, self.OnRootView)
        wx.EVT_MENU(self, ID_BACK_VIEW, self.OnBackView)
        wx.EVT_MENU(self, ID_MORE_SQUARE, self.OnMoreSquareToggle)
1326712
def menu(output, options={}, &block)
      Console.format_output(output, options.merge(:class=>"Hirb::Menu"), &block)
    end
1222382
def create_information(self):
        """"""
        info = self._info_type()(origin=self, contents=self._contents())
        return info