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
| /** | |
| * Code snippet from http://উত্তরাধিকার.বাংলা/ | |
| * | |
| * Really inspiring if you wanna know code smell | |
| * and how to write bad code | |
| */ | |
| function determine_ashaba(sel_rel_arr,ashabas_from_qh,exclude_from_qh,qhs) | |
| { | |
| var ashabas = []; |
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
| // Fixed named events | |
| var _events = [ | |
| "vc:access:initialize", | |
| "vc:access:backend:ready", | |
| "shortcodes:vc_row:add:param:name:parallax", | |
| "shortcodes:vc_row:update:param:name:parallax", | |
| "shortcodes:vc_single_image:sync", | |
| "shortcodes:vc_single_image:add", | |
| "shortcodes:add:param:type:el_id", | |
| "click:media_editor:add_image", |
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
| /* ========================================================= | |
| * composer-view.js v0.2.1 | |
| * ========================================================= | |
| * Copyright 2013 Wpbakery | |
| * | |
| * Visual composer backbone/underscore version | |
| * ========================================================= */ | |
| (function ( $ ) { | |
| var i18n = window.i18nLocale, | |
| store = vc.storage, |
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
| window.VcCustomElementView = vc.shortcode_view.extend( { | |
| elementTemplate: false, | |
| $wrapper: false, | |
| changeShortcodeParams: function ( model ) { | |
| var params; | |
| window.VcCustomElementView.__super__.changeShortcodeParams.call( this, model ); | |
| params = _.extend( {}, model.get( 'params' ) ); | |
| if ( ! this.elementTemplate ) { | |
| this.elementTemplate = this.$el.find( '.vc_custom-element-container' ).html(); |
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
| /** | |
| NOTES: | |
| ======================== | |
| 0. Extend container view from "VcColumnView" so that you get a clean UI. | |
| 1. Render method called after element is added (cloned), and on first initalization. | |
| 2. Use model.getParam(param_name) to get specific param from params. | |
| 3. Use model.get("params") to get complete params object. | |
| 4. If params is changed then shortcode will be rendered automatically. | |
| 5. You do not need to override method that you are not going change, in our file "render". | |
| **/ |
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
| <?php | |
| /** | |
| * PHP default array map function doesn't provide access to array item key | |
| * So there is no way to map array based on some condition which depends on | |
| * array item key. And that's why array_mapx is here to help you in that case. | |
| * @param array $arr Array that is going to be mapped | |
| * @param callable $callback Callback function to map array $a | |
| * @param boolean $preserve_keys To maintain the old keys | |
| * @return array Mapped array | |
| */ |
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
| <div class="article"> | |
| <div class="heading">Article Heading</div> | |
| <div class="article-content"> | |
| <div class="paragraph"> | |
| Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
| tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | |
| </div> | |
| <div class="paragraph"> | |
| quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | |
| consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse |
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
| /* global jQuery, wp */ | |
| jQuery( function( $ ) { | |
| var initializeAllClocks, initializeClock; | |
| /** | |
| * Find clocks. | |
| * | |
| * @param [container] Scoping element for finding clock elements. | |
| * @returns {void} |
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
| <?php | |
| if ( ! function_exists( 'hippo_plugin_hook_info' ) ): | |
| function hippo_plugin_hook_info( $hook_name ) { | |
| global $wp_filter; | |
| $docs = array(); | |
| $template = "\t - %s Priority - %s.\n\tin file %s #%s\n\n"; | |
| echo '<pre>'; |
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
| /** | |
| * Figure out unique numbers from an array | |
| * | |
| */ | |
| #include <stdio.h> | |
| int main() | |
| { | |
| int arr[10], arr_size; | |