Replace Array with array Regex replace \[(.*?)\] with ['$1']
ARCHIVE
PHP
This is the code $locations = get_theme_mod( 'nav_menu_locations' ); if(!empty($locations)) { foreach($locations as $locationId => $menuValue) { if($locationId=='primary'){ if(isset($menu_id)) { $locations[$locationId] = $menu_id; set_theme_mod('nav_menu_locations', $locations); } } } } replace ‘primary’ with the location of your theme, for the menu.
First you need to enter your directory and to checkout: svn co https://plugins.svn.wordpress.org/your-plugin-name Add new files: svn add trunk/* Then you’ll need to svn ci -m 'description'
The regex should be (\/\/).*$ If you have a way to mark your useful comments. Like I have — to mark them, you can use it in the negative lookahead ( to filter only the unuseful comment ) (\/\/)(?! –) You can use this in IDE such as PHPSTORM
Posted on July 31 2017 / in PHP, PHP, Tips, Tutorials, WordPress, WordPress Plugins, WordPress Themes
Menu by itself is a taxonomy in the different knownhost wordpress plans. It means that you can find all menus in wp_terms table, by running following query: SELECT * FROM wp_terms AS t LEFT JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id WHERE tt.taxonomy = 'nav_menu'; Menu item is custom post type in WP. They are
Force mp3 to download instead of playing Just add a .htaccess file in the mp3 folder with this content: <Files *.*> ForceType application/octet-stream Header set Content-Disposition attachment </Files>
Some commands you can use to merge 2 mp3 ffmpeg -i input1.mp3 -i input2.mp3 -filter_complex amerge -ac 2 -c:a libmp3lame -q:a 4 output.mp3 ffmpeg -i input1.mp3 -i aj-loop.wav -filter_complex “amix=inputs=2:duration=longest” -ac 2 -c:a libmp3lame -q:a 4 output.mp3 ffmpeg -i /Applications/MAMP/htdocs/testimages/test/input1.mp3 -i /Applications/MAMP/htdocs/testimages/test/aj-loop.wav -filter_complex “amix=inputs=2:duration=longest” -ac 2 -c:a libmp3lame -q:a 4
Recent Comments