Context | Possibe values |
---|---|
default GMT offset or timezone string | Must be either a valid offset (-12 to 14) or a valid timezone string (America/New_York) |
start of week | 0 = Sunday, 1 = Monday (0 or 1) |
Events widget offset prefix | Used as part of a string like GMT+5 in the Events Widget. (?) |
draft_length | Maximum number of words used in a preview of a draft on the dashboard. (number) |
Comment number declension: on or off | If comment number in your language requires declension, translate this to ‘on’. (on or off) |
decline months names: on or off | If months in your language require a genitive case, translate this to ‘on’. (on or off) |
Word count type. Do not translate! | If your word count is based on single characters (e.g. East Asian characters), enter ‘characters_excluding_spaces’ or ‘characters_including_spaces’. Otherwise, enter ‘words’. |
Google Font Name and Variants | Use this to specify the proper Google Font name and variants to load that is supporte |
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
name: Version checks | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
# Compares the header information in the readme.txt and the main plugin file |
If you provide an image URL that's invalid or that's not available to the server, it can take a while for WP All Import to fail when attempting to download it. To get around this, you can pass your images to a function (see https://www.wpallimport.com/documentation/developers/custom-code/inline-php/) like this:
[my_output_imgs(array({img1[1]},{img2[1]},{img3[1]}))]
Then, use PHP to test them before outputting them in the import template:
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 my_search_media_library( $image ) { | |
global $wpdb; | |
$all_images = array(); | |
$query = "SELECT * FROM " . $wpdb->posts . " WHERE guid LIKE '%" . $image . "%'"; | |
$results = $wpdb->get_results( $query ); | |
if ( $results ) { | |
foreach ( $results as $result ) { |
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
remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' ); |
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
/* | |
Author: Akshay Nagpal (github.com/akshaynagpal) | |
License: MIT | |
*/ | |
$(document).ready(function(){ | |
// clicking button with class "category-button" | |
$(".category-button").click(function(){ | |
// get the data-filter value of the button | |
var filterValue = $(this).attr('data-filter'); |
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 | |
/** | |
* Update Post Title from an ACF field value on post save. | |
* | |
* Triggers on save, edit or update of published posts. | |
* Works in "Quick Edit", but not bulk edit. | |
*/ | |
function sync_acf_post_title($post_id, $post, $update) { | |
$acf_title = get_field('my_acf_field_name', $post_id); // NOTE: enter the name of the ACF field here |
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 // ONLY COPY THIS LINE IF NEEDED! | |
/** | |
* Adds the ability to sort products in the shop based on the SKU | |
* Can be combined with tips here to display the SKU on the shop page: https://www.skyverge.com/blog/add-information-to-woocommerce-shop-page/ | |
* | |
* @param array $args the sorting args | |
* @return array updated args | |
*/ | |
function sv_add_sku_sorting( $args ) { |
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
$.ajaxQueue = []; | |
var que = $.ajaxQueue; | |
$.ajaxSetup({ | |
beforeSend: function(){ | |
if (this.queue) { | |
que.push(this); | |
} | |
else { | |
return true; |
NewerOlder