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_action( 'cmb2_admin_init', 'yourprefix_register_repeatable_group_field_metabox' ); | |
/** | |
* Hook in and add a metabox to demonstrate repeatable grouped fields | |
*/ | |
function yourprefix_register_repeatable_group_field_metabox() { | |
/** | |
* Repeatable Field Groups |
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
/** | |
* Sets install skin strings for each individual plugin. | |
* | |
* Checks to see if the automatic activation flag is set and uses the | |
* the proper strings accordingly. | |
* | |
* @since 2.2.0 | |
*/ | |
public function add_strings() { | |
if ( 'update' === $this->options['install_type'] ) { |
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( 'woocommerce_widget_cart_is_hidden', 'fuskowp_always_show_cart', 40, 0 ); | |
function fuskowp_always_show_cart() { | |
return false; | |
} |
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:cover {"url":"http://tijuana.modeltheme.com/wp-content/uploads/2018/11/roman_coliseum_evening-1.jpg","align":"wide","id":78} --> | |
<div class="wp-block-cover has-background-dim alignwide" style="background-image:url(http://tijuana.modeltheme.com/wp-content/uploads/2018/11/roman_coliseum_evening-1.jpg)"><p class="wp-block-cover-text">Of Mountains & Printing Presses</p></div> | |
<!-- /wp:cover --> | |
<!-- wp:paragraph --> | |
<p>The goal of this new editor is to make adding rich content to WordPress simple and enjoyable. This whole post is composed of <em>pieces of content</em>???somewhat similar to LEGO bricks???that you can move around and interact with. Move your cursor around and you???ll notice the different blocks light up with outlines and arrows. Press the arrows to reposition blocks quickly, without fearing about losing things in the process of copying and pasting.</p> | |
<!-- /wp:paragraph --> | |
<!-- wp:paragraph --> | |
<p>What you are reading now is a <strong>text block</strong> the most basic block of all |
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:cover {"url":"https://cldup.com/Fz-ASbo2s3.jpg","align":"wide"} --> | |
<div class="wp-block-cover has-background-dim alignwide" style="background-image:url(https://cldup.com/Fz-ASbo2s3.jpg)"><p class="wp-block-cover-text">Of Mountains & Printing Presses</p></div> | |
<!-- /wp:cover --> | |
<!-- wp:paragraph --> | |
<p>The goal of this new editor is to make adding rich content to WordPress simple and enjoyable. This whole post is composed of <em>pieces of content</em>—somewhat similar to LEGO bricks—that you can move around and interact with. Move your cursor around and you’ll notice the different blocks light up with outlines and arrows. Press the arrows to reposition blocks quickly, without fearing about losing things in the process of copying and pasting.</p> | |
<!-- /wp:paragraph --> | |
<!-- wp:paragraph --> | |
<p>What you are reading now is a <strong>text block</strong> the most basic block of all. The text block has its own controls to be moved freely around the post...</p> |
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: Add Extra Comment Fields | |
Plugin URI: http://pmg.co/category/wordpress | |
Description: An example of how to add, save and edit extra comment fields in WordPress | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
License: MIT | |
*/ |
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 | |
/* 1. Gutenberg editor styling for frontend */ | |
if (function_exists('the_gutenberg_project')) { | |
wp_enqueue_style( "rodberg-gutenberg-frontend", get_template_directory_uri().'/css/gutenberg-frontend.css' ); | |
} | |
// 2. Add backend styles for Gutenberg. | |
add_action( 'enqueue_block_editor_assets', 'rodberg_add_gutenberg_assets' ); |
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 | |
$cmb->add_field( array( | |
'name' => __( 'Postive numbers', 'theme-domain' ), | |
'desc' => __( 'Numbers only', 'msft-newscenter' ), | |
'id' => $prefix . 'number', | |
'type' => 'text', | |
'attributes' => array( | |
'type' => 'number', | |
'pattern' => '\d*', |
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
//Backend visual composer add-on code | |
vc_map(array( | |
'name' => 'Accordions', | |
'base' => 'maxima_accordion', | |
'category' => 'Maxima', | |
'params' => array( | |
array( | |
'type' => 'textfield', | |
'name' => __('Title', 'rrf-maxima'), |
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 | |
/* Create a WordPress While Loop | |
-------------------------------------------------- */ | |
$wordpress_loop_argument = array( | |
'post_type' => 'custom_post_type', | |
'posts_per_page' => -1, | |
'orderby' => 'date', | |
'order' => 'ASC' | |
); |