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
/* | |
https://github.com/nk-o/lazy-blocks/issues/22 | |
*/ | |
if ( function_exists( 'lazyblocks' ) ) : | |
/** | |
* Test Render Callback | |
* |
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
/** | |
* Add line item meta to the Order CSV Export in Default format | |
* Example: add Admission reference ID to the item meta data | |
*/ | |
/** | |
* Add weight to line item data | |
* | |
* @param array $line_item the original line item data | |
* @param array $item the item's order data | |
* @param object $product the \WC_Product object for the line |
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
add_action( 'admin_bar_menu', 'qtranslatex_fix_sitename', 999 ); | |
function qtranslatex_fix_sitename( $wp_admin_bar ) { | |
global $wp_admin_bar; | |
$updates_node = $wp_admin_bar->get_node( 'site-name' ); | |
$updates_node->title = get_bloginfo('name'); | |
$wp_admin_bar->add_node($updates_node); | |
} |
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 | |
echo '<img class="lazyload" | |
src="'.m_placehoder($image,"medium").'" | |
data-sizes="auto" | |
data-srcset="'.$image["sizes"]["huge"].' 1920w, | |
'.$image["sizes"]["large"].' 1024w, | |
'.$image["sizes"]["medium"].' 768w, | |
'.$image["sizes"]["small"].' 480w" | |
alt="'.get_bloginfo('name').' - '.$image["title"].'" |
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
{"rassegnastampa":{"name":"rassegnastampa","label":"Rassegne stampa","singular_label":"Rassegna stampa","description":"","public":"true","show_ui":"true","has_archive":"true","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":[],"taxonomies":["rassegna-cat"],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit":"","edit_item":"","new_item":"","view":"","view_item":"","search_items":"","not_found":"","not_found_in_trash":"","parent":""},"custom_supports":""},"area-press":{"name":"area-press","label":"Press","singular_label":"Press","description":"","public":"true","show_ui":"true","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","qu |
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 | |
/* | |
Description: qTranslate Support for Google XML Sitemaps Generator for WordPress | |
Copyright(c): 2011, DSmidge, http://blog.slo-host.com/ | |
License: GNU GPL, http://www.gnu.org/licenses/gpl-3.0.txt | |
This code is based on changes between plugin "Google XML Sitemaps Generator | |
with qTranslate Support for WordPress, v3.1.6.3" by NeoEGM and "Google XML | |
Sitemaps Generator for WordPress, v3.1.6" by Arne Brachhold. |
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} !www.newdomain.com$ [NC] | |
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301] | |
</IfModule> | |
# END WordPress |
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 | |
$photo_name = get_field("cover"); | |
if ($photo_name != "") { | |
$ff = '/Users/mosne/Sites/Dropbox/mosne.local/wp-content/files_mf/' . $photo_name; | |
$handle = fopen($ff, "r"); | |
$ffcontents = fread($handle, filesize($ff)); | |
$attachment = wp_upload_bits($photo_name, null, $ffcontents); |