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
# MySqli - OOP version Connection and PHP Scrip--------(mysqli)------------ | |
$host = "localhost"; | |
$username = "root"; | |
$password = ""; | |
$database = ""; | |
$conn = new mysqli($host, $username, $password, $database); | |
$sql = 'SELECT * FROM employee'; | |
$result = $conn->query($sql); | |
if ($result->num_rows > 0) { | |
while($row = $result->fetch_assoc()) { |
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 | |
//Example array. | |
$array = array('Ireland', 'England', 'Wales', 'Northern Ireland', 'Scotland'); | |
//Encode the array into a JSON string. | |
$encodedString = json_encode($array); | |
//Save the JSON string to a text file. | |
file_put_contents('myfile.txt', $encodedString); |
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 | |
/** | |
* Proper way to enqueue scripts and styles | |
*/ | |
function wpdocs_theme_name_scripts() { | |
wp_enqueue_style( 'style-name', get_stylesheet_uri() ); // style.css | |
wp_enqueue_style( 'slider', get_template_directory_uri() . '/css/slider.css',false,'1.1','all'); | |
wp_enqueue_script( 'script-name', 'https://cdnjs.cloudflare.com/ajax/libs/fuelux/3.15.10/js/fuelux.min.js', array(), '1.0.0', false ); // If you used true then it load in_footer, Default: False | |
wp_enqueue_script('oxfam_js_cookie', 'https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.1.0/js.cookie.min.js', array(), null, true); // Remove version variable by using null |
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 | |
// Second call this | |
function example_callback( $string ) { | |
$new_value = $string . " NEW!"; | |
return $new_value; | |
} | |
add_filter( 'example_filtersubroto', 'example_callback', 11 ); | |
// First call this | |
function example_callback2( $string2 ) { |
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
CDN Collection (www.edeves.com) | |
====================================================== | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"> |
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
# Initial git setup || Run For the first time. | |
git config --global user.name "subrotoice" | |
git config --global user.email "[email protected]" // Every space has meaning: git config --global user.email [email protected] will work | |
git config --list (Show all config) || git config user.name //(Show User Name) | |
git config --global core.editor "code --wait" // set default editor to open config | |
git config --global -e // Open in editor | |
git config --global core.autocrlf true // Mac: git config --global core.autocrlf input // End line | |
# Ch-2: Creating Snapshots (do Commit) | https://prnt.sc/zIIkMN39czOk | stage area green , unstated red | https://prnt.sc/9_BUPJ6VX53L | |
1. Working Directory: Where you work on your files locally || "Project Folder" another name |
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
1. ইন্টেক্স পেজে আগে সব কাজ করে নিতে হবে মেনু, উইগেট, থিম অপশন সব, | |
2. তারপর ভাঙতে হবে header.php, footer.php, sidebar.php | |
3. তারপর index.php থেকে single.php, page.php, archive.php তৈরি করতে হবে ( প্রথমে ভার্সন কম করতে হবে, যেমনঃ সাইডবারে একটা ভার্সন রাখলেই হবে পরে চাইলে করা যাবে ) | |
WP Theme Development (Create PHP Files) | |
header.php | |
================================== | |
<?php bloginfo('name'); ?> | |
<?php bloginfo('description'); ?> | |
<?php bloginfo('home'); ?> // Home Page link | |
<?php echo get_template_directory_uri(); ?>/ |
NewerOlder