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
function codeart_block_dashboard_from_non_super_admins() | |
{ | |
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
if( !is_super_admin() ) | |
if( strpos($actual_link, 'wp-admin') !== false || strpos($actual_link, 'wp-login.php') !== false ) | |
if( strpos($actual_link, 'admin-ajax.php') === false && strpos($actual_link, 'wp-login.php?action=logout') === false ) | |
wp_redirect( get_bloginfo('home') . '/log-in/' ); | |
} |
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
if (!class_exists('Tax_CTP_Filter')) | |
{ | |
/** | |
* Tax CTP Filter Class | |
* Simple class to add custom taxonomy dropdown to a custom post type admin edit list | |
* @author Ohad Raz <admin@bainternet.info> | |
* @version 0.1 | |
*/ | |
class Tax_CTP_Filter | |
{ |
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 | |
global $wpdb; | |
$first_char = esc_attr($_GET[$search_key]); | |
$postids = $wpdb->get_col($wpdb->prepare(" | |
SELECT ID | |
FROM $wpdb->posts | |
WHERE SUBSTR($wpdb->posts.post_title,1,1) = %s | |
AND $wpdb->posts.post_type = 'product' |
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
/** | |
* Method to move style.css after all styles only in wp_head (high priority) | |
**/ | |
add_action( 'wp', 'genesisstyletrump_load_stylesheet' ); | |
function genesisstyletrump_load_stylesheet() | |
{ | |
remove_action( 'genesis_meta', 'genesis_load_stylesheet' ); | |
add_action( 'wp_enqueue_scripts', 'genesis_enqueue_main_stylesheet', 999 ); | |
} |
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
/** | |
* jQuery Lib - Plugin to center a div on the screen. | |
* | |
* @author: Damjan Krstevski | |
* @team: codeart | |
* @contact: damjan@codeart.mk | |
* @tags: center, responsive, popup, fixed, optin, lightbox | |
-> Usage |