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
content: ""; | |
display: block; | |
position: absolute; | |
bottom: -9px; | |
left: 0; | |
width: 100%; | |
height: 9px; | |
background: -webkit-linear-gradient(transparent 0%, transparent 0%), | |
-webkit-linear-gradient(135deg, #f9f9f9 33.33%, transparent 33.33%) 0 0%, | |
transparent -webkit-linear-gradient(45deg, #f9f9f9 33.33%, transparent 33.33%) 0 0%; |
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 use this example: | |
1. Download this html file | |
2. Replace the form action url with your own from the MailChimp supplied embed code | |
3. Within the action url, replace "subscribe/post" with "subscribe/post-json" | |
4. Be sure the action url starts with http://. If it doesn't, the form will hang when testing the html as a local file in your browser. | |
5. Open this file in a browser on your local machine | |
*/ | |
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 | |
/* | |
Plugin Name: Test List Table Example | |
*/ | |
if( ! class_exists( 'WP_List_Table' ) ) { | |
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); | |
} | |
class My_Example_List_Table extends WP_List_Table { | |
var $example_data = array( | |
array( 'ID' => 1,'booktitle' => 'Quarter Share', 'author' => 'Nathan Lowell', |
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
UPDATE [Таблица] SET [Поле]=REPLACE([Поле],'Строка_1','Строка_2'); | |
//Or full changing | |
UPDATE `Darabase`.`wp_options` SET `option_value` = 'http://local.com' WHERE `wp_options`.`option_id` = 1; | |
UPDATE `DataBase`.`Table` SET `Table-column_1` = 'String_1' WHERE `Table`.`Table-column_2` = Value; | |
UPDATE wp_options | |
SET option_value = REPLACE(option_value, 'site.ca', 'local.site.ca') |
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
Information about currently select menu is located in wp_options table as serialized PHP array. | |
For example if we use TwentyEleven theme, | |
then we will have a record in wp_options table with option_name column equals to theme_mod_twentyeleven and | |
option_value column equals to ...;s:18:"nav_menu_locations";a:1:{s:7:"primary";i:103;}}. | |
Here you can see that menu with term_id equals to 103 is currently selected as "primary" menu. | |
The key principle here is that we always have separate options record for each WP theme. | |
Such options have the same name structure: theme_mods_{your-theme-name}. | |
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
Putting these lines into your powershell profile | |
(a file named profile.ps1 which sits in your Documents\WindowsPowerShell\ folder | |
(you may have to create that folder) will remove most of the unreadable colors: | |
Set-PSReadlineOption -TokenKind comment -ForegroundColor white | |
Set-PSReadlineOption -TokenKind none -ForegroundColor white | |
Set-PSReadlineOption -TokenKind command -ForegroundColor white | |
Set-PSReadlineOption -TokenKind parameter -ForegroundColor white | |
Set-PSReadlineOption -TokenKind variable -ForegroundColor white | |
Set-PSReadlineOption -TokenKind type -ForegroundColor white |
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
var globalID; | |
function repeatOften() { | |
$("<div />").appendTo("body"); | |
globalID = requestAnimationFrame(repeatOften); | |
} | |
$("#stop").on("click", function() { | |
cancelAnimationFrame(globalID); | |
}); |
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
/************************************************************************************************************ | |
_ _____ _ _ _ _ _ | |
| | / ____| (_) | | (_) | | (_) | |
| | __ ___ ____ _| (___ ___ _ __ _ _ __ | |_ __ _ _ __ _ _ __ ___ __ _| |_ _ ___ _ __ ___ | |
_ | |/ _` \ \ / / _` |\___ \ / __| '__| | '_ \| __| / _` | '_ \| | '_ ` _ \ / _` | __| |/ _ \| '_ \/ __| | |
| |__| | (_| |\ V / (_| |____) | (__| | | | |_) | |_ | (_| | | | | | | | | | | (_| | |_| | (_) | | | \__ \ | |
\____/ \__,_| \_/ \__,_|_____/ \___|_| |_| .__/ \__| \__,_|_| |_|_|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/ | |
| | | |
|_| | |
********************************** |
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( 'wp_enqueue_scripts', 'add_assets_to_enqueue', 20 ); | |
function add_assets_to_enqueue() { | |
if ( is_page_template('page-tempalate_name.php') ) { | |
global $wp_scripts; | |
global $wp_styles; |
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 | |
//reformate file form | |
function reArrayFiles(&$file_post) { | |
$file_ary = array(); | |
$file_count = count($file_post['name']); | |
$file_keys = array_keys($file_post); | |
for ($i=0; $i<$file_count; $i++) { | |
foreach ($file_keys as $key) { |