This file contains hidden or 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
| /* Wordpress Tables */ | |
| DELETE FROM wp_termmeta WHERE meta_id=0; | |
| DELETE FROM wp_terms WHERE term_id=0; | |
| DELETE FROM wp_term_taxonomy WHERE term_taxonomy_id=0; | |
| DELETE FROM wp_commentmeta WHERE meta_id=0; | |
| DELETE FROM wp_comments WHERE comment_ID=0; | |
| DELETE FROM wp_links WHERE link_id=0; | |
| DELETE FROM wp_options WHERE option_id=0; | |
| DELETE FROM wp_postmeta WHERE meta_id=0; | |
| DELETE FROM wp_users WHERE ID=0; |
This file contains hidden or 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
| // asyncData.js | |
| export default ({ store, router }) => async (to, from, next) => { | |
| const matched = router.getMatchedComponents(to); | |
| const prevMatched = router.getMatchedComponents(from); | |
| let diffed = false; | |
| const activated = matched.filter((c, i) => { | |
| const isActivated = diffed || (diffed = (prevMatched[i] !== c)); | |
| return isActivated; | |
| }); |
This file contains hidden or 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
| # | |
| # Verify captcha | |
| $post_data = http_build_query( | |
| array( | |
| 'secret' => CAPTCHA_SECRET, | |
| 'response' => $_POST['g-recaptcha-response'], | |
| 'remoteip' => $_SERVER['REMOTE_ADDR'] | |
| ) | |
| ); | |
| $opts = array('http' => |
This file contains hidden or 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
| /** | |
| * AJAX load-more button | |
| */ | |
| // Hooks for AJAX | |
| function ajax_frontend() { // Add script ot theme | |
| wp_enqueue_script( 'ajax-pagination', get_template_directory_uri().'/assets/js/jquery-pagination.js', array('jquery'), '1.0'); | |
| } | |
| // Set variables on front-end | |
| function js_variables(){ |