This file contains 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_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' ); | |
/** | |
* custom_woocommerce_template_loop_add_to_cart | |
*/ | |
function custom_woocommerce_product_add_to_cart_text() { | |
global $product; | |
$product_type = $product->get_type(); |
This file contains 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
/** | |
* Each of these samples can be used - note that you should pick one rather than add them all. | |
* | |
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96 | |
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/ | |
**/ | |
/** | |
* Add a content block after all notices, such as the login and coupon notices. | |
* |
This file contains 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
#!/bin/bash | |
# Input database name | |
echo "---" | |
echo "wpinstall.sh - A WordPress installation shell script" | |
echo "by Rutger Laurman" | |
echo "---" | |
echo "- Requires WP-CLI, make sure you install that first (http://wp-cli.org/)" | |
echo "- Check file for configurations" | |
echo "- Downloads, configures, installs WordPress, default theme and plugins" |
This file contains 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
class Text_Editor_Custom_Control extends WP_Customize_Control | |
{ | |
public $type = 'textarea'; | |
/** | |
** Render the content on the theme customizer page | |
*/ | |
public function render_content() { ?> | |
<label> | |
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> | |
<?php |
This file contains 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 | |
// Remove Footer | |
remove_action('genesis_footer', 'genesis_do_footer'); | |
remove_action('genesis_footer', 'genesis_footer_markup_open', 5); | |
remove_action('genesis_footer', 'genesis_footer_markup_close', 15); |
This file contains 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
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
#customize-theme-controls .customize-pane-child.current-section-parent { | |
-webkit-transform: translateX(-100%); | |
-ms-transform: translateX(-100%); | |
transform: translateX(-100%); | |
} |
This file contains 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_Customize_Manager->add_setting(); // adds a new setting to the database | |
* WP_Customize_Manager->add_section(); // adds a new section (i.e. category/group) to the Theme Customizer page | |
* WP_Customize_Manager->add_control(); // creates an HTML control that admins can use to change settings. | |
* WP_Customize_Manager->get_setting(); // can be used to fetch any existing setting, in the event you need to modify something | |
*/ | |
add_action( 'customize_register', 'my_customize_register' ); | |
function my_customize_register( $wp_customize ) { |
This file contains 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 | |
function themename_customize_register($wp_customize){ | |
$wp_customize->add_section('themename_color_scheme', array( | |
'title' => __('Color Scheme', 'themename'), | |
'priority' => 120, | |
)); | |
// ============================= |
This file contains 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 | |
// Ejemplo básico de PHP - https://www.dinapyme.com - http://www.oscarabadfolgueira.com | |
// Mostrar texto con echo sin espacios, en varias líneas | |
echo "Este texto se mostrará | |
por pantalla sin saltos | |
de linea | |
aunque esté escrito | |
en varias líneas en | |
el fichero php. |
This file contains 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 | |
// Ejemplo básico de PHP - https://www.dinapyme.com - http://www.oscarabadfolgueira.com | |
// Crear estructura básica de un documento html con php | |
echo "<!DOCTYPE html>"; | |
echo "<html>"; | |
echo "<head>"; | |
echo "<meta charset='utf-8'>"; | |
echo "<title>Título de la página web</title>"; | |
echo "</head>"; |