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 | |
/** | |
* Method 1 | |
* Can be used for: Any storage type | |
* | |
* page-slug - replace this with your Option Page slug | |
* option-name - replace this with your option Name/ID | |
*/ | |
$value = jet_engine()->listings->data->get_option( 'page-slug::option-name' ); |
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 | |
//use para imprimir um campo JetEngine Textarea com somente html | |
function pagina_html_shortcode() { | |
//campo meta | |
$meta_key = '_pagina_html'; | |
//recupera o campo | |
$value = get_post_meta(get_the_ID(), $meta_key, true); | |
return $value; |
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 | |
//filter to add a callback to the list | |
add_filter( 'jet-engine/listings/allowed-callbacks', 'add_custom_dynamic_field_callbacks' ); | |
//filter to specify which arguments will the callback have | |
add_filter( 'jet-engine/listing/dynamic-field/callback-args', 'add_custom_dynamic_field_callbacks_args', 0, 3 ); | |
//filter to add controls | |
//controls arguments are set as in Elementor controls |
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
/*Desenvolvido por Dante Testa + ASK Jarvis*/ | |
/*Coloque esse código no functions.php do seu tema */ | |
/*https://www.youtube.com/watch?v=NKxyNbJbee4 */ | |
function views_shortcode( $atts ) { | |
$a = shortcode_atts( array( | |
'print' => '0', | |
'count' => '0', | |
), $atts ); |
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 | |
/* | |
* Fatal error: Unparenthesized a ? b : c ? d : e is not supported. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /var/www/wp- * content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php on line 646 | |
* | |
*Como resolver | |
*O erro indica que a versão do WPBakery usada não é compatível com a versão do PHP atualmente ativa. Você precisaria baixar a versão | |
*mais recente do WPBakery para corrigir isso. Como WPBakery é um produto comercial, entre em contato com o suporte para mais dúvidas: | |
*https://wpbakery.com – perguntas sobre produtos comerciais não são permitidas aqui no fórum. | |
* |
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 8 create_function replacement. | |
* Use apenas como um paliativo para o sistema antigo voltar | |
* a funcionar e atualize em seguida. | |
* coloque este trecho dentro do arquivo functions.php do tema ativo. | |
*/ | |
if ( ! function_exists( "create_function" ) ) { | |
function create_function( $arg, $body ) { | |
static $cache = array(); | |
static $max_cache_size = 64; |
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 | |
// Conexão com o banco de dados MS-Access | |
$db = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=Caminho/Para/Seu/Arquivo.mdb"); | |
// Consulta para obter os usuários do MS-Access | |
$query = "SELECT * FROM usuarios"; | |
$result = $db->query($query); | |
// Loop através dos resultados | |
foreach ($result as $row) { |
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
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.min.js"></script> | |
<script type="text/javascript" > | |
jQuery(document).ready(function( $ ) { | |
function limpa_formulario_cep() { | |
$("#form-field-endereco").val(""); | |
$("#form-field-cidade").val(""); | |
$("#form-field-estado").val(""); | |
} |
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 | |
// Redirect Registration Page | |
function my_registration_page_redirect() | |
{ | |
global $pagenow; | |
if ( ( strtolower($pagenow) == 'wp-login.php') && ( strtolower( $_GET['action']) == 'register' ) ) { | |
wp_redirect( home_url('/registration-url')); | |
} | |
} |
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
<script> | |
(function(document){ | |
function populateForms(){ | |
if (document.readyState == 'interactive') { | |
if (document.forms.length !== 0 && location.search) { | |
var query = location.search.substr(1); | |
query.split('&').forEach(function (part) { | |
if (part.indexOf('=') !== -1) { | |
var item = part.split('='); | |
var key = item[0]; |
NewerOlder