Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@generatepress
generatepress / gist:7dcd2b4c8c0746106528
Created August 28, 2015 06:20
Hide Generate Sections settings (minus the editor)
add_action('admin_head','generate_hide_sections_settings');
function generate_hide_sections_settings()
{ ?>
<style>
.generate_sections_control .grid-container {
display: none;
}
</style>
<?php }
public function get_fonts( $amount = 5000 )
{
$selectDirectory = '';
$selectDirectory = plugin_dir_path( __FILE__ );
$fontFile = $selectDirectory . '/cache/google-web-fonts.txt';
//Total time the file will be cached in seconds, set to a week
$cachetime = 86400 * 7;
function generate_get_fonts( $amount = 1000 )
{
if ( get_transient('generate_get_fonts') )
return;
$selectDirectory = '';
$selectDirectory = plugin_dir_path( __FILE__ );
$fontFile = $selectDirectory . '/cache/google-web-fonts.txt';
public function render_content()
{
$fonts = ( get_transient('generate_get_fonts') ? get_transient('generate_get_fonts') : '' );
if(!empty($fonts))
{
?>
<label>
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
<select <?php $this->link(); ?>>
.main-title,
.site-description,
.main-navigation a,
.menu-toggle,
h1,
h2,
h3{
font-family: Arial, Helvetica, sans-serif;
}
.container {
background-image: url("http://www.zahnarzt-lorenz.de/dropshadow2.png") !important;
background-position: center top !important;
background-repeat: no-repeat !important;
}
.inside-navigation {
background-image: url("http://www.zahnarzt-lorenz.de/dropshadow2.png");
background-position: center top !important;
background-repeat: no-repeat;
require_once( '../../wp-load.php' );
$args = array(
'post_type' => 'edd_license',
'showposts' => -1,
's' => $_POST['email']
);
// The Query
$the_query = new WP_Query( $args );
add_action('admin_init', 'generate_activate_customer_email');
function generate_activate_customer_email() {
if( isset( $_POST['generate_customer_email_activate'] ) ) {
if( ! check_admin_referer( 'generate_customer_email_nonce', 'generate_customer_email_nonce' ) )
return; // get out if we didn't click the Activate button
$generate_customer_email = get_option( 'generate_customer_email' );
add_action('admin_init', 'generate_activate_customer_email');
function generate_activate_customer_email() {
if( isset( $_POST['generate_customer_email_activate'] ) ) {
if( ! check_admin_referer( 'generate_customer_email_nonce', 'generate_customer_email_nonce' ) )
return; // get out if we didn't click the Activate button
$generate_customer_email = get_option( 'generate_customer_email' );
<?php
require_once( '../../wp-load.php' );
if ( $_POST['generate_action'] == 'get_email' ) :
$args = array(
'post_type' => 'edd_license',
'showposts' => -1,
's' => $_POST['email']