當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mm_build_link函數代碼示例

本文整理匯總了PHP中mm_build_link函數的典型用法代碼示例。如果您正苦於以下問題:PHP mm_build_link函數的具體用法?PHP mm_build_link怎麽用?PHP mm_build_link使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了mm_build_link函數的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: mm_temp_redirect

function mm_temp_redirect()
{
    /*This will only exist until mm_services_page is ready */
    if (isset($_GET['page']) && $_GET['page'] == 'mojo-services') {
        wp_redirect(mm_build_link('http://www.mojomarketplace.com/services/all/wordpress', array('utm_medium' => 'plugin_admin', 'utm_content' => 'services_page')));
    }
}
開發者ID:valiror,項目名稱:sharingdais_demo1,代碼行數:7,代碼來源:menu.php

示例2: mm_item_shortcode

function mm_item_shortcode($atts)
{
    global $use_mm_styles;
    $use_mm_styles = true;
    $defaults = array('platform' => 'wordpress', 'type' => 'themes', 'item' => 'recent', 'quantity' => 1, 'aff' => defined('MMAFF') ? MMAFF : "", 'seller' => '');
    $atts = wp_parse_args($atts, $defaults);
    $args = array('mojo-platform' => $atts['platform'], 'mojo-type' => $atts['type'], 'mojo-items' => $atts['item']);
    $content = "<div class='mojo-items-wrap'>";
    $response = mm_api($args, array('count' => $atts['quantity'], 'seller' => $atts['seller']));
    if (!is_wp_error($response)) {
        $items = json_decode($response['body']);
        foreach ($items as $item) {
            $item->name = apply_filters('mm_item_name', $item->name);
            $content .= '
		<article class="item">
			<div class="box">
				<div class="item-photo">
					<a target="_blank" class="screenshot" href="' . mm_build_link($item->page_url, array('utm_medium' => 'plugin_shortcode', 'utm_content' => 'item_thumbnail', 'r' => $atts['aff'])) . '">
						<img width="68" height="68" alt="' . $item->name . '" src="' . $item->images->square_thumbnail_url . '">
					</a>
				</div>

				<div class="item-title">
					<h3 class="title">
						<a target="_blank" href="' . mm_build_link($item->page_url, array('utm_medium' => 'plugin_shortcode', 'utm_content' => 'item_title_link', 'r' => $atts['aff'])) . '">' . $item->name . '</a>
					</h3>

					<h5 class="author">
						<a target="_blank" href="' . mm_build_link($item->seller_url, array('utm_medium' => 'plugin_shortcode', 'utm_content' => 'item_seller_link', 'r' => $atts['aff'])) . '">' . $item->seller_name . '</a>
					</h5>
				</div>

				<div class="item-details-actions">
					<div class="price">$' . $item->prices->single_domain_license . '</div>

					<div class="sales">
						<span class="num">( ' . $item->sales_count . ' Sales )</span>
					</div>

					<div class="add-to-cart">
						<form accept-charset="utf-8" method="post" id="CartItemRouteForm" target="_blank" enctype="multipart-data" action="' . mm_build_link('https://www.mojomarketplace.com/cart', array('utm_medium' => 'plugin_shortcode', 'utm_content' => 'item_add_to_cart_button')) . '">
							<input type="hidden" id="CartItemItemId" value="' . $item->id . '" name="data[CartItem][item_id]">
							<button class="mm-btn-primary" type="submit">Add to Cart</button>
						</form>
					</div>
				</div>
				<div class="clear"></div>
			</div>
		</article>
		';
        }
    }
    $content .= "</div>";
    return $content;
}
開發者ID:Cigarent,項目名稱:personalweb,代碼行數:55,代碼來源:shortcode-generator.php

示例3: mm_plugin_search_notice

function mm_plugin_search_notice()
{
    if (isset($_GET['s']) && ($plugin = mm_check_plugin_search_value($_GET['s']))) {
        $link = mm_build_link($plugin['url'], array('utm_medium' => 'plugin_admin', 'utm_content' => 'plugin_search'));
        $plugin_html = '
		<div style="display: inline-block;background-color: #D54E21;margin-left: -20px;padding-right: 20px;width: 100%;">
			<p style="font-size: 1.2rem;color: #fff;padding-left: 20px;">
				Did you know MOJO Marketplace has <a style="color:#fff;" href="' . $link . '">Pro Services</a> for ' . $plugin['name'] . '? <a style="color: #fff; font-size: .8rem; margin: 15px;" href="' . $link . '">Click here for more</a>
			</p>
		</div>';
        $plugin_html = mm_minify($plugin_html);
        echo "\n\t\t<script type='text/javascript'>\n\t\t\tjQuery( document ).ready( function( jQuery ) {\n\t\t\t\tjQuery( '#wpbody' ).before( '" . $plugin_html . "' );\n\t\t\t} );\n\t\t</script>";
    }
}
開發者ID:annbransom,項目名稱:techishowl_prod_backup,代碼行數:14,代碼來源:plugin-search.php

示例4: mm_plugin_search_notice

function mm_plugin_search_notice()
{
    if (isset($_GET['s']) && ($plugin = mm_check_plugin_search_value($_GET['s']))) {
        $link = mm_build_link($plugin['url'], array('utm_medium' => 'plugin_admin', 'utm_content' => 'plugin_search'));
        ?>
		<div class="updated">
			<p>Did you know? MOJO Marketplace has a <a target="_blank" href="<?php 
        echo $link;
        ?>
">service</a> for <a target="_blank" href="<?php 
        echo $link;
        ?>
"><?php 
        echo $plugin['name'];
        ?>
</a></p>
		</div>
		<?php 
    }
}
開發者ID:brooklyntri,項目名稱:btc-plugins,代碼行數:20,代碼來源:plugin-search.php

示例5: mm_display_backup_reminder

function mm_display_backup_reminder()
{
    if ('update-core.php' == basename($_SERVER['REQUEST_URI'])) {
        ?>
		<div class="updated">
			<p>Interested in having your backups setup for you? <a href='<?php 
        echo mm_build_link('https://www.mojomarketplace.com/item/backup-your-wordpress-website', array('utm_content' => 'update_backup_notice'));
        ?>
'>learn more</a></p>
		</div>
		<?php 
    }
}
開發者ID:tinggao,項目名稱:woofWarrior,代碼行數:13,代碼來源:notifications.php

示例6: widget

 public function widget($args, $instance)
 {
     $instance = wp_parse_args($instance, $this->defaults);
     $query = array();
     if ($instance['mojo-platform'] == "wordpress" && $instance['mojo-type'] == "plugins") {
         $instance['mojo-type'] = "themes";
         //Because MOJO Cannot sell WP plugins...
     }
     if ($instance['mojo-quantity'] != 10) {
         $query['count'] = $instance['mojo-quantity'];
     }
     if (2 < strlen($instance['mojo-seller'])) {
         $query['seller'] = $instance['mojo-seller'];
     }
     if ('on' == $instance['mojo-preview']) {
         global $use_mm_styles;
         $use_mm_styles = true;
     }
     $items = mm_api($instance, $query);
     /*if there are no popular items show default*/
     if (strlen($items['body']) < $instance['mojo-quantity'] and $instance['mojo-items'] == 'popular') {
         $items = mm_api();
     }
     if (!is_wp_error($items)) {
         $items = json_decode($items['body']);
         $aff_id = (isset($instance['mojo-aff-id']) and strlen($instance['mojo-aff-id']) > 0) ? $instance['mojo-aff-id'] : '';
         $content = "";
         $count = 0;
         foreach ($items as $item) {
             $item->name = apply_filters('mm_item_name', $item->name);
             $content .= '<div class="mojo-widget-item wp-caption" style="margin:15px 0px;">';
             $content .= '<a target="_blank" href="' . mm_build_link($item->page_url, array('r' => $aff_id, 'utm_medium' => 'plugin_widget', 'utm_content' => 'item_thumbnail')) . '"><img style="display:block;margin: 0 auto;max-width: 100%;" src="' . $item->images->{$instance['mojo-image-size']} . '"  /></a>';
             if ('on' == $instance['mojo-preview']) {
                 $content .= '<a target="_blank" class="mojo-widget-preview" href="' . mm_build_link($item->page_url, array('r' => $aff_id, 'utm_medium' => 'plugin_widget', 'utm' => 'item_thumbnail_hover_preview')) . '"><img src="' . $item->images->preview_url . '" /></a>';
             }
             $content .= '<p class="wp-caption-text">' . $item->name . '</p>';
             $content .= '</div>';
             $count++;
         }
         $title = apply_filters('widget_title', $instance['mojo-title']);
         echo $args['before_widget'];
         if (!empty($title)) {
             echo $args['before_title'] . $title . $args['after_title'];
         }
         echo $content;
         echo $args['after_widget'];
     }
 }
開發者ID:DavidSalzer,項目名稱:cambium-site,代碼行數:48,代碼來源:themes-widget.php

示例7: mm_build_link

			<div class="mojo-service-actions">
				<form class="buy_now" method="POST" target="_blank" action="<?php 
        echo mm_build_link("https://www.mojomarketplace.com/cart", array('utm_medium' => 'plugin_admin', 'utm_content' => 'item_' . $api_args['mojo-items'] . '_buy_now_button'));
        ?>
" class="buy_now <?php 
        echo 'item_' . $api_args['mojo-items'] . '_buy_now_' . mm_title_to_slug($item->name);
        ?>
">
					<input type="hidden" name="data[CartItem][item_id]" value="<?php 
        esc_attr_e($item->id);
        ?>
"/>
					<input class="mm-btn-primary" type="submit" value="Buy Now"/>
				</form>

				<a target="_blank" href="<?php 
        echo mm_build_link($item->page_url, array('utm_medium' => 'plugin_admin', 'utm_content' => 'item_' . $api_args['mojo-items'] . '_details_button'));
        ?>
" class="button button-secondary">Details</a>
				<div class="price">$<?php 
        esc_html_e($item->prices->single_domain_license);
        ?>
</div>
			</div>
		</div>
		<?php 
    }
}
?>
	</div>
</div>
開發者ID:rmalina,項目名稱:creativedisturbance,代碼行數:31,代碼來源:mojo-services.php

示例8: mm_plugin_search_offer

function mm_plugin_search_offer()
{
    if (isset($_GET['s']) && ($plugin = mm_check_plugin_search_value($_GET['s']))) {
        $mm_test = get_transient('mm_test', array('name' => 'none'));
        $link = mm_build_link($plugin['url'], array('utm_medium' => 'plugin_admin', 'utm_content' => 'plugin_search'));
        switch ($mm_test['name']) {
            case 'plugin-search-banner':
                $plugin_html = '
				<div style="display: inline-block;background-color: #D54E21;margin-left: -20px;padding-right: 20px;width: 100%;">
					<p style="font-size: 1.2rem;color: #fff;padding-left: 20px;">
						Did you know MOJO Marketplace has <a style="color:#fff;" href="' . $link . '">Pro Services</a> for ' . $plugin['name'] . '? <a style="color: #fff; font-size: .8rem; margin: 15px;" href="' . $link . '">Click here for more</a>
					</p>
				</div>';
                $plugin_html = mm_minify($plugin_html);
                echo "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tjQuery( document ).ready( function( jQuery ) {\n\t\t\t\t\t\tjQuery( '#wpbody' ).before( '" . $plugin_html . "' );\n\t\t\t\t\t} );\n\t\t\t\t</script>";
                break;
            case 'plugin-search-result':
                //this should be fast as a transient
                $api_args = array('mojo-platform' => 'wordpress', 'mojo-type' => '', 'mojo-items' => 'popular-services');
                $result = mm_api($api_args, array('count' => '30'));
                if (!is_wp_error($result)) {
                    //this makes me wanna cry
                    $descriptions = array('530782e3-1388-4e6a-a8ac-6f7b0a140b28' => 'WooCommerce will transform your WordPress site into a full eCommerce store that is simple to use. WooCommerce comes ready for all the features you need to operate such as a shipping calculator, easy checkout, rating system, reporting, tax options, and much more. There is a reason WooCommerce is the leading eCommerce WordPress plugin today!', '530697a6-92cc-4329-9cdd-21e40a140b28' => 'Google Analytics is a powerful tool that is free to use when you have a Google account. For many people, integrating Google Analytics can be a challenge and that is why we are offering help from our professional service team. You can follow users on your site in real time and get in depth analysis as to their behaviors when browsing your website.', '530788ba-c450-45eb-b154-47ce0a141528' => 'Google loves to see a list of every page on your site and how those pages relate to each other. Not only does it help Google find each page it also shows them understand what is and is not important and that‘s how they determine which pages show up in the Google search results. As an added bonus, it helps your users find what they‘re looking for within your site. ', '53d7ea4d-e52c-42fe-9b7e-5ed50a141528' => 'As a platform, WordPress offers some sound SEO components to rank high in the search engines like Google. With the WordPress SEO plugin by Yoast, you‘re guided within each post and page your publish inside your WordPress site. The plugin ensures your content is fully optimized for the search engines.', '53078511-1974-470c-8ed5-43500a141528' => 'BuddyPress is a WordPress plugin that takes your WordPress site and adds a full-blown social network. By using BuddyPress, you instantly get access to user profiles, activity streams, user groups and much more functionality. You can use your existing WordPress site and add BuddyPress on top of it for your personal social network.', '530783b3-d4d8-4823-ad1e-70310a140b28' => 'bbPress is a WordPress plugin that makes it easy to add a forum to your website. From within your WordPress admin, you can easily setup and moderate forums, topics and replies. All bbPress features integrate nicely with your current users and pages.', '53078468-fc10-45de-b813-70b70a140b28' => 'Adding a WordPress contact form to your website will make it easy for you to have your users contact you directly without you having to give away your email address. Contact forms also make it easy for you to view your contacts and leads directly from the your WordPress dashboard.', '530786ea-27b8-4f1b-bc94-46650a141528' => 'Does your business have a physical location? Then you probably want your customers to locate you, and Google Maps can make that happen. Let us add Google Maps to your WordPress website for you. We can add up to 10 different locations with include custom navigation. After we install Google Maps you‘ll be able to make sure that everyone knows just how to find your business.', '53b4501f-180c-4bd3-9b3f-56cb0a141528' => 'On average 30,000 websites are hacked every day! Unfortunately, WordPress can be an easy target. Let us help you drastically increase your site‘s security. ', '53d7e760-5140-4761-ac5b-5bd00a141528' => 'This service adds Facebook social plugins to your WordPress site. With this service, you can attach your WordPress site to a Facebook account and easily share new posts to your Facebook timeline.', '53e00b04-03b8-4025-bb75-173c0a141528' => 'Backing up your website is one of the single most important things you can do. With this backup service we will set things up so you can continually backup your WordPress website. So if your site gets hacked or you make an accidental change you’ll be able to backup your site to when it was in tip top shape.', '53ee5b7a-aef4-44f3-a4dd-48b90a140b28' => '<strong>Improve Usability and site traffic with a Faster Website. </strong>Is your WordPress website taking a long time to load? Did you know that Google and other search engines will actually send you more traffic if it loads quickly? Did you also know that having a faster site means visitors will stay on your site longer so you can be even more successful? It‘s True! Let our pros go through your site and speed it up.', '53ee5ec2-eff0-441a-944d-52050a140b28' => '<strong>Have a great theme, but don’t like the colors?</strong> Simply tell us which colors you’d like to replace and we’ll swap out up to 3 colors throughout your entire site. This is a great way to ensure that your theme properly reflects your unique style and brand.', '53ee5dce-e2ec-4697-a09a-52050a140b28' => '<strong>Wish someone else would write your content for you?</strong> We will! In fact we have an amazing team of college grads and English majors who just love writing content (Weird, right?). You’ve probably been meaning to write out the content yourself for a while now, but you never seem to have the time to finish it. Answer a few simple questions and our team will write 100 words of amazing content and add it to any page of your site.');
                    $items = json_decode($result['body']);
                    foreach ($items as $item) {
                        if ($item->id == $plugin['id']) {
                            $service = $item;
                        }
                    }
                    if (isset($service) && isset($descriptions[$plugin['id']])) {
                        $plugin_html = '
						<div class="plugin-card" style="border-color: #0074a2;">
							<div class="plugin-card-top" style="border-bottom: 1px solid #0074a2;">
								<a target="_blank" href="' . $link . '"><img class="plugin-icon" src="' . $service->images->square_thumbnail_url . '"></a>
								<div class="name column-name">
									<h4><a href="' . $link . '">' . $service->name . '</a></h4>
									<div class="action-links">
										<ul class="plugin-action-buttons">
											<li>
												<a aria-label="' . esc_attr($service->name) . '" href="' . $link . '" class="button">More Details</a>
											</li>
											<li>
												<form method="POST" target="_blank" action="' . mm_build_link("https://www.mojomarketplace.com/cart", array('utm_medium' => 'plugin_admin', 'utm_content' => 'item_' . $api_args['mojo-items'] . '_plugin_search')) . '" class="item_plugin_search_' . mm_title_to_slug($item->name) . '">
													<input type="hidden" name="data[CartItem][item_id]" value="' . esc_attr($service->id) . '"/>
													<input class="button" type="submit" value="Purchase"/>
												</form>
											</li>
										</ul>	
									</div>
								</div>
								<div class="desc column-description">
									<p>' . $descriptions[$plugin['id']] . '</p>
									<p class="authors"> <cite>By <a href="' . mm_build_link('https://mojomarketplace.com/', array('utm_medium' => 'plugin_admin', 'utm_content' => 'author_plugin_search')) . '">MOJO Marketplace</a></cite></p>
								</div>
							</div>
							<div class="plugin-card-bottom">
								<div class="column-downloaded">
									' . $service->sales_count . ' downloads
								</div>
							</div>
						</div>';
                        $plugin_html = mm_minify($plugin_html);
                        echo "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tjQuery( document ).ready( function( \$ ) {\n\t\t\t\t\t\t\t\t\$( '#the-list' ).prepend( '" . $plugin_html . "' );\n\t\t\t\t\t\t\t\t\$( '.plugin-card:last-of-type' ).hide();\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t</script>";
                    }
                }
                break;
            default:
                add_action('admin_notices', 'mm_plugin_search_notice');
                break;
        }
    }
}
開發者ID:brooklyntri,項目名稱:btc-plugins,代碼行數:72,代碼來源:tests.php

示例9: mm_build_link

					</div>
				</div>
			</div>
			<div class="wp-full-overlay-main">
				<?php 
    if (!isset($_GET['details'])) {
        ?>
					<iframe src="<?php 
        echo mm_build_link($theme->demo_url, array('utm_medium' => 'plugin_admin', 'utm_content' => 'preview_' . esc_attr($_GET['items']) . '_view_demo'));
        ?>
"></iframe>
					<?php 
    } else {
        ?>
					<iframe src="<?php 
        echo mm_build_link($theme->page_url, array('utm_medium' => 'plugin_admin', 'utm_content' => 'preview_' . esc_attr($_GET['items']) . '_view_details'));
        ?>
"></iframe>
					<?php 
    }
    ?>
			</div>
		</div>
	<?php 
}
?>
</div>

<?php 
global $title;
if (empty($title)) {
開發者ID:annbransom,項目名稱:techishowl_prod_backup,代碼行數:31,代碼來源:theme-preview.php

示例10: mm_build_link

			
					<div class="theme-author">By <a target="_blank" href="<?php 
            echo mm_build_link($item->seller_url, array('utm_medium' => 'plugin_admin', 'utm_content' => 'item_seller_link'));
            ?>
"><?php 
            echo $item->seller_name;
            ?>
</a></div>
					<h3 class="theme-name"><?php 
            echo $item->name;
            ?>
</h3>

					<div class="mojo-theme-actions">
						<form class="buy_now" method="POST" target="_blank" action="<?php 
            echo mm_build_link("https://www.mojomarketplace.com/cart", array('utm_medium' => 'plugin_admin', 'utm_content' => 'item_' . $api_args['mojo-items'] . '_buy_now_button'));
            ?>
" class="buy_now <?php 
            echo 'item_' . $api_args['mojo-items'] . '_buy_now_' . mm_title_to_slug($item->name);
            ?>
">
						<input type="hidden" name="data[CartItem][item_id]" value="<?php 
            echo $item->id;
            ?>
"/>
						<input class="mm-btn-primary" type="submit" value="Buy Now"/>
						</form>
							
						<a href="admin.php?page=mojo-theme-preview&amp;id=<?php 
            echo $item->id;
            ?>
開發者ID:rmalina,項目名稱:creativedisturbance,代碼行數:30,代碼來源:mojo-themes.php

示例11: mm_build_link

">
					<input type="hidden" name="data[CartItem][item_id]" value="<?php 
    echo $item->id;
    ?>
"/>
					<input class="mm-btn-primary" type="submit" value="Buy Now"/>
					</form>
				</li>
				<li><a target="_blank" title="Demo : <?php 
    echo $item->name;
    ?>
" href="<?php 
    echo mm_build_link($item->demo_url, array('utm_medium' => 'plugin_admin', 'utm_content' => 'item_view_demo_link', 'TB_iframe' => 'true', 'width' => '1200', 'height' => '800'));
    ?>
" class="install-theme-preview thickbox">View Demo</a></li>
				<li><a target="_blank" href="<?php 
    echo mm_build_link($item->page_url, array('utm_medium' => 'plugin_admin', 'utm_content' => 'item_view_details_link', 'TB_iframe' => 'true', 'width' => '1200', 'height' => '800'));
    ?>
" class="thickbox">Details</a></li>
				<li><div class="price">$<?php 
    echo $item->prices->single_domain_license;
    ?>
</div></li>
			</ul>
		</div>
		
	</div>
	<?php 
}
?>
</div>
開發者ID:JChops2,項目名稱:jp-test,代碼行數:31,代碼來源:mojo-themes.php


注:本文中的mm_build_link函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。