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
| Basic: (50x50 pixels) | |
| <img src="//graph.facebook.com/nusraatfariaofficial/picture"> | |
| Square: | |
| maximum width and height of 50 pixels. | |
| Small | |
| maximum width of 50 pixels and a maximum height of 150 pixels. | |
| Normal | |
| maximum width of 100 pixels and a maximum height of 300 pixels. | |
| Large |
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 | |
| /** | |
| * Gets a WP_Theme object for a theme | |
| * Reference: https://developer.wordpress.org/reference/functions/wp_get_theme | |
| */ | |
| // Echo the name of the current active theme | |
| echo wp_get_theme(); | |
| // Echo the name of an installed theme |
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 | |
| /** | |
| * Parse the plugin contents to retrieve plugin's metadata | |
| * Works only in wp-admin | |
| * Reference: https://codex.wordpress.org/Function_Reference/get_plugin_data | |
| */ | |
| get_plugin_data( $plugin_file, $markup = true, $translate = true ); | |
| /* | |
| Return 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
| # HTML Inline: | |
| To make specific link send no referer url: | |
| <a rel="noreferrer" href="http://w3schools.com">Link</a> | |
| # JQuery method: | |
| <script> | |
| $(function(){ | |
| $("a").attr('rel','noreferrer'); | |
| }); | |
| </script> |
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
| /** | |
| * Date format received from Yahoo: 2016-04-03T19:00:00+05:30 | |
| * Date format needed: Mon, 03 April 2016 | |
| * | |
| * Ref.: http://www.w3schools.com/js/js_dates.asp | |
| */ | |
| var d = new Date('2016-04-03T19:00:00+05:30'); | |
| document.write(d.toUTCString().slice(0,16)); |
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 | |
| $homepage = file_get_contents('http://www.w3schools.com/games/game_canvas.asp'); | |
| $str=str_replace("href=\"", "href=\"http://mysite.com", $homepage ); | |
| echo $str; |
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
| /** | |
| * Toggle two classes | |
| */ | |
| $("#toggler").toggleClass("lightOn lightOff"); | |
| /** | |
| * Wrap an HTML structure around each element in the set of matched elements | |
| * Reference: http://api.jquery.com/wrap | |
| */ | |
| $( ".inner" ).wrap( "<div class='new'></div>" ); |
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
| /** | |
| * Syntax: window.open(URL,name,specs,replace) | |
| * Reference: http://www.w3schools.com/jsref/met_win_open.asp | |
| */ | |
| var URL = 'http://w3schools.com'; | |
| window.open( URL, "wo_map_console","height=650,width=800,toolbar=no,statusbar=no,scrollbars=yes").focus(); |
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 strTitle = document.title, | |
| iIndex = 0; | |
| function animateTitle(){ | |
| document.title= strTitle.substring(iIndex, iIndex + 145); | |
| if(iIndex == strTitle.length-1){ iIndex = 0;} | |
| else iIndex++; | |
| setTimeout("animateTitle()",200); | |
| } | |
| animateTitle(); |
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
| Array.prototype.remove = function(from, to) { | |
| var rest = this.slice((to || from) + 1 || this.length); | |
| this.length = from < 0 ? this.length + from : from; | |
| return this.push.apply(this, rest); | |
| }; |