I hereby claim:
- I am lgedeon on github.
- I am lgedeon (https://keybase.io/lgedeon) on keybase.
- I have a public key ASDrlnygwHYI2ysI1PDA8fRP6b2Izh9-gDZmrKpRyPVNoAo
To claim this, I am signing this object:
$(document).on('submit', '#post', function() { | |
const coreWordCounter = new window.wp.utils.WordCounter(); | |
const $mtSeoTitle = $( '#mt_seo_title' ); | |
const mtWordCount = coreWordCounter.count( $mtSeoTitle.val() ); | |
if ( 18 < mtWordCount ) { | |
alert( 'SEO Error: The title in your SEO Pack cannot exceed 18 words when included in Google News. Please try again.' ); | |
$( this ).find( 'input[type="submit"]' ).removeClass( 'disabled' ) | |
.end().find( '.spinner' ).hide(); | |
return false; | |
} |
I hereby claim:
To claim this, I am signing this object:
<?php | |
$taxonomies = get_taxonomies( [], 'objects' ); | |
$rewrites = wp_list_pluck( $taxonomies, 'rewrite' ); | |
$slugs = array_filter( wp_list_pluck( $rewrites, 'slug' ) ); | |
$archive_pattern = sprintf( '~/[%s]/~', implode( '|', $slugs ) ); |
<?php | |
/** | |
* Save history of content changes to post revision. | |
* | |
* @param integer $post_id Post ID. | |
* @param string $content Content. | |
* | |
* @return bool | |
*/ | |
function save_as_revision( $post_id, $content ) { |
<?php | |
/** | |
* Determines whether WP CLI is running. | |
* | |
* @return bool True if CLI, false otherwise. | |
*/ | |
public function is_cli() { | |
return ( defined( 'WP_CLI' ) && true === WP_CLI ); | |
} |
<?php | |
$keys = array_reduce( $array, function( $carry, $inner_array ) { | |
if ( is_array( $inner_array ) ) { | |
return array_merge( $carry, array_keys( $inner_array ) ); | |
} | |
return $carry; | |
}, [] ); |
<?php | |
/** | |
* Content Cleanup Filter Commands. | |
*/ | |
class IOneContentClean extends WPCOM_VIP_CLI_Command { | |
/** | |
* Run selected the_content filters and save back to post content. | |
* | |
* ## OPTIONS |
<?php | |
/** | |
* Media Library Report class | |
* | |
* Adds a Media Library Report option to WP Admin / Tools / Export. | |
*/ | |
class Media_Library_Report { | |
/** | |
* Set up all the hooks. |
Components: | |
# Change watcher - Hooks into post, meta, menu, option, taxonomy, etc. save events and records the type of content, the id and a timestamp of the most recent change. If the same content is changed again, just update the timestamp. | |
# Change feed generator - Expose feed of content updates. Include content ID numbers. | |
# Content feed generator - Expose paginated feeds of all content starting with the oldest content and an end-point listing all content feeds with the number of items in each, so that a site can choose to only consume the last x number of items or can pick up where it left off. | |
# Site watcher - Consume feed.Record timestamp of last update check. Record origin site's url, content type, content id and the id of where the content was assigned on the local site. Also track highest page number processed so it can start back where it left off. | |
# Content consumer - Add new content as needed. | |
# Change consumer - Update individual content items. | |
# UI - allow selection of content to import. Defaul |
<?php | |
class Singlton { | |
// Singlton instance. | |
static $instance = null; | |
// Do not create multiples. | |
private function __construct() { | |
} |