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
<snippet> | |
<content><![CDATA[ | |
/*'map_height' => '250px', | |
'map_width' => '250px', | |
'map_type' => 'ROADMAP', | |
'zoom_level' => 13, | |
'additional_info' => 'address,phone,fax,email,website', | |
'post_id' => 0, | |
'directions' => 1*/ |
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
<snippet> | |
<content><![CDATA[ | |
if( \$row['${1:subfield_slug}']) | |
{ | |
echo '<li>${1:subfield_slug}: ' . \$row['${1:subfield_slug}'] . '</li>'; | |
} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>acfrepeatersubfield</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
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
<snippet> | |
<content><![CDATA[ | |
\$rows = get_field('${1:repeater-slug}'); | |
if($rows) | |
{ ?> | |
<?php foreach(\$rows as \$row) | |
{ ?> |
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
<snippet> | |
<content><![CDATA[ | |
/* <?php */ | |
global \$switched; | |
switch_to_blog(${1:1}); //input blog to switch to | |
// Get latest Post | |
\$latest_posts = get_posts('category=${2:-3}&numberposts=${3:5}&orderby=${4:post_name}&order=DSC'); | |
?> | |
<ul> |
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
<snippet> | |
<content><![CDATA[ | |
/* <?php */ | |
global \$switched; | |
switch_to_blog(${1:1}); //input blog to switch to | |
// Get latest Post | |
\$${2:PageVarName} = get_post(${3:PageID}, ARRAY_A); | |
\$title = \$${2:PageVarName}['post_title']; |
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
<snippet> | |
<content><![CDATA[ | |
//post 2 post connections for ${1:post_type_1}_to_${2:post_type_2} | |
function ${1:post_type_1}_to_${2:post_type_2}() { | |
p2p_register_connection_type( array( | |
'name' => '${1:post_type_1}-to-${2:post_type_2}', | |
'from' => '${1:post_type_1}', | |
'to' => '${2:post_type_2}' | |
) ); | |
} |
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
<snippet> | |
<content><![CDATA[ | |
// let's create the function for the custom type | |
function ng_cpt_${1:function_name}() { | |
// creating (registering) the custom type | |
register_post_type( 'cpt_${2:custom_type_plural}', /* (http://codex.wordpress.org/Function_Reference/register_post_type) */ | |
// let's now add all the options for this post type | |
array('labels' => array( | |
'name' => __('${3:custom_type_plural_capital}', 'bonestheme'), /* This is the Title of the Group */ |
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
<snippet> | |
<content><![CDATA[ | |
define('DISALLOW_FILE_EDIT', true); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>WPDisallow</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.php</scope> --> | |
</snippet> |
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
<snippet> | |
<content><![CDATA[ | |
// Declare sidebar widget zone | |
if (function_exists('register_sidebar')) { | |
register_sidebar(array( | |
'name' => '${1}', | |
'id' => '${2}', | |
'description' => '${3}', | |
'before_widget' => '<div id="%1$s" class="widget %2$s">', |
NewerOlder