<form method="post" id="job_preview" action="<?php echo esc_url( $form->get_action() ); ?>">
do_action( 'preview_job_form_start' );
function get_posts_years_array() {
global $wpdb;
$result = array();
$years = $wpdb->get_results(
$wpdb->prepare(
"SELECT YEAR(post_date) FROM {$wpdb->posts} WHERE post_status = 'publish' GROUP BY YEAR(post_date) DESC"
),
ARRAY_N
);
if ( is_array( $years ) && count( $years ) > 0 ) {
foreach ( $years as $year ) {
$result[] = $year[0];
}
}
return $result;
}
<body class="PageType">
И затем в script..
$(function(){
if($('body').is('.PageType')){
//add dynamic script tag using createElement()
OR
//call specific functions
}
});
<script>
If (document.body.clientWidth>768){
document.write('<script src=...>')
}
</script>
UPDATE `table_name`
SET `site_url`= REPLACE(`site_url`, 'old_domain', 'new_domain');
<textarea>
<div class="form-group">
<label for="exampleFormControlTextarea1">Example textarea</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
</div>