This file contains hidden or 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 | |
register_post_type('video', array( | |
'label' => 'Videos'. | |
'public' => true, | |
'menu_icon' => 'dashicons-video-alt3', | |
)); | |
register_taxonomy( 'Category', 'video', array('label' => 'Categories', 'hierarchical' => true)); | |
add_shortcode('flex-videos', 'flex_videos_shortcode'); |
This file contains hidden or 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 | |
$image_element = array( | |
// Adds first tab + tab content | |
array( | |
'key' => 'image_tab_1', | |
'label' => __('Image', 'hortus-field-groups'), | |
'type' => 'tab', | |
), | |
// The actual image |
This file contains hidden or 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
if ( function_exists( 'acf_add_local_field_group' ) ): | |
acf_add_local_field_group( array( | |
'key' => 'key_name', | |
'title' => 'Title', | |
'fields' => array( | |
array( | |
'label' => 'Group', | |
'key' => 'key', | |
'name' => 'name', | |
'type' => 'group', |
This file contains hidden or 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
div.quantity { | |
position: relative; | |
margin: 0 0 1rem; | |
} | |
div.quantity div.arrows { | |
padding: 1px 0; | |
position: absolute; | |
display: flex; | |
flex-direction: column; | |
right: 0; |
This file contains hidden or 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
$args = \Inpsyde\MultilingualPress\Framework\Api\TranslationSearchArgs::forContext(new \Inpsyde\MultilingualPress\Framework\WordpressContext()) | |
->forSiteId(get_current_blog_id()) | |
->includeBase(); | |
$translations = \Inpsyde\MultilingualPress\resolve( | |
\Inpsyde\MultilingualPress\Framework\Api\Translations::class | |
)->searchTranslations($args); | |
var_dump($translations); |
This file contains hidden or 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 | |
/* | |
* Plugin Name: WP CLI Command Example | |
* Author: Marinus Klasen | |
* Description: WP CLI Command Example | |
*/ | |
/* | |
Command: wp cli mk example | |
*/ |
This file contains hidden or 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 | |
add_filter( 'wpseo_breadcrumb_links', function($items) { | |
// Remove second array item | |
if( is_product() ) { | |
unset( $items[1] ); | |
} | |
// Sort array | |
ksort($items); |
This file contains hidden or 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
wp user create wpadmin [email protected] --user_pass=password | |
wp user set-role wpadmin administrator | |
# Multisite: | |
wp super-admin add wpadmin | |
## For each multisite url | |
wp user set-role wpadmin administrator --url=domain.test/subsite |
This file contains hidden or 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
- woo-product-feed-pro | |
- sympose |
This file contains hidden or 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 | |
$acf_field = array( | |
'key' => 'woocommerce_emails', | |
'label' => 'Woocommerce e-mails', | |
'name' => 'woocommerce_emails', | |
'type' => 'repeater', | |
'layout' => 'row', | |
'sub_fields' => array( | |
array( | |
'key' => 'id', |