This file contains hidden or 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
let mix = require('laravel-mix'); | |
let child_process = require('child_process'); | |
mix.js('Resources/js/core-app.js', 'Assets/js') | |
.then(() => { | |
child_process.exec('php artisan module:publish', {cwd: '../../'}, function(error, stdout, stderr){ | |
if (error) throw error; | |
console.log(stdout, stderr); | |
}); |
This file contains hidden or 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 | |
/** Loads the WordPress Environment and Template */ | |
require ('./wp-blog-header.php'); | |
$import_data = array_map('str_getcsv', file('CategoriesImport.csv')); | |
$product_cats = get_terms( | |
array( | |
'taxonomy' => array('product_cat', 'industry_solution_category') |
This file contains hidden or 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
DELETE p FROM vsc_posts p | |
WHERE p.post_type = 'product'; | |
DELETE pm FROM vsc_postmeta pm | |
LEFT JOIN vsc_posts vsc ON vsc.ID = pm.post_id | |
WHERE vsc.ID IS NULL; | |
DELETE tr FROM vsc_term_relationships tr | |
INNER JOIN vsc_term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) | |
WHERE tt.taxonomy != 'link_category' AND tr.object_id NOT IN ( SELECT ID FROM vsc_posts ); |
This file contains hidden or 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
INSERT INTO vsc_usermeta (user_id, meta_key, meta_value) | |
(SELECT ID AS user_id, 'division' | |
AS meta_key, 'north' AS meta_value | |
FROM vsc_users WHERE ID NOT IN | |
(SELECT user_id FROM vsc_usermeta WHERE meta_key = 'division')) |
This file contains hidden or 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
INSERT INTO vsc_postmeta (post_id, meta_key, meta_value) | |
(SELECT ID AS post_id, 'division' | |
AS meta_key, 'north' AS meta_value | |
FROM vsc_posts WHERE ID NOT IN | |
(SELECT post_id FROM vsc_postmeta WHERE meta_key = 'division') | |
AND `post_type` = 'ivi_assignment_type'); |
This file contains hidden or 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 | |
include "wp-load.php"; | |
//Usage: | |
// replace the meta_query value with your template filename | |
// change the $newfile to reflect the directory you want to copy your files to | |
$posts = new WP_Query( | |
array( | |
'post_type' => 'page', |