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
// Example of a migration script for renaming an existing "page" content type to "legacyPage" | |
// to make room for Contentful Compose "page" content type | |
// The following example is written in TypeScript | |
import { MigrationFunction } from "contentful-migration"; | |
import murmurhash from "murmurhash"; | |
const migrate: MigrationFunction = (migration) => { | |
// Create a duplicate of the clashing page content type | |
const pageCopy = migration | |
.createContentType("legacyPage") |
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 ActivityBasedTimer = () => { | |
let globalTimerId = 0; | |
const timers = new Map(); | |
const maybeExecuteTimerCallback = ({ timerId, forced = false }) => { | |
const timer = timers.get(timerId); | |
if (timer === undefined) { | |
return; | |
} |
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
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
#customize-theme-controls .customize-pane-child.current-section-parent { | |
-webkit-transform: translateX(-100%); | |
-ms-transform: translateX(-100%); | |
transform: translateX(-100%); | |
} |
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
/** | |
* Retrieve all instances of the specified shortcode | |
* | |
* @since Never | |
* | |
* @global array $shortcode_tags | |
* @param string $tag | |
* @return boolean/array | |
*/ | |
function oe_filter_shortcodes( $content, $tag, $result = array() ) { |