#GIT
- Modificado (modified);
- Preparado (staged/index)
- Consolidado (comitted);
| <?php | |
| function pc_metabox_menu_posttype_archive() | |
| { | |
| $post_types = get_post_types(['show_in_nav_menus' => true, 'has_archive' => true], 'object'); | |
| if ($post_types): | |
| $items = []; | |
| $loop_index = PHP_INT_MIN; | |
| foreach ($post_types as $post_type) { |
| <?php | |
| namespace App\Http\Middleware; | |
| use App\OAuth2\OAuthServerException; | |
| use Closure; | |
| use Illuminate\Auth\AuthenticationException; | |
| use App\OAuth2\Storage\AccessTokenEntity; | |
| use App\OAuth2\Storage\ClientEntity; | |
| use Lcobucci\JWT\Parser; |
| <?php | |
| class WC_Intelipost_Quote_Product | |
| { | |
| private $_packages = array (); | |
| protected $_simpleProducts = array (); | |
| private $_dimensions; | |
| protected $_productsQty = array(); | |
| public function fetchProductQuote($items, $dimensions) |
| find . -maxdepth 1 -regex '.*_suffix.jpg' -print0 | \ | |
| while read -d '' -r; do | |
| [[ $REPLY =~ $regex ]] && mv "$REPLY" "${BASH_REMATCH[1]}.jpg" | |
| done |
| <?php | |
| /** | |
| * Remove a imagem da tag <p> e adiciona em um nova tag com as classes has-image e no-padding. Adiciona a tag img a class img-responsive. | |
| * Pode ser prevenida através da adição de um atributo ou espaço em branco para <p>, por exemplo, <p class="lorem">ou mesmo <p > | |
| */ | |
| function updateTagPInContent( $content ) { | |
| return preg_replace_callback( '/<p>((?:.(?!p>))*?)(<a[^>]*>)?\s*(<img[^>]+>)(<\/a>)?(.*?)<\/p>/is', | |
| function ( $matches ) { | |
| /* |
| var $inputs = $('[name]'), names = [], namesDuplicados = []; | |
| $.each($inputs, function(index, value){ | |
| var $this = $(value); | |
| if(names.indexOf($this.attr('name')) != -1){ | |
| namesDuplicados.push($this.attr('name')); | |
| } | |
| names.push($this.attr('name')); |
| <?php | |
| if ( is_admin() ) { | |
| function admin_footer_guiaprofissionais() { | |
| global $post_type; | |
| if ( $post_type == 'profissional' ) { | |
| ?> | |
| <script type="text/javascript"> |