Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
<?php | |
add_action( 'gform_after_submission_5', 'tgm_io_remove_form_entry' ); | |
/** | |
* Prevents Gravity Form entries from being stored in the database | |
* for a specific form. In this case, the form ID is 5. Change 5 in | |
* the hook to target your specific form ID. | |
* | |
* @global object $wpdb The WP database object. | |
* @param array $entry Array of entry data. | |
*/ |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
export function request(options = {}){ | |
// Usage: | |
// request({ | |
// url: "example.com", | |
// data: document.querySelector("form"), //FormData-object or form element | |
// method: "POST", | |
// headers: {key: "value"}, | |
// success: function(response, status){}, | |
// error: function(error, status){}, |
Linkki alkuperäiseen artikkeliin: http://www.innowise.fi/fi/innowise-cms-vs-wordpress/
WordPress tukee out-of-the-box useita erilaisia käyttäjäryhmiä jotka on jaettu eri rooleihin. Pääkäyttäjän rooli on tarkoitettu sivuston tekniselle ylläpitäjälle, kun taas roolien Päätoimittaja, Kirjoittaja ja Avustaja ylläpitonäkymät on karsittu vähemmän teknisille ylläpitäjille sopiviksi. WordPressin rooleilla voi myös rajoittaa eri ryhmien käyttöoikeuksia esimerkiksi antamalla Avustaja-roolin vain muokata sivuja, muttei julkaista niitä ilman Päätoimittajan tai Pääkäyttäjän lupaa.
<?php | |
$municipalities_by_region = array( | |
'Ahvenanmaa' => array( | |
35 => 'Brändö', | |
43 => 'Eckerö', | |
60 => 'Finström', | |
62 => 'Föglö', | |
65 => 'Geta', |
/** | |
* Add support for correct UTF8 orderby for post_title (äöå) | |
* | |
* @param string $orderby ordering clause for query | |
* | |
* @return string ordering clause for query | |
*/ | |
add_filter('posts_orderby', function($orderby) use ($wpdb) { | |
if(strstr($orderby, 'post_title')) { |
<?php | |
/* | |
Plugin Name: WP Scoped MU Plugin Loader | |
Plugin URI: https://gist.github.com/felixarntz/9b3bed66099641a45ce437b067fea547 | |
Description: Loads scoped MU plugins for specific sites or networks for an improved organization of those more specific tweaks. | |
Version: 1.0.0 | |
Author: Felix Arntz | |
Author URI: https://leaves-and-love.net | |
License: GNU General Public License v2 | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
var recursivelyRecoverInvalidBlockList = blocks => { | |
const _blocks = [ ...blocks ] | |
let recoveryCalled = false | |
const recursivelyRecoverBlocks = willRecoverBlocks => { | |
willRecoverBlocks.forEach( _block => { | |
if ( isInvalid( _block ) ) { | |
recoveryCalled = true | |
const newBlock = recoverBlock( _block ) | |
for ( const key in newBlock ) { | |
_block[ key ] = newBlock[ key ] |