Esempio n. 1
0
 public static function api($_posts)
 {
     $posts = array('product' => self::$product, 'pro' => N2SSPRO);
     return N2::api($_posts + $posts);
 }
Esempio n. 2
0
function media_buttons2()
{
    echo N2::media_buttons();
}
Esempio n. 3
0
?>
" />
					</span>
				<input type="hidden" name="action" value="post" />
				<?php 
wp_nonce_field('new-post');
?>
			</form>
			</div>
		</div>
		
		<div id="tab3">
			<div class="adminaccess">
				<form id="new_status" name="new_status" method="post" action="">
					<div id="media-buttons" class="hide-if-no-js"><?php 
echo N2::media_buttons2();
?>
</div>
					<p><label for="status">What's up with you...</label><br />
					<textarea class="expand70-200" name="status" id="status" tabindex="2" rows="4" cols="45"></textarea></p>
					<label class="post-error" for="status" id="posttext_error"></label>

					<p><label for="tags">Tags:</label>
					<?php 
$tags = get_taxonomy('post_tags');
?>
					<input type="text" name="tags" id="tags" value="" tabindex="3" size="30" /></p>
					
					<input type="hidden" name="post_type" id="post_type" value="status" />
					<p align="right"><input type="submit" name="submit" id="submit" tabindex="4" value="Update Status" /></p>
	
Esempio n. 4
0
<?php

// The function doesnt exist until the class is called.
$x = 0;
if (1) {
    function x()
    {
        class N2
        {
            const N2 = 2;
            function y()
            {
                var_dump(N2);
                function z()
                {
                    global $x;
                    $x = 5;
                }
            }
        }
    }
}
x();
var_dump(N2::N2);
var_dump($x);
$n2 = new N2();
$n2->y();
var_dump($x);
z();
var_dump($x);
Esempio n. 5
0
 function make_media_urls($string)
 {
     // This line does not work in .org
     return str_replace('media-upload.php?', N2::admin_url('media-upload.php?n2-upload=true&'), $string);
 }