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
<ifModule mod_headers.c> | |
Header set Connection keep-alive | |
</ifModule> | |
<IfModule mod_mime.c> | |
AddType text/css .css | |
AddType text/x-component .htc | |
AddType application/x-javascript .js | |
AddType application/javascript .js2 | |
AddType text/javascript .js3 | |
AddType text/x-js .js4 |
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
# Apache Server Config | MIT License | |
# https://gist.github.com/bhubbard/6082577 | |
# Modified from https://github.com/h5bp/server-configs-apaches | |
# ############################################################################## | |
# # Default WordPress # | |
# ############################################################################## | |
# http://randomtype.ca/blog/the-wordpress-htaccess-file-explained/ | |
# BEGIN WordPress |
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 | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/engine/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |
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
UPDATE your_table_name SET meta_key = REPLACE( meta_key, 'your_old_meta_key', 'your_new_meta_key' ) |
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 | |
/* | |
* example usage: $results = reset_role_WPSE_82378( 'subscriber' ); | |
* per add_role() (WordPress Codex), $results "Returns a WP_Role object | |
* on success, null if that role already exists." | |
* | |
* possible $role values: | |
* 'administrator' | |
* 'editor' | |
* 'author' |
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
add_action('add_meta_boxes', 'alispx_meta_boxes'); | |
function alispx_meta_boxes() { | |
add_meta_box( | |
'alispx-meta-box', | |
__( 'Phone Model', THEMO_TEXT_DOMAIN ), | |
'alispx_meta_box_callback', | |
'page' | |
); | |
} |
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 | |
/** | |
* Escape all translations with | |
*/ | |
__( ‘Some String’, ‘text-domain’ ); _e( ‘Some string’, ‘text-domain’ );. | |
/** | |
* When there is no HTML use: | |
*/ | |
esc_html__( ‘Some String’, ‘text-domain’ ); esc_html_e( ‘Some String’, ‘text-domain’ ); | |
/** |
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
/** | |
* Convert existing meta keys to new meta keys. | |
* | |
* @since x.x.x | |
* | |
* @global object $wpdb The current database. | |
* | |
* @param string $existing_key The existing meta key. | |
* @param string $new_key The new meta key. | |
* @param bool $remove_existing Optional. Whether to remove the old meta entries after conversion. |
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 | |
/** | |
* Constructor | |
*/ | |
add_action( 'init', 'tax_image_init' ); | |
function tax_image_init() { | |
$tk_taxonomies = array( 'authors', 'publisher' ); | |
foreach ( $tk_taxonomies as $tk_taxonomy ) { |
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(document).ready(function($) { | |
$('ul').find('li').each(function () { | |
if ($.trim($(this).text()) == "") { | |
$(this).remove(); | |
} | |
}) | |
}); |
NewerOlder