git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| <?php | |
| function convert_non_persian_chars_to_persian ($str) { | |
| //main goal: arabic chars: from U+0600 (؀) to ۿ U+06FF (ۿ) | |
| //source: https://unicode-table.com/en | |
| $right_chars = array ( | |
| 'ا', | |
| 'ب', | |
| 'پ', | |
| 'ت', | |
| 'ث', |
| function extend(target_object) { | |
| // Look for additional parameters in this function | |
| // eg. extend(target_object, ....a,b,c,d) | |
| if (!arguments[1]) { | |
| return; | |
| } | |
| // If any extra arguments, which are objects | |
| // loop through them | |
| for (var index = 1; index < arguments.length; index++) { |
| 100.43.91.14 | |
| 100.43.91.2 | |
| 104.236.133.77 | |
| 107.150.37.26 | |
| 119.29.82.97 | |
| 120.192.205.67 | |
| 120.56.185.132 | |
| 134.175.183.168 | |
| 136.243.176.20 | |
| 136.243.65.215 |
December 10, 2012
More and more people are realizing that git is awesome. Although the official WordPress source code still lives in an svn repository, you can contribute patches without having to touch svn ever again.
So, without further ado, here’s how you can generate and manage patches for WordPress Core (it assumes you’re comfortable with the command line).
| # editorconfig.org | |
| root = true | |
| [*] | |
| charset = utf-8 | |
| end_of_line = lf | |
| insert_final_newline = true | |
| trim_trailing_whitespace = true | |
| indent_style = tab |
| /// How to get the week number from a date | |
| // The code below adds two new functions to the Date object. Add this to your source code. | |
| // To get the ISO week number (1-53) of a Date object, mydate, use mydate.getWeek(). | |
| // To get the corresponding four-digit year, use mydate.getWeekYear(). | |
| // This script is released to the public domain and may be used, modified and | |
| // distributed without restrictions. Attribution not necessary but appreciated. | |
| // @SOURCE: https://weeknumber.net/how-to/javascript | |
| // Returns the ISO week of the date. |
| <div class="row"> | |
| <div class="col-md-6 mb-4"> | |
| [text* your-name akismet:author class:form-control placeholder "نام (ضروری)"] | |
| </div> | |
| <div class="col-md-6 mb-4"> | |
| [email* your-email akismet:author_email class:form-control placeholder "ایمیل (ضروری)"] | |
| </div> | |
| <div class="col-md-12 mb-4"> |
| <?php | |
| // @REF: https://github.com/DevRoomOrg/ircheck/issues/1#issuecomment-348672401 | |
| // @REF: http://www.aliarash.com/article/shenasameli/shenasa_meli.htm | |
| function checkNationalCode($nationalCode) { | |
| if (strlen($nationalCode) != 11) | |
| return false; | |
| $c = intval(substr($nationalCode, 10, 1)); |
| // @SOURCE: https://stackoverflow.com/a/4673436/4864081 | |
| // First, checks if it isn't implemented yet. | |
| if (!String.prototype.format) { | |
| String.prototype.format = function() { | |
| var args = arguments; | |
| return this.replace(/{(\d+)}/g, function(match, number) { | |
| return typeof args[number] != 'undefined' | |
| ? args[number] | |
| : match |