Examples used at http://msls.co/functions-classes-and-methods/
Last active
August 29, 2015 14:06
-
-
Save lloc/42461e05324e9bf1924b to your computer and use it in GitHub Desktop.
Functions, classes and methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = ''; | |
if ( function_exists ( 'get_the_msls' ) ) { | |
$str = get_the_msls(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$object = new MslsOutput(); | |
$display = 0; | |
$exists = false; | |
foreach ( $object->get( $display, $exists ) as $link ) { | |
echo $link; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( function_exists ( 'the_msls' ) ) { | |
the_msls(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( function_exists ( 'the_msls' ) ) { | |
$args = array( | |
'before_item' => '<li>', | |
'after_item' => '</li>', | |
'before_output' => '<ul>', | |
'after_output' => '</ul>', | |
); | |
the_msls( $args ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment