Last active
February 11, 2016 09:38
-
-
Save thadallender/bce2f82bdc92fa9a6ff8 to your computer and use it in GitHub Desktop.
Theme.Works Theme Mods - A plugin to change text strings on the homepage
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 | |
/** | |
* Plugin Name: Theme.Works Theme Mods | |
* Plugin URI: http://theme.works | |
* Description: Adds your custom filters to an Theme.Works theme. | |
* Version: 1.0.0 | |
* Author: Thad Allender | |
* Author URI: http://theme.works | |
* Author Email: [email protected] | |
* Text Domain: themeworks | |
* Domain Path: languages | |
* License: GPL2 | |
* | |
* @package themeworks | |
* @category Plugin | |
* @author Thad Allender | |
* @version 1.0.0 | |
*/ | |
/** | |
* USAGE INSTRUCTIONS | |
* | |
* 1. Download this PHP file to your computer from GitHub | |
* 2. Create a folder called "my-themeworks-mods" on your computer | |
* 3. Put this PHP file in the folder. | |
* 4. Edit this PHP file by changing the text in the return statements below (example: change 'My Blog' to whatever you like) | |
* 5. ZIP up the folder | |
* 6. Upload the plugin folder into your WordPress -> Plugins -> Add New and activate it. | |
* 7. Enjoy! | |
*/ | |
/** | |
* Exit if accessed directly | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
/** | |
* Blog section title | |
* @return string | |
*/ | |
function my_blog_title(){ | |
return 'My Blog'; | |
} | |
add_filter( 'tw_blog_title', 'my_blog_title' ); | |
/** | |
* Client section title | |
* @return string | |
*/ | |
function my_client_title(){ | |
return 'My Clients'; | |
} | |
add_filter( 'tw_client_title', 'my_client_title' ); | |
/** | |
* Contact section title | |
* @return string | |
*/ | |
function my_contact_title(){ | |
return 'My Contact Info'; | |
} | |
add_filter( 'tw_contact_title', 'my_contact_title' ); | |
/** | |
* E-Commerce section title | |
* @return string | |
*/ | |
function my_ecommerce_title(){ | |
return 'My Products'; | |
} | |
add_filter( 'tw_ecommerce_title', 'my_ecommerce_title' ); | |
/** | |
* E-Commerce button text | |
* @ return string | |
*/ | |
function my_ecommerce_button_text(){ | |
return 'Buy'; | |
} | |
add_filter( 'tw_ecommerce_button_text', 'my_ecommerce_button_text' ); | |
/** | |
* Portfolio section title | |
* @return string | |
*/ | |
function my_portfolio_title(){ | |
return 'My Portfolio'; | |
} | |
add_filter( 'tw_portfolio_title', 'my_portfolio_title' ); | |
/** | |
* Service section title | |
* @return string | |
*/ | |
function my_service_title(){ | |
return 'My Services'; | |
} | |
add_filter( 'tw_service_title', 'my_service_title' ); | |
/** | |
* Testimonial section title | |
* @return string | |
*/ | |
function my_testimonial_title(){ | |
return 'My Testimonials'; | |
} | |
add_filter( 'tw_testimonial_title', 'my_testimonial_title' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment