Examples used at http://msls.co/functions-classes-and-methods/
View default
... | |
server { | |
... | |
access_log /var/log/nginx/example-access.log; | |
access_log /var/log/nginx/example-mine.log mine; | |
... | |
} |
View nginx.conf
... | |
http { | |
... | |
log_format mine '$uri - $blogid : $http_host'; | |
... | |
} |
View MslsGetSet.php
$obj = new MslsGetSet; | |
$obj->tmp = 'test'; | |
$val = $obj->get_arr(); // array( 'tmp' => 'test' ) == $val | |
$val = $obj->has_value( 'tmp' ); // true == $val | |
$val = $obj->is_empty(); // false == $val | |
echo $obj->tmp; // Output: test | |
$obj->reset(); |
View integration.md
Examples used at http://msls.co/integration-snippets-and-examples/
View wp-query-ref.php
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = array( |
View available-mail-hooks.php
<?php | |
/** | |
* Filter the wp_mail() arguments. | |
* | |
* @since 2.2.0 | |
* | |
* @param array $args A compacted array of wp_mail() arguments, including the "to" email, | |
* subject, message, headers, and attachments values. | |
*/ |
View .htaccess
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] |
View my_msls_blog_collection_get.php
<?php | |
function my_msls_blog_collection_get( $objects ) { | |
$objects = array(); | |
$blogs = array( 1 => 'Override English', 2 => 'Override Deutsch', ); | |
foreach ( $blogs as $id => $description ) { | |
$details = get_blog_details( $id ); | |
if ( is_object( $details ) ) { | |
$objects[$id] = new MslsBlog( $details, $description ); | |
} |
OlderNewer