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
| WPML plugin is used for making the multi lingual website. | |
| This will allow user to add transalted version of posts, category, page, product etc. | |
| WPML use the parse_query hook to modify query. Using this filter WPML adds query modification. | |
| The argument suppress_filters is used for removing the filter added in the query | |
| like posts_search, posts_search_orderby, posts_where etc. All these type of queries will execute if the suppress_filters is false. | |
| Default value of suppress filter is false in the WP_Query. So it will return only the posts in the current language. | |
| But get_posts() return all the posts in the posts. because suppress_filters is true in this function by default. |
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
| This is used to formate the debuging mode of the MAMP. | |
| Here we need to enable the xdebug module in mamp in php ini file. | |
| There are two different php ini file in, The locations are following. | |
| /Applications/MAMP/bin/php/php7.3.8/conf/php.ini ---- In bin folder | |
| /Applications/MAMP/conf/php7.3.8/php.ini ---- In conf folder | |
| In bin folder open php.ini file and uncomment the line | |
| zend_extension="/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so" |
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
| grep | |
| ============== | |
| Grep search a specific patten in each file | |
| $ grep "some string" file | |
| Search a string in a specific. |
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
| Web Automation Testing using Selenium and Python | |
| ================================================= | |
| First you need to check the python is already installed in the system. | |
| In order to check this just type the below command | |
| $ python or $ python3 | |
| It will result the as given below |
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
| Install Python and Create local environment | |
| =============================================== | |
| Some basic Commands to note i your memory | |
| check selenium is installed or not. | |
| =========================================== | |
| $ python3 -c "import selenium; print(selenium.__version__)" | |
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
| Below is the naming conventions for HTML structure. | |
| ===================================================== | |
| Names are written in lowercase Latin letters. | |
| Words are separated by a hyphen (-). | |
| The block name defines the namespace for its elements and modifiers. | |
| The element name is separated from the block name by a double underscore (__). |
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
| Chrome Advanced Development tools | |
| ================================== | |
| Chrome Command Menu | |
| ------------------- | |
| The command menu in chrome help many powerfull feature in the chrome page. | |
| Command + shift + P provide the command menu. where we can use many command operations. | |
| 1) Powerfull screenshots | |
| Screenshot Capture full size screenshot : Full size screenshot of the complete page | |
| Screenshot Capture node screenshot : Current node screenshot. You can select the node from the Elements tab |
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
| WP-Cron Jobs | |
| ============= | |
| Wp-Cron handles scheduling time-based tasks in WordPress. Several WordPress core features, such as checking for updates and publishing scheduled post, utilize WP-Cron. | |
| WP-Cron works by checking, on every page load, a list of scheduled tasks to see what needs to be run. Any tasks due to run will be called during that page load. | |
| Scheduling errors could occur if you schedule a task for 2:00PM and no page loads occur until 5:00PM. | |
| With WP-Cron, all scheduled tasks are put into a queue and will run at the next opportunity (meaning the next page load). So while you can’t be 100% sure when your task will run, you can be 100% sure that it will run eventually. |
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
| While creating large applications, then there may be chances of collision between class names, function names. | |
| So to avoid these problems PHP "Namespaces" provide a way in which to group related classes, interfaces, functions and constants. | |
| In the PHP world, namespaces are intended to take care of two issues | |
| that creators of libraries and applications experience when making re-usable code components, Those are: | |
| 1.Name impact between code you create, and internal PHP classes/functions/constants or third-party classes/functions/constants. | |
| 2.Ability to abbreviate Extra_Long_Names for improving the readability of source code. | |
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
| These are three type of javascript variabe declaration. | |
| var | |
| ==== | |
| Function scoped or globally Scoped. | |
| Reassignable and Redeclarable | |
| Not subject to temporal dead zone. | |
| var language = "JavaScript"; | |
| function foo() { | |
| var language = "Python"; |