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
| git remote add server ssh://user@server.com:p/home/user/repo.git/ | |
| git push server master |
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 | |
| /*************************************************************************/ | |
| /* Adding Images Meta Boxes */ | |
| /*************************************************************************/ | |
| add_action('add_meta_boxes', 'add_images_meta_boxes'); | |
| function add_images_meta_boxes() { | |
| // Define the images attachment for gallery | |
| add_meta_box( | |
| 'code-gallery-attachment', |
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 | |
| /*******************************************************************************/ | |
| /* Loading templates */ | |
| /*******************************************************************************/ | |
| add_filter( 'single_template', 'get_custom_post_type_template' ); | |
| function get_custom_post_type_template($single_template) { | |
| global $post; | |
| if ($post->post_type == 'code_gallery') { |
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 | |
| add_action( 'edited_album', 'save_extra_taxonomy_fields', 10, 2); | |
| add_action( 'album_edit_form_fields', 'album_edit_tax_fields', 10, 2 ); | |
| //edit taxonomy update | |
| add_action('album_edit_tax_fields','save_extra_taxonomy_fields',10,2); | |
| function album_edit_tax_fields($tag) { | |
| //check for existing taxonomy meta for term ID |
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
| <snippet> | |
| <content><![CDATA[ | |
| /**************************************/ | |
| /* Registering post type */ | |
| /**************************************/ | |
| add_action('init','register_post_type_gallery'); | |
| function register_post_type_gallery() { |
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 | |
| add_action('init','register_post_type_slider'); | |
| function register_post_type_slider() { | |
| $labels = array( | |
| 'name' => __('Slider','_cpm'), | |
| 'singular_name' => __('Slider','_cpm'), | |
| 'add_new' => __('Add New Slider Image','_cpm'), | |
| 'add_new_item' => __('Add New Slider Image','_cpm'), |
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
| Usage: | |
| <?php echo code_content( $limit ); ?> |
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
| Usage: | |
| Download BFI_thumb.php file from https://github.com/bfintal/bfi_thumb and copy it into your 'inc' folder of your theme. | |
| <img src="<?php echo code_project_img( $thumb_size, $image_width, $image_height );?> /> |
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
| Step by step guide. | |
| First Phase: | |
| 1.First create a html form with first name, last name and email field for signing up process.( Remember the action of the form it has to be the page slug of email confirmation page that you will be creating at in next phase. ) | |
| Second Phase : | |
| 1.Create a Page ( Remember the slug has to be the same of that of action of the form of phase one ) and assign the template template-confirmation-mail.php | |
| 2.This page is responsible for generating unqiue hash key and sending that hash key along with the user's new account credentials to their email. | |
| 3.Remember the link of the activation_link has to the link to the email-verification template, which we will be creating in next phase. | |
| Third Phase : | |
| 1. Create a page and assign it to Email Verification Template.( Remember this template has to be assigned to the page that you sent in the mail in previous step ) | |
| 2. This page is responsilble matching that unqiue key sent on the email once new user visit that page. |
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 | |
| // vim: foldmethod=marker | |
| /* Generic exception class | |
| */ | |
| if (!class_exists('OAuthException')) { | |
| class OAuthException extends Exception { | |
| // pass | |
| } | |
| } |