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
var DfpOutOfPageAdGenerator = DfpOutOfPageAdGenerator || {}; | |
DfpOutOfPageAdGenerator.Prestitial = Class.extend({ | |
properties: { | |
isAdSkippedManually: false, | |
dfpCreativeMarkup: undefined, | |
dfpCreativeParameters: undefined | |
}, | |
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
@import '../libs/prefixer.less'; | |
@min-z-index: 10000001; | |
.no-scroll { | |
overflow: hidden; | |
} | |
#prestitial-ad-overlay { | |
position: fixed; |
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 | |
/** | |
* Display an error message at the top of the post edit screen explaining that ratings is required. | |
* | |
* Doing this prevents users from getting confused when their new posts aren't published, as we | |
* require a valid rating custom taxonomy. | |
* | |
* @param WP_Post The current post object. | |
*/ | |
function show_required_field_error_msg( $post ) { |
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
# Vagrant Triggers | |
# | |
# If the vagrant-triggers plugin is installed, we can run various scripts on Vagrant | |
# state changes like `vagrant up`, `vagrant halt`, `vagrant suspend`, and `vagrant destroy` | |
# | |
# These scripts are run on the host machine, so we use `vagrant ssh` to tunnel back | |
# into the VM and execute things. By default, each of these scripts calls db_backup | |
# to create backups of all current databases. This can be overridden with custom | |
# scripting. See the individual files in config/homebin/ for details. | |
if defined? VagrantPlugins::Triggers |
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
#!/bin/bash | |
# | |
# Sync the sql files in the sync folder | |
# | |
# The files in the {vvv-dir}/database/sync/ directory should be created by | |
# mysqldump or some other export process that generates a full set of SQL commands | |
# to create the necessary tables and data required by a database. | |
# | |
# For a sync to work properly, the SQL file should be named `db_name.sql` in which | |
# `db_name` matches the name of a database already created in {vvv-dir}/database/init-custom.sql |
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
#!/bin/bash | |
# | |
# Create individual SQL files for each database. These files | |
# are imported automatically during an initial provision if | |
# the databases exist per the import-sql.sh process. | |
mysql -e 'show databases' | \ | |
grep -v -F "information_schema" | \ | |
grep -v -F "performance_schema" | \ | |
grep -v -F "mysql" | \ | |
grep -v -F "test" | \ |
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 | |
// source: http://wordpress.stackexchange.com/questions/211703/need-a-simple-but-complete-example-of-adding-metabox-to-taxonomy | |
// code authored by jgraup - http://wordpress.stackexchange.com/users/84219/jgraup | |
// CREATE CUSTOM TAXONOMY | |
add_action( 'init', '___create_my_custom_tax' ); |
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 | |
class IBenic_WordPress_Metabox extends WordPressSettings { | |
protected $title = ''; | |
protected $slug = ''; | |
protected $post_types = array(); |
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
$wp_customize->add_setting( 'themeslug_dropdownpages_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_dropdown_pages', | |
) ); | |
$wp_customize->add_control( 'themeslug_dropdownpages_setting_id', array( | |
'type' => 'dropdown-pages', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Dropdown Pages' ), | |
'description' => __( 'This is a custom dropdown pages option.' ), |
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 | |
// enqueue these scripts and styles before admin_head | |
wp_enqueue_script( 'jquery-ui-dialog' ); // jquery and jquery-ui should be dependencies, didn't check though... | |
wp_enqueue_style( 'wp-jquery-ui-dialog' ); | |
?> | |
<!-- The modal / dialog box, hidden somewhere near the footer --> | |
<div id="my-dialog" class="hidden" style="max-width:800px"> | |
<h3>Dialog content</h3> | |
<p>This is some terribly exciting content inside this dialog. Don't you agree?</p> |