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
const request = require('request'); | |
const fs = require('fs'); | |
const repo = 'miwaniec/socket-camera'; | |
const accessToken = ''; /* for private repo, use token - https://github.com/settings/tokens */ | |
var options = { | |
method: 'GET', | |
url: 'https://api.github.com/repos/' + repo + '/zipball/', | |
encoding: 'binary', |
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
### Flutter Generated | |
# Miscellaneous | |
*.class | |
*.lock | |
*.log | |
*.pyc | |
*.swp | |
.DS_Store | |
.atom/ |
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
//CREDITS https://wpcodebox.com/how-to-write-a-custom-oxygen-element-using-a-code-snippet/ | |
<?php | |
add_action('plugins_loaded', function() { | |
class EncodeEmail extends OxyEl { | |
function init() { | |
} | |
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 | |
add_action('plugins_loaded', function() { | |
class HeadingElement extends OxyEl { | |
function init() | |
{ | |
} |
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
//https://www.youtube.com/watch?v=mjLsbRgQ2k4 | |
add_action( 'wp_head', function () { ?> | |
<style> | |
:root { | |
/*Begin First Varible Code*/ | |
--primary: <?php | |
$primary_color = rwmb_meta( //Change the variable to your desired varible name | |
'primary_color_picker', //Color Picker ID | |
['object_type' => 'setting'], |
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
To start, open a code block or JS advanced tab. Then wrap your JS with the following: | |
(function($){ | |
// Your code goes here. You can use $! | |
})(jQuery); | |
What we have above is called an anonymous and self-executing function. | |
Adding the parentheses at the end calls the function immediately after declaration (hence, self-executing). We can then pass the jQuery object as a parameter, which we decide to represent as the common $ symbol within our code block. | |
//Getting the Component ID |
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
Properly migrate Oxygen sites using the All-in-One WP Migration plugin | |
All-in-One WP Migration plugin is one of the best free (depending on the file size) back-up and migration tools out there - period. I use it for every single project. Here are the steps to achieve a successful migration. | |
Step 1: Dowload and activate the All-in-One WP Migration plugin if you do not already have this on the WP install you wish to migrate. | |
Step 2: Export the site in question via: wp-admin dashboard > All-in-One WP Migration > Export > Export To > File and then click the green Download prompt. | |
Step 3: Dowload and activate the All-in-One WP Migration plugin if you do not already have this in the WP install you wish to migrate the site to. |
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
add "Code Block" oxygen element. | |
This Code block has to be placed BEFORE the "Easy Post" element. | |
___________________________________________________________________________________single post | |
/** | |
* Exclude Current Posts from the query | |
*/ | |
add_action( 'pre_get_posts', function ( $query ) { | |
// not an admin page and not the main query | |
if ( ! is_admin() && ! $query->is_main_query() ) { | |
$query->set( 'post__not_in', array( get_the_ID() ) ); |
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
xl = All Devices (> 1120px) | |
l = Page Container (1120px and below) | |
md = Tablet Landscape (Less than 992px) | |
s = Tablet (Less than 768px) | |
xs = Mobile (Less than 480px) | |
@media screen and (max-width:1120px) { | |
} |
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 | |
$getartist = new WP_Query( [ | |
'relationship' => [ | |
'id' => 'opera_artist_relationship', | |
'from' => get_the_ID(), | |
], | |
'nopaging' => true, | |
] ); | |
while ( $getartist->have_posts() ) : $getartist->the_post(); | |
?> |
NewerOlder