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
| /**************************************************************** | |
| Project: MySavingWallet | |
| Resource: http://www.ibenic.com/wordpress-file-upload-with-ajax/ | |
| HTML FORM | |
| *****************************************************************/ | |
| <dt><?php esc_html_e( 'Support Doc', 'listify_child' ); ?></dt> | |
| <dd> | |
| <section> |
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
| function escaperoom_googlemap_api_key($url, $original_url, $_context) { | |
| $key = 'AIzaSyAWQTIcIfpsttvugW18F1y14p8gbFXmtXE'; // your map api key | |
| // If no key added no point in checking | |
| if ( ! $key ) { | |
| return $url; | |
| } | |
| if ( strstr( $url, "maps.google.com/maps/api/js" ) !== false || strstr( $url, "maps.googleapis.com/maps/api/js" ) !== false ) {// it's a Google maps url |
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
| var gallery = document.getElementsByClassName('pp_gallery'); | |
| var largeImages = gallery[0].getElementsByTagName('img'); | |
| for (var i in largeImages) { | |
| console.log(largeImages[i].src) | |
| } |
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
| /*************************************************** | |
| USING add_rewrite_rule | |
| ****************************************************/ | |
| /* azizultex | |
| 1. https://www.ait-themes.club/knowledge-base/how-can-i-change-items-slug-and-slug-of-other-custom-post-types/ | |
| 2. http://wordpress.stackexchange.com/questions/41988/redeclare-change-slug-of-a-plugins-custom-post-type | |
| 3. http://wordpress.stackexchange.com/questions/134322/rewrite-rule-for-custom-taxonomy | |
| */ |
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
| /* https://rogerpadilla.wordpress.com/2009/08/21/remove-empty-items-from-array/ */ | |
| function array_non_empty_items($input) { | |
| if (!is_array($input)) { | |
| return $input; | |
| } | |
| $non_empty_items = array(); | |
| foreach($input as $key => $value) { | |
| if ($value) { | |
| $non_empty_items[$key] = array_non_empty_items($value); | |
| } |
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
| function superminimal_demo_panels_sections( $wp_customize ) { | |
| /** | |
| * Add Panel | |
| */ | |
| $wp_customize->add_panel( 'sitepoint_demo_panel', array( | |
| 'priority' => 10, | |
| 'title' => __( 'SitePoint Demo Panel', 'superminimal' ), | |
| 'description' => __( 'Kirki integration for SitePoint demo', 'superminimal' ), | |
| ) ); |
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
| /* | |
| Site sample: http://nysi.co/ | |
| */ | |
| (function($) { | |
| "use strict"; | |
| jQuery(document).ready(function($) { | |
| $('#slider').slick({ | |
| centerMode: true, |
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
| if(function_exists('icl_register_string')) { | |
| icl_register_string ( 'Quovim', 'Copyright', $copyright ); | |
| } | |
| if(function_exists('icl_translate')) { | |
| $copyright = icl_translate( 'Quovim', 'Copyright', $copyright ); | |
| } | |
| echo $copyright; |
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
| /* localize script */ | |
| wp_enqueue_script( 'settings', get_template_directory_uri() . '/js/settings.js', array('jquery'), OO_Version, true ); | |
| wp_localize_script( 'settings', 'localized', array( | |
| 'ajaxurl' => admin_url( 'admin-ajax.php' ) | |
| )); | |
| /* setting.js */ | |
| jQuery(function($){ |
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
| // Method 1 | |
| brew install php56-pdo-pgsql | |
| // Method 2 | |
| #!/bin/bash | |
| # Check PHP version `php --version` | |
| PHP_VER=$(php -v | head -1 | awk '{ print $2 }') |