Incluir esse código no functions.php.
Nas action_hooks, no lugar de "category" é só incluir o slug da sua taxonomia :)
| # --------------------------------------------------------------------------- | |
| # Descrição: Este arquivo contém todas as minhas configurações e atalhos personalizados para o Bash | |
| # | |
| # Sessões: | |
| # 1. Configurações Básicas | |
| # 2. Definição de atalhos | |
| # 3. Gerenciamento de arquivos e pastas | |
| # 4. Pesquisa | |
| # 5. Rede | |
| # 6. Operações & Informações |
| Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
| (if you aren't using version 9.1.5, change line 6 with the correct version) | |
| 1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
| 2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
| 3. brew update | |
| 4. brew upgrade postgresql | |
| 5. initdb /usr/local/var/postgres -E utf8 | |
| 6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
| 7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |
| /** | |
| * Reset video on visible area | |
| */ | |
| jQuery(document).ready(function($) { | |
| $(window).scroll(function() { | |
| $('video').each(function(){ | |
| if ($(this).is(":in-viewport")) { | |
| $(this)[0].play(); | |
| } else { | |
| $(this)[0].currentTime = 0; |
| /** | |
| Extend user search in wp-admin | |
| include first_name, last_name and other fields in the search results | |
| **/ | |
| add_action('pre_user_query','extend_user_search'); | |
| function extend_user_search( $user_query ){ | |
| // make sure that this code will be applied only for user search | |
| if ( $user_query->query_vars['search'] ){ | |
| $search_query = trim( $user_query->query_vars['search'], '*' ); | |
| if ( $_REQUEST['s'] == $search_query ){ |
AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/atom_xml
| jQuery(window).on('load', function(){ | |
| $('#cred_user_form_21174_1').on('submit', function(event) { | |
| var data_telefone = $('[name="wpcf-telefone"]').val(); | |
| var data_celular = $('[name="wpcf-celular"]').val(); | |
| var data_cnpj = $('[name="wpcf-cnpj"]').val(); | |
| var data_ie = $('[name="wpcf-ie-rg"]').val(); | |
| var data_cep = $('[name="wpcf-cep"]').val(); |
| RewriteEngine On | |
| RewriteCond %{HTTPS} off | |
| # First rewrite to HTTPS: | |
| # Don't put www. here. If it is already there it will be included, if not | |
| # the subsequent rule will catch it. | |
| RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
| # Now, rewrite any request to the wrong domain to use www. | |
| # [NC] is a case-insensitive match | |
| RewriteCond %{HTTP_HOST} !^www\. [NC] | |
| RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |