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 | |
function custom_course_completed_redirect($link, $course_id) { | |
$link = get_post_field( 'post_name', $course_id ); | |
//You can change the link here | |
return '/congrats/' . $link; | |
} | |
add_filter("learndash_course_completion_url", custom_course_completed_redirect, 5, 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
sudo apachectl -k stop | |
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist |
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
// Import __ from i18n internationalization library | |
const { __ } = wp.i18n; | |
// Import registerBlockType() from block building libary | |
const { registerBlockType } = wp.blocks; | |
// Import the element creator function (React abstraction layer) | |
const el = wp.element.createElement; | |
/** |
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
// Import __ from i18n internationalization library | |
const { __ } = wp.i18n; | |
// Import registerBlockType() from block building libary | |
const { registerBlockType } = wp.blocks; | |
// Import the element creator function (React abstraction layer) | |
const el = wp.element.createElement; | |
/** | |
* Register Block using default icon options. |
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
/plugin-root | |
/blocks | |
/block-name | |
editor.css | |
index.js | |
index.php | |
style.css | |
/another-block-name | |
editor.css | |
index.js |
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
// Require a block | |
require_once( get_template_directory() . '/blocks/block-name/index.php'); | |
// Require another block | |
require_once( get_template_directory() . '/blocks/another-block-name/index.php'); |
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
/theme-root | |
/blocks | |
/block-name | |
editor.css // Option for editor only styles | |
index.js // Main block JS file | |
index.php // Enqueues the block JS and CSS | |
style.css // Frontend and editor styles | |
/another-block-name | |
editor.css | |
index.js |
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
/theme-root | |
/blocks | |
/block-name | |
editor.css // Option for editor only styles | |
index.js // Main block JS file | |
index.php // Enqueues the block JS and CSS | |
style.css // Frontend and editor styles | |
/another-block-name | |
editor.css | |
index.js |
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
const path = require( 'path' ); | |
// const BrowserSyncPlugin = require( 'browser-sync-webpack-plugin' ); | |
const webpack = require( 'webpack' ); | |
const ExtractTextPlugin = require( 'extract-text-webpack-plugin' ); | |
// Set different CSS extraction for editor only and common block styles | |
const blocksCSSPlugin = new ExtractTextPlugin( { | |
filename: '../css/blocks.style.css', | |
} ); |
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
// Get registerBlockType() from wp.blocks in the global scope | |
const { registerBlockType } = window.wp.blocks; |